Send Data to SmartWorks
You need to create a connection between SmartWorks and the object to send the data. This connection can be created from an API. The platform offers access through a REST API to all the resources. It's protected by Oauth protocol allowing you to define fine grained access control according to your use case.
Data must be sent via HTTP or MQTT to SmartWorks. For this project we are using MQTT connection.
MQTT Is the standard for IoT messaging. It allows for messaging between device to cloud and cloud to device. More information on MQTT can be found here.
Client connections are always handled by a MQTT broker, which is responsible for receiving and filtering the messages, determining who is subscribed to each message and sending them. To configure the MQTT broker connection, the Host, Username and Password are the required parameters.
Follow the steps below to connect your device via MQTT.
- Open the SWX Computer Training-Guide file in your existing code editor. If you need a code editor, you can download one here. If you don't want to install a code editor and/or Python, you can access Jupyter online. Follow the steps here. See Connect Your First Device for more information.
- Complete the steps under Computer Metrics.
-
Connect a Device via MQTT: