Added button handler

This commit is contained in:
2018-01-27 15:51:57 +01:00
parent 649b9e0729
commit 85cdbbf42d
10 changed files with 180 additions and 32 deletions

30
fs/mqtt.json Normal file
View File

@@ -0,0 +1,30 @@
{
"comment": "From QIoT MQTT Server",
"username": "758cb1b5-d631-4cee-9b20-9e8d5029606d",
"myqnapcloudHost": "Not Available",
"clientId": "SONOFFSwitch_1516965632",
"host": [
"192.168.89.12"
],
"password": "r:fa6d6a2834aaabaa88529444c9564ffd",
"port": 21883,
"resources": [
{
"description": "Power on/off switch",
"datatype": "Boolean",
"resourceid": "switch",
"topic": "qiot/things/admin/SONOFFSwitch/switch",
"resourcename": "switch",
"resourcetypename": "Button",
"unit": ""
}
],
"example-payload": {
"deviceId": "dsjhjshsdjkjsdkdsjsdjdsksdjd",
"sensorId": "QIoTDevice",
"value": 18,
"metadata": {"unit": "C", "datatype": "Float"}
},
"pub-topic": "sonoff/sonoff_D927D7/switch",
"sub-topic": "sonoff/sonoff_D927D7/command"
}