I get a lot of:
Socket hangup, cant evaulate rule
It happens when i ask for the state of a light:
If light is turned on and x then
New pimatic plugin for integration with Philips Hue
I get a lot of:
Socket hangup, cant evaulate rule
It happens when i ask for the state of a light:
If light is turned on and x then
Great work! For me it kind of messed up my Pimatic, not sure why because controlling the lights seems to work:
Could it be because I also have a led strip and hue living color?
@Tim Looks like an CSS cache issue. Did you try to clean your cache and refresh the page?
@sweebee said:
I get a lot of:
Socket hangup, cant evaulate rule
It happens when i ask for the state of a light:
If light is turned on and x then
Is that only on Pimatic startup, or also later?
(Only on startup does pimatic-hue-zll wait for the (first) light status results, which may the delay of such a rule evaluation. Afterwards it just uses whatever it received last.)
@markbergsma not only at startup. even after days.
@Tim said:
Great work! For me it kind of messed up my Pimatic
Could it be because I also have a led strip and hue living color?
Hmm, perhaps because pimatic-led-light and pimatic-hue-zll both use the Spectrum color picker and import it separately. Another good reason to settle on a single good color picker in Pimatic…
@markbergsma I also have pimatic-led-light installed and i don’t have this problem.
@sweebee said:
@markbergsma not only at startup. even after days.
Weird. Could you open an issue in Github for that?
If you can, please enable debug logging and provide detailed logs along with what happens right before and after it, may help a lot in figuring out what’s going on. Thanks!
@markbergsma said:
Hmm, I don’t think so though: at least that last question mark (which was mine) there is wrong. But I’m also not 100% sure what that timestamp actually means, and often it’s 0. On my bridge I see several scenes with a ts of 0 which seem newer than those with an actual timestamp. So perhaps I should just ignore that timestamp and always use the last one returned (as you said) - removing the entire unless condition should accomplish that.
I’ve since confirmed that scenes are not returned in creation/modification order. I guess relying on the “lastmodified” field is best now.
@sweebee Nope, not the cache. Only added 1 device this time. Still the same problem. Deleted all caches and did a hard refresh.
When adding the device to the page I get this error:
Uncaught TypeError: ref.spectrum is not a function
When loading the page I get this error:
Uncaught TypeError: Unable to process binding "template: function (){return { name:'devicepage-template',foreach:devicepages} }"
Message: Unable to process binding "if: function (){return $root.enabledEditing() || $data.getUngroupedDevices().length > 0 }"
Message: Unable to process binding "if: function (){return !$root.isGroupCollapsed($data,{id:'$ungrouped'}) }"
Message: Unable to process binding "template: function (){return { name:$root.getItemTemplate,foreach:$data.getUngroupedDevices(),afterRender:$data.afterRenderDevice} }"
Message: ref.spectrum is not a function
I’m getting more and more socket hangups. Sometimes when i try to activate a scene or change the hue/sat:
set color of woonkamer-bank to hue 70 sat 100
@sweebee said:
I’m getting more and more socket hangups. Sometimes when i try to activate a scene or change the hue/sat:
Yeah, I’ll focus now on error handling before anything else. I’ve already done a bit of work on this but there’s more to do. I’d also like to investigate why these socket hangups (connection resets) are actually happening in node-hue-api and if maybe there’s something that can be improved there instead of just silently ignoring or retrying in pimatic-hue-zll.
I’m rather busy with work and other stuff for a while, but I’ll try to squeeze this in.
A lot has changed recently with this plugin, it is even working on my somewhat problematic pimatic installation now with all the latest commits
Thanks!
@djmvt said:
A lot has changed recently with this plugin, it is even working on my somewhat problematic pimatic installation now with all the latest commits
Yes, I’ve completely redone pimatic-hue-zll’s error handling, and it will now retry Hue API requests on transient failures, and hide the error unless it persists. That should make it a lot more robust. The current master branch has this code, along with the hue scene activation support.
@sweebee also reported that he was getting a lot fewer socket hangups with pimatic 0.9 (much more recent nodejs version) anyway. Hopefully the combination means that this won’t be an issue soon.
I’ve also been playing with UI support for Hue scenes (basically by auto-configuring a ButtonsDevice), but I think I’ll await Pimatic 0.9 before including that, which should make it a lot easier to do auto-discovery of devices (including scenes . I’ll have a look at that soon.
Running happy still with hue zll
Just a question:
I am using a rule for my doorbell: when doorbell is activated one of my hue color lights is alternating red and blue for 10 seconds.
For now I had been using 2 “scenes” for that and a rule that starts these to scenes one after the other for 10 seconds. Is there a way to make this easier? Like “if doorbell is pressed then change color of huebol from red to Blue for 10 seconds” or something like that?
Hi @markbergsma,
nice work! It seems to work very smoothly.
I’m only missing the possibility to use rgb color codes or even color names like in pimatic-ledlight.
However, every time I’m restarting it seems that the plugin itself is adding a line in config.json:
error [pimatic]: Invalid config of pimatic-hue-zll: Property “name” is not a valid property
Cheers.
Are there any issues with the hue-zII plugin?
@temp probably the best plugin for pimatic there is. Check the github branche. It supports all light types, scenes, pimatic auto discovery (bulbs and bridge auto detect). It also supports different fade times.
I have 15 hue bulbs in my house (4 color, 11 whites). And they work perfectly.
I’ve published pimatic-hue-zll version 0.3.0 to npm. This release is all about Pimatic 0.9; although previous pimatic-hue-zll versions already worked fine with it, the new auto-discovery features in Pimatic 0.9 are now supported as well.
From the change log:
This version still seems to work with Pimatic 0.8 / nodejs 0.10; however I won’t test this going forward and further development will focus on Pimatic 0.9 and nodejs 4+ only.
If you have any issues, please report them on Github: https://github.com/markbergsma/pimatic-hue-zll/issues
Thanks!