I'm new to node-red, but I like and I'm trying to move my home automation stuff to it from Home Assistant. And so..
I installed the node-red-contrib-homekit-bridged
module, and I have it working enough that I can see an accessory in my Home app on iOS (it's a switch), and if I click it in the app it displays "on: true" or "on: false" below the node in the pallette. Awesome.
I want this switch to trigger a complex scene/automation/whatever, and I've wired a Hue bulb node to it for testing purposes. If I wire an inject node sending a boolean to the hue node I can turn the physical light on and off, so that much works. But I want to have the HomeKit node send the message to the hue node to turn on or off. Maybe I have a fundamental misunderstanding of how this is supposed to work -- but no messages are coming out of the HomeKit node with I click the switch in the app (despite the fact that the node is reporting a state change), so the bulb I've wired it's output to does nothing. I've wired a debug msg node to the same output on the HomeKit node, but nothing appears in the debug window when I click in the app. I've tried putting some jason ({"on": 1}
) in the characteristics properties area, and in the output area of the node settings.. and a few other things.. but nothing gets a message out of the HomeKit node.
Some decent examples would help, but after lots of searching I really can't find any. Should I just do mqtt to homebridge and give up on the homekit-bridged
module?
[UPDATE]
I found a tutorial that mentioned using the function node to debug messages, so I tried using it and I found the problem: the homekit node is capitalizing the keys, but the accessories (tested with Hue and LIFX bulbs) want lowercase keys, so in other words it's sending "On": true
instead of "on":true
. That's it. That's the problem.
So.. I don't want to have to add an extra node to adjust the message every single time I use one of these nodes, so I'm going to attempt to fork the code and fix it at the source, I guess.