You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2021. It is now read-only.
button input gateway - transforms button input to a serial command using Arduino (e.g. button 1 click sends 'C1\n' on serial link)
relay output gateway - transforms serial input to relay on off (e.g. '+1\n' turns on relay 1, '-1\n' turns the relay 1 off)
I want to make simple bindings that bind relay and button clicks, this means that i don't need to write a rule to connect the button to a relay output
example
Switch Lamp {serial="COM1@9600,ON(+1\n),OFF(-1\n)", serial="COM2@9600,TOGGLE(C1\n)"}
So if the COM2 receives C1 - the binding will receive TOGGLE command - update the item value and send ON or OFF to COM1
What is necessary for the "TOGGLE" command to work is that i need to figure out the current state of the item in binding. There is no state that i can rely on in the serial binding class.
Can anyone suggest how to safely fetch the actual state of the item?
The text was updated successfully, but these errors were encountered:
Updating Item state does not normally do anything to any binding. Certainly not to the serial binding. You'd need to send it a command.
This kind of feature is essentially what the follow profile is about, unfortunately this is restricted to use with bindings with channels and will not be available for serial v1.x
There's not likely to be a serial 2.x now, but maybe find out if there are any proposals for serial 3.x you could request the feature for. Although I still think profile covers it.
My setup:
two serial gateways
I want to make simple bindings that bind relay and button clicks, this means that i don't need to write a rule to connect the button to a relay output
example
Switch Lamp {serial="COM1@9600,ON(+1\n),OFF(-1\n)", serial="COM2@9600,TOGGLE(C1\n)"}
So if the COM2 receives C1 - the binding will receive TOGGLE command - update the item value and send ON or OFF to COM1
What is necessary for the "TOGGLE" command to work is that i need to figure out the current state of the item in binding. There is no state that i can rely on in the serial binding class.
Can anyone suggest how to safely fetch the actual state of the item?
The text was updated successfully, but these errors were encountered: