3 state switch and what to send via mqtt
-
hello
i'm planning the following setup:
- simple relay + light sensor node => controlling a lamp
on / off is clear. auto should switch on the light when it becomes dark and vice versa. - in openhab i want to so set this lamp to on / off / auto => does this kind of switch exist in openhab?
- if yes: how would the message sent via mqtt look like? The predefined api sub-types won't help me imho, because a V_LIGHT for example does know only two states. or can i set the payload to whatever i want? ie 0=off, 1=on, 3=auto and decide in the sketch what to do?
- simple relay + light sensor node => controlling a lamp
-
I would try to keep the logic at the controller side. You could make two buttons/switches in openhab. One for on/off and one for auto/manual. A sensor for the light level. Combine those with a rule.
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