Run the Sample Python Directly Connected Device Application

Run the sample Python directly connected device application to learn how to use the client software library APIs. The sample directly connected device application periodically send humidity messages to Oracle Internet of Things Cloud Service.

  1. Copy the provisioning file obtained in Set Up Your Development Environment to Use the Python Client Software Library to the current directory.
  2. Run the following command in the same directory:
    python3 -m iotcs.sample.DirectlyConnectedDeviceSample <provisioner file> <passphrase>
  3. Confirm the device is sending messages to Oracle Internet of Things Cloud Service:
    1. Open the Oracle Internet of Things Cloud Service Management Console.

      The URL format to access the IoT management console is: <iot instance name>.<domain name>/ui

      For example: https://myiotcs.mydomain.oraclecloud.com/ui or https://myiotcs.mydomain.oracleiotcloud.com/ui.

    2. Click the Menu (Menu icon) icon adjacent to the Oracle Internet of Things Cloud Service title on the Management Console.
    3. Click Applications.
    4. Click PythonCLapp.
    5. Click Data and Explorations.
    6. Click Data tab.
    7. In Filter By, select Type.
    8. In Message Type select Data.
    9. Confirm there are incoming messages.
  4. Deactivate the virtual environment by using this command:
    [python virtual environment directory]\Scripts\deactivate.bat