You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select * from snapshot_data where content_path in ('SoftwareVersion', 'TimeOfUseSchedule', 'ConfigurationTimestamp') order by TIME_OBSERVED desc
275
275
276
+
We have now sucesfully uploaded data using http(s) in unstructured, default structured and mapped structured format, but what it we want to send commands back to the device and have it change it's behaviour
277
+
278
+
First let's get the mqtt connection setup (you may want to test this using mqttx or similar)
279
+
In the config file enable the mqtt configuration and status uploaders
280
+
mqtt.configurationupload.enabled: true
281
+
mqtt.statusupload.enabled: true
282
+
set the port, broker host, broker username and broker password
283
+
mqtt.broker.protocol: ssl
284
+
mqtt.broker.host: the **DEVICE (NOT DATA)) hostname - $IOT_DOMAIN_HOST
Now just run the simulator again, the iot services automatically runs the mqtt server, and the adaprot sees the mqtt topic in the same way as the http path, so the iot servcie behaviour is the same
but what if we want to send a command to the IOT service to pass on to the device, for example changing it's configuration? In the data you'll have seen the telemetry value CommandDemoPlaceholder with the value "CommandTestPlaceholder" let's use MQTT to change that.
299
+
300
+
Before you do this you **MUST** ensure that the client is running as it sets up subscription to the mqtt server, without that then the mqtt topics used to send the command and receive the do not exist and the request will be rejected by the IOT Service.
301
+
302
+
While it's running look at the output and check that the CommandDemoPlaceholder is set to the default, do this using the output of the client OR the SQL interface or by getting the content of the instance :
0 commit comments