swissmanu / harmonyhubjs-client

A Node.JS library which allows you to interact with your Logitech Harmony Hub.
https://github.com/swissmanu/harmonyhubjs-client
MIT License
155 stars 42 forks source link

Can it listen on commands from the hub? #14

Closed QAnders closed 8 years ago

QAnders commented 8 years ago

Great work, appreciated!

Do you know if it would be possible to send out a command? That is when I press a remote button to get it to trigger and call another API in a 3rd party product?

swissmanu commented 8 years ago

The hub does not broadcast specific commands from a remote to any other client. You only get updates about activities via the . Maybe you can hook up to these? Something like "when activity x was started, trigger 3rd party system y"?

If you want to hook up to this kind of event, try register a callback with onStateDigest (see https://github.com/swissmanu/harmonyhubjs-client/blob/master/lib/harmonyclient.js#L57)

Hope this helps somehow :)

QAnders commented 8 years ago

Ok, thanks for your quick response!

I'll try to have a look at it and see if I can figure it out.

I've actually just noticed this statement on their website: "Harmony Hub sends commands from the mobile app to your devices using IR, Wi-Fi or Bluetooth wireless signals."

Philips Hue lights, Nest and Roku can be controlled over WiFi so question is if it would be possible to add a custom WiFi command or "hijack" one of the standard ones...

swissmanu commented 8 years ago

did you have any success hooking up to the state digests?

QAnders commented 8 years ago

No, sorry, but then again I haven't spent much time on it...

swissmanu commented 8 years ago

closed by inactivity