Sending Data to SmartWorks IoT

Send Data to SmartWorks IoT from a Thing

Data must be sent via HTTP or MQTT to SmartWorks IoT. You need to create a connection between SmartWorks IoT and the object to send the data. This connection can be created from an API.

Data can come from many sources, but you will need to configure those sources to send data to SmartWorks IoT. If sending data from a device, you will need to add the right HTTP or MQTT endpoints in the device code (and the appropriate credentials). To see how to get the credentials required, read Manage Thing Security.

Sending data through HTTP
Things can send data using the client-id and secret-id that they received when they were created. To establish a connection between a Thing and SmartWorks IoT, the account-id and account-secret-id are needed, as well as a token to make the interaction.
To send data through HTTP you need to send a POST request. The source from the data does not need to be specified as it is automatically identified by the token and the client-id associated. See more in the API documentation.
Host: https://api.swx.altairone.com
Sending data through MQTT
To use this protocol, a connection between SmartWorks IoT and the Thing must be done with the username and password given. The data will be sent by publishing it.
Host: tcp://mqtt.swx.altairone.com
Port: 1883

Data is sent to the user account/data/item in a JSON format with its characters as strings.

Data can be seen in the Raw History panel, where it is saved with the data and the time it was sent.