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

Incomplete list of Accessories? #9

Open
samus-homebridge opened this issue Jul 3, 2021 · 2 comments
Open

Incomplete list of Accessories? #9

samus-homebridge opened this issue Jul 3, 2021 · 2 comments

Comments

@samus-homebridge
Copy link

samus-homebridge commented Jul 3, 2021

First of all, thank you very much for this project!

I am a new user of Homebridge and Homescript. I have recently installed a Nest thermostat and I'm working on a way of automating the hot water activation by way of readings received from a wireless temperature sensor attached to my hot water cylinder.

My Homebridge installation, with Homebridge-nest plugin, displays four Accessories in the web interface: the thermostat itself, Eco Mode, Hot Water and Home Occupied. However, when I run hs.py -l, only the thermostat and the Home Occupied Accessories are listed. I don't really care about Eco Mode, but I need to be able to see the Hot Water Accessory.

Any ideas why that one is not appearing through Homescript?

EDIT:

So I have done some more digging. I think the reason the Eco Mode and Hot Water are not showing up is because they are not their own Accessories as defined within Homebridge-nest. Rather, they are added as services to the thermostat Accessory if the appropriate booleans are set.

Within Homescript, in the getAccessories function it only parses "item['services'][1]' whereas in my installation, Eco mode appears to be item['services'][2] and hot water appears to be item['services'][2].

(Separately, I noticed when parsing from ['characteristics'][1] onward, it misses out ['characteristics'][0] (by definition) which is the current thermostat heating/cooling state. is it necessary to skip that for any reason?)

@menahishayan
Copy link
Owner

Bit of a late reply here, but nevertheless:

it only parses "item['services'][1]' whereas in my installation, Eco mode appears to be item['services'][2] and hot water appears to be item['services'][2].

Thank you for pointing out this flaw. You're free to open a pull request resolving the same, or else, please provide your debug log so that I or someone else may be able to resolve this.

it misses out ['characteristics'][0] (by definition) which is the current thermostat heating/cooling state. is it necessary to skip that for any reason?

Most accessory lists that I've seen so far haven't had any useful information at ['characteristics'][0], which is why it's left out. But now that you mention it, lets have a look at your debug log to see if we need to rethink this decision.

@samus-homebridge
Copy link
Author

Of course, thanks. What command makes the best sense to send a log for? I ran "-l all" and it gave me this debug log but it doesn't show the DHW - I think I found out the above while tinkering with my own script which I seem to have lost.

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

2 participants