Closed DJ-Q closed 8 years ago
How do you configure it?
Like this
{ "bridge": { "name": "Homebridge-02", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },
"platforms": [
],
"accessories": [
{
"accessory": "mqttswitch",
"name": "BigLamp",
"url": "mqtt://127.0.0.1",
"username": "",
"password": "",
"caption": "Big Lamp",
"topics": {
"statusGet": "stat/sonoff/power",
"statusSet": "cmnd/sonoff/power",
"onValue": "ON",
"offValue": "OFF"
}
}
] }
Just updated plugin to version 0.0.3. Upgrade and retry.
Thank you for the reply, i have updated the plugin to 0.0.3 but it still not working. it still seems to sending "TRUE" or "FALSE" and not "ON" or "OFF" even though o have set the onvalue and offvalue
Change the config this way:
"accessories": [ { "accessory": "mqttswitch", "name": "BigLamp", "url": "mqtt://127.0.0.1", "username": "", "password": "", "caption": "Big Lamp", "topics": { "statusGet": "stat/sonoff/power", "statusSet": "cmnd/sonoff/power" }, "onValue": "ON", "offValue": "OFF" }
How is that different to what I have already?
The onValue and offValue must be outside the parenthesis of the topics field.
That worked thank you for your help
Hey I can’t get this to work My config:
{
"topics" : {
"statusGet" : "stat/vegtablegardenwater/POWER",
"statusSet" : "cmnd/vegtablegardenwater/power"
},
"accessory" : "mqtt-sprinkler",
"qos" : "0",
"caption" : "Garden",
"integerValue" : "TRUE",
"onValue" : "ON",
"offValue" : "OFF",
"name" : "TEST MANG",
"url" : "192.168.1.192:1883"
}
I’ve tried changing everything
I downloaded an app on my iPhone and I can subscribe to mqtt topic and turn my switch on and off, but I can’t get the mqtt-sprinkler accessory to do it
I have this set up with a sonoff device but I can only get "off" to work. When I flick the switch to on or off position in Home app it only ever send the off command. My sonoff is expecting cmnd/sonoff/power on and cmnd/sonoff/power off as topic and message. This works fine from command line mosquitto_pub but I can't for the life of me figure out the correct syntax in my config.json file to make this happen. Any ideas?