reverse binary switch message
-
i use binary switch sketch to monitor working electrical appliances through 220v contactor with closes the circuit of the switch.
unfortunatley, in domoticz, when the circuit is opened (no contact between pin3 and GND) it shows ON which is the opposite of my intention.
i tried messing with the code and writing low to the pin instead of high but it didnt work.
another solution is to use Normally Closed contactor so it will show default off and when the contactor will turn on, the arduino circuit will be opened and the domoticz will show this as on, but, i didnt find any 1phase contactor with NC terminal, only 3phase which are too much wide for my box.is there any way to reverse the message from the node?
maybe something with this line:gw.send(msg1.set(value == HIGH ? 1 : 0));maybe changing the 1 with the 0 ?
-
i use binary switch sketch to monitor working electrical appliances through 220v contactor with closes the circuit of the switch.
unfortunatley, in domoticz, when the circuit is opened (no contact between pin3 and GND) it shows ON which is the opposite of my intention.
i tried messing with the code and writing low to the pin instead of high but it didnt work.
another solution is to use Normally Closed contactor so it will show default off and when the contactor will turn on, the arduino circuit will be opened and the domoticz will show this as on, but, i didnt find any 1phase contactor with NC terminal, only 3phase which are too much wide for my box.is there any way to reverse the message from the node?
maybe something with this line:gw.send(msg1.set(value == HIGH ? 1 : 0));maybe changing the 1 with the 0 ?
-
-
@martinhjelmare said:
Hi!
Yes, you're correct.
Thanks, but for which part do you mean I'm correct? The problem or changing the 1 and 0?
You can reverse the message by flipping 1 and 0.
-
You can reverse the message by flipping 1 and 0.
@martinhjelmare
Great! I'll try it tomorrow.
Thanks a lot
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login