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

Stopping activities broken #25

Closed brian-gates closed 8 years ago

brian-gates commented 8 years ago

Hi there,

First, awesome lib. Great work.

However, using your examples turns devices on, but does not turn them back off. Perhaps there was a shift in the API?

Any help would be appreciated :)

swissmanu commented 8 years ago

hi brian

what does getActivities() return? is there an activity with the id -1? if so, API is most probably the same as before.

thx for confirmation, manu

brian-gates commented 8 years ago

There is an item id -1 with label PowerOff.

startActivity(-1) does turn everything off.

Is it possible to turn off a single device by id?

brian-gates commented 8 years ago

client.isOff().then(log) seems to always output true regardless of device state. I think that's why your demo script doesn't toggle as it should.

Activities have a property controlGroup which hint at useful functionalities like Volume, Channel, DisplayMode. Are these somehow accessible?

swissmanu commented 8 years ago
brian-gates commented 8 years ago

Thanks for the information.

I still think there's a bug though: isOff returns true after turning a device on.

I'll take a look at orchestra-jsapi. I'm guessing executeAction is what I'm looking for?

brian-gates commented 8 years ago

My main goal is to turn off a single device (by id or name). Not sure if executeAction will accomplish this, or how.

Any help is appreciated!

bradwbradw commented 5 years ago

@brian-gates i know it's been 3 years, but i'm having the exact same problem. Were you able to figure out how to end an activity?