Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k
stars
199
forks
source link
Harmony dimming control: scaling and resetting brightness intensity #1324
I'm very grateful to be able to use ha-bridge - it's really very useful. I'm using it to control my Hue scenes and brightness from my Harmony with dummy ha-bridge devices, as the Harmony native processes are no longer working properly.
I've two questions about the dimming processes. I've got things working fully, but wonder if I'm missing something.
Changing the number of dimmable steps
When Harmony changes the brightness intensity, the increment actioned by ha-bridge is 10% or 25 (on the scale between 1 and 254). Is there any way to change this? I want to use three rather than ten different brightness levels, and my workaround is to rescale using the expression {"bri": ${intensity.math(((X-179)/75)*253+1)}}. This works very well, but is there any way to change the way ha-bridge handles the determination of intensity natively? So, in my example, can I make ha-bridge change the intensity parameter it holds by 33% when a Harmony dim instruction is received?
Resetting ha-bridge retained value for brightness intensity
When I turn on a scene for the first time, or change to that scene from another scene, I'd like the new scene to come on at full brightness. This is the standard Harmony behavior, and you can see from the ha-bridge logs that the Harmony sends a request to set brightness to 254, but I can't find a way to implement that. If I send a brightness command as part of the http On Item, it is immediately overridden by a subsequent brightness command from ha-bridge to Hue resetting the intensity to the existing value stored in ha-bridge. So if that ha-bridge device had previously been dimmed, then the intensity will not be 254. Is there a way to reset the ha-bridge retained value for intensity when the ha-bridge device is set to On?
By the way, the Items in my dummy devices are set as http Type. I've not been able to make them control the Hue if I set them as Hue type.
I'm very grateful to be able to use ha-bridge - it's really very useful. I'm using it to control my Hue scenes and brightness from my Harmony with dummy ha-bridge devices, as the Harmony native processes are no longer working properly.
I've two questions about the dimming processes. I've got things working fully, but wonder if I'm missing something.
Changing the number of dimmable steps When Harmony changes the brightness intensity, the increment actioned by ha-bridge is 10% or 25 (on the scale between 1 and 254). Is there any way to change this? I want to use three rather than ten different brightness levels, and my workaround is to rescale using the expression {"bri": ${intensity.math(((X-179)/75)*253+1)}}. This works very well, but is there any way to change the way ha-bridge handles the determination of intensity natively? So, in my example, can I make ha-bridge change the intensity parameter it holds by 33% when a Harmony dim instruction is received?
Resetting ha-bridge retained value for brightness intensity When I turn on a scene for the first time, or change to that scene from another scene, I'd like the new scene to come on at full brightness. This is the standard Harmony behavior, and you can see from the ha-bridge logs that the Harmony sends a request to set brightness to 254, but I can't find a way to implement that. If I send a brightness command as part of the http On Item, it is immediately overridden by a subsequent brightness command from ha-bridge to Hue resetting the intensity to the existing value stored in ha-bridge. So if that ha-bridge device had previously been dimmed, then the intensity will not be 254. Is there a way to reset the ha-bridge retained value for intensity when the ha-bridge device is set to On?
By the way, the Items in my dummy devices are set as http Type. I've not been able to make them control the Hue if I set them as Hue type.
Thanks