Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openhab2 IN #37

Open
overdrive69 opened this issue Jul 22, 2019 · 1 comment
Open

openhab2 IN #37

overdrive69 opened this issue Jul 22, 2019 · 1 comment

Comments

@overdrive69
Copy link

No description provided.

@overdrive69
Copy link
Author

It would be usefull that the IN node also sends the msg on statusupdate.
At the moment the IN node sends the message only when the NODE changes from ON to OFF or OFF to ON.

some one already has this done. But there a few other features missing.

https://github.com/jeroenhendricksen/node-red-contrib-openhab2

  • openhab2-in2
    Listens to state changes of a selected openHAB Item and allows you to configure on what specific event a message should be send, and under which conditions.

Configuration:

Name : Optionally specify a name
Controller : Select the openHAB controller
Item : Select the Item to monitor
Send initial state at node startup (will set msg.event to "InitialStateEvent")
Only when Changed : Only send a message when the state changes (eventtype == "ItemStateChangedEvent") when set to true, otherwise only sends state updates (eventtype == "ItemStateEvent")
(Optional, when 'Only when Changed' is checked) Changed from: the old (previous) state. Ignored when left empty.
(Optional, when 'Only when Changed' is checked) Changed to: the new state where it changed to. Ignored when left empty.
Messages injected in NodeRED flows (1 channel):

Channel 1:

msg.item : the item's itemname (not label)
msg.topic : "StateEvent"
msg.event : "InitialStateEvent" | "ItemStateEvent" | "ItemStateChangedEvent"
msg.payload : the new state of the selected item
msg.oldValue : the previous value (state) of the item (when 'Only when Changed' is checked), otherwise null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant