NRCHKB / node-red-contrib-homekit-bridged

Node-RED Contribution - HomeKit Bridged : Node-RED nodes to simulate Apple HomeKit devices.
https://nrchkb.github.io
MIT License
415 stars 51 forks source link

[FEATURE] Add support for controlling existing devices (client-side) #135

Closed gfcittolin closed 4 years ago

gfcittolin commented 5 years ago

I'm interested in having a node for controlling HomeKit-enabled devices (actually the opposite of what this node currently does), and I think that this could be part of this same package. In my setup, I emulate a homekit device from Node-RED, but I also have a real HomeKit-enabled outlet. No problem for iOS devices, but I'd like to control it from an Android phone, so Node-RED would act as a bridge here.

Would you be interested in a PR with such functionality? I don't have much time available, so it will take some time to have it fully implemented, but we could eventually work together on this

crxporter commented 5 years ago

Check this npm plugin - a lot of your work may already be done. Just needs a node red wrapper.

https://www.npmjs.com/package/hap-client

Also note, each official homekit device can only have one connection. So if you want to pair it with node red, you’d have to remove it from your current homekit environment first. In my opinion that would be nice to have in node red but maybe not bundled up with this program. I don’t know how much code would be shared though.

I’ll let others weigh in - but definitely come back here if you make the plugin, I’d be interested in seeing it.

Shaquu commented 5 years ago

I am working on new version which isn’t there yet because of the amount of responsibilities I have right now. When I am done it would be great if you make a PR.

NorthernMan54 commented 5 years ago

@gfcittolin If your using homebridge for all your devices, there is this

https://flows.nodered.org/node/node-red-contrib-homebridge-automation

djiwondee commented 5 years ago

@gfcittolin if you are using a grown accessory/service mesh like me in my home with different components from various vendors, e. g.:

image

it may make sense if you are decide what component/layer should be responsible for what functionality. I decide to use HomeKit from Apple for all of the user based interaction with the accessories (which I think is what you are looking for). Regardless original HomeKit certified or 3rd party accessories, I can control all of that from the UI provided in iOS or macOS, even with Siri if you like.

However, Node-red and esp. NRCHKB plays a significant role in my setup. It puts all non HomeKit ready accessories into my HomeKit setup and provides capabilities HomeKit is not able to provide (e. g. wake up in the morning switching AVR on with slowly increasing volume up to a particular level)

image

Above you see, how the logical view on the architecture looks like. A further layer like Homebridge would be an option as well, but would in my perspective increase the effort to maintain and operate. Many ways to go, at the end you have to decide.

Just some of my thoughts on that...

gfcittolin commented 5 years ago

Thanks people for your comments!

@crxporter that's what I was thinking about, to wrap hap-client as a Node-RED node. Thought it could be interesting to have it housed in this same repo, as I'm not a specialist on the protocol or the devices, and therefore couldn't be able to maintain it as good. But it can be done as a separate node, indeed.

@NorthernMan54 I'm actually not using homebridge at all, I just have homekit-compatible device (don't remember the brand/model right now) that can be controlled from iOS, but not from my Android phone. Will check that node though, at least to check the possibilities.

Not much time to invest on the eventual development of this, but I'll let you know as soon as I have any news. Thanks!

Shaquu commented 4 years ago

Bump. I am looking into adding this feature. If you have some insights it's the right time to speak up!

crxporter commented 4 years ago

If you have some insights it's the right time to speak up!

A check-box or easy way to duplicate the item on a bridge.

Example:

I have an official homekit motion detector that I add to node red using this new node. Now I have a node-red motion detector but I can't pair it with my Home app because each item can only have one pairing.

Please give me an easy way to duplicate this device back into NRCHKB as a motion detector. Could be as simple as a drop-down to choose which bridge it will be added to (or "none" if the user doesn't want it added back in).

crxporter commented 4 years ago

Old issue, closing for now. Some new discussion on a similar topic at #242

Please discuss there, join in our Discord group, or re open this issue if you'd like.