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

Node-Red Syntax unclear #269

Closed
luedi0 opened this issue Feb 6, 2022 · 1 comment
Closed

Node-Red Syntax unclear #269

luedi0 opened this issue Feb 6, 2022 · 1 comment

Comments

@luedi0
Copy link

luedi0 commented Feb 6, 2022

Describe the bug
I would like to use Node-Red for automations instead of HomeKit as it isn't always reliable (3 home hubs are messing with each other at home despite only one being enabled, rest disabled...)

To Reproduce
When trying to us the hb-control node for the Open Window Switch, I am not able to pass on the right msg.payload to enable/disable the switch.
I want to automate radiators to be disabled temporarily while windows are open.

Expected behavior
I would like to know the expected syntax for the open window switch (and potentially other syntax).

Screenshots
Screenshot 2022-02-06 at 20 56 56

@luedi0
Copy link
Author

luedi0 commented Feb 7, 2022

I managed to get the proper payload from Node red forums.
It is below for those who are interested:

if (msg.payload.ContactSensorState==0)
{
    msg.payload = { On: false };
    return msg;
}
if (msg.payload.ContactSensorState==1)
{
    msg.payload = { On: true };   
    return msg;
}
return null;

Now I have an issue with the fact that Node-red doesn't like to talk to multiple homebridge instances on the same MAC address...

@luedi0 luedi0 closed this as completed Feb 7, 2022
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