-
Notifications
You must be signed in to change notification settings - Fork 10
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
incoming data parser, set_ct, set_xt #13
Comments
I assume you mean set_ct and set_xy, right? Are using the script_handler or the isy_rest_handler in your config? I'm really only familiar with the script_handler and I thought there was a basic handler for them defined. Are you seeing any errors reported when using them? |
I'm looking at the code and it looks like ct and xy are only partially defined. I could probably add in the missing pieces pretty easily. I just need to figure out all this super class stuff which is some new code recently merged in. Most folks have only been interested in brightness and power. I'm not even sure how to have my harmony issue a 'ct', but I know 'xy' is possible. I'll try to have something ready to test in the next few days. |
Yes - I'm using script handler. I quickly checked and noticed the same. When I change xy -value, even then only bri or on is being handled. And in most cases that is enough, I agree. (In fact, in addition to lamps not supported by Harmony I'm using real Hue Bridge as well. As Harmony has capability of only handling one Hue Bridge, I'm also handling real Hues thru hueupnp.py, script handler, and curl gets to Hue Bridge. This is infact how I noticed that I couldn't pass xy (or ct) values.) |
I released new code and added in 'xy' and 'ct' so they get processed. I only tested 'xy' because I don't have an easy way to send 'ct'. Basically in the set() function only 'bri' and 'on' were checked. So, I added in some extra checks for 'xy' and 'ct'. I'm not reporting success/fail for them, though, since the set() function only allows one status and I don't want to break the 'on'/'bri' if 'xy'/'ct' is also passed at the same time. One additional note, python's exec() doesn't like square brackets included as parameters. There might have been a way to escape them, but it was just easier to remove them. So, if 'xy' equals = "[0.443, 0.195]", it is replaced as "0.443, 0.195". I hope that is fine. Here is a clip from my log when 'on', 'bri', and 'xy' are all passed at the same time:
|
Had to make some modifications, but now works just fine, both xy and ct. For xy I had to make following change (I also added the [] in helper.sh) For ct adding str(value) was enough. |
I'm using real Hue hub behind hue-upnp as well (kinda like passthru), since Harmony can handle only one Hue Hub. ( Sadly it seems that hue-upnp isn't that compatible with different hue apps on my phone - has to set up temporarily ha bridge with same mac, ip and port to connect with app, then I could shut down ha bridge and relaunch hue-upnp. Color changing doesn't work (harmony sends only ct or xy, but maybe these apps are sending also some other parameters so these doesn't get changed)) |
That is quite interesting. So, in your helper.sh are you then making a bunch of wget or curl calls? We can try continuing expanding the functionality if you want to capture these other directives. If you want you can send me some debug logs and I can try and pick out the other directives that are being dropped. Or if you want to continue play with it and let me know the outcome, that would be cool too. I'm willing to help if you want. |
I can't get those two to work at all, are they implemented in handlers? set_on, off, bri work as expected.
The text was updated successfully, but these errors were encountered: