Little known Ways to Try HCP IoT Services using Simulator – Part 3
In this final part of the blog series you learn how to setup an IoT simulator and push notifications to the device.
Setting Up IoT Simulator
- Python is pre installed on Mac. If you are on a windows machine install python by following the instructions here: Python For Beginners.
- Download the “IoT starterkit for desktop” folder from here: IoT Starter Kit · GitHub
- Download urllib3 1.14 ,unzip it and place the contents of the folder inside iot-starterkit-for-desktop folder.
- Place the config.py file inside the folder “iot-starterkit-for-desktop”.
- Edit the config.py file – change the values according to the details in your IoT cockpit.
- Open command window and navigate to the folder “iot-starterkit-for-desktop”.
- Then execute the command “python iot_starterkit_desktop.py” to start the IoT simulator.
Sending Push Notifications to Simulator
- Open MMS cockpit.
- Click on “Push messages to devices” tile.
- Enter the “Device ID” and “Message to push” details. Then press “Push” button.
- The message should reach the simulator.
- You could also control the LED of the simulator by changing the message as given below.
- Given below is the video that shows sending push notifications to the device from MMS cockpit.
View Data from Device Simulator
The data from the simulator could be viewed in the MMS cockpit.
- On the IoT simulator slide the slider to 100 to start sending data to MMS cockpit application. By changing the slider position we could see different values under stored messages in MMS cockpit.
- Click on “Display stored messages” tile in the MMS cockpit.
- Select the table T_IOT_D*** to view the value coming from device.
Other SCN spaces to follow:
SAP Technology RIG