Closed PierreBier closed 3 years ago
The message
variable is available within your apply code - so if you use "integerValue": true
to give you on/off values of 1
and 0
then you should be able to use something like: "apply": "return JSON.stringify({CMD:4,VALUE:message,XTIME:0,INTERVAL:0})"
You might also want to have a look at the JSON Codec: https://github.com/arachnetech/homebridge-mqttthing/blob/42c7a5da71b2a6d80d49d2e70016dd03db387c24/docs/Codecs.md#json-codec-json
Thank you for your help. The code worked like this.
Hi there, i'm using this plugin to control my hot tub. I have already configured a switch for controling the pump. I can activate the pump with this code:
The problem is, that I'm not able to send the command to turn off the pump which must be
I tried to ad something like "setOff" but it doesn't work. How can I send to different commands for on and off?