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

Dim 0 command turns device on #272

Closed
ph4x0 opened this issue Nov 25, 2016 · 6 comments
Closed

Dim 0 command turns device on #272

ph4x0 opened this issue Nov 25, 2016 · 6 comments
Assignees
Milestone

Comments

@ph4x0
Copy link

ph4x0 commented Nov 25, 2016

Hi all together,

at first I want to thank you for this nice piece of software. At the the moment I just use it for publishing my fhem devices to my harmony hub so I can control all my lights with my harmony. But I'm still waiting for my invitation to buy an echo and control my devices by voice.

However, I have some troubles with the dim command of the ha bridge inside the webinterface and also on the harmony. If I dim a light to 0 percent it it is turned on by the on url. For testing purposes I replaced the on url with a dim 10 command and then when I dim to 0, the light is set to 10 percent ....

So definitely the percentage 0 command is replaced by the on command, but why?

Here are the examples of the command urls:

https://127.0.0.1:8084/fhem?cmd=set%20HM_LC_DIM_XXXXX%20on

https://127.0.0.1:8084/fhem?cmd=set%20HM_LC_DIM_XXXXX%20pct%20${intensity.percent}

https://127.0.0.1:8084/fhem?cmd=set%20HM_LC_DIM_XXXXX%20off

I hope we can investigate this problem because I have no clue why it is not working correctly

@bwssytems
Copy link
Owner

I'll take a look at what 0 gives. It should have been the off url.

@bwssytems bwssytems self-assigned this Nov 26, 2016
@ph4x0
Copy link
Author

ph4x0 commented Nov 27, 2016

I just tested the behavior of a hue passthru device and when you dim it to 0 percent (in webiniterface and harmony) the command is just ignored. I would prefer this behavior because often I just slide to to the minimum in the harmony to lower the light. It would be inconsistent when I dim all my lights to minimum, and all but hue devices are powered off.

@digiltd
Copy link
Contributor

digiltd commented Nov 28, 2016

I will throw the following into the conversation, not sure it is relevant to this issue but it is good thing to be aware of.

The minimum value for a Hue bulbs brightness is 1 (max of 254). So there is no 0.

Also the bulbs do not turn off when you set the brightness to minimum. Even though there might not be any light coming from a bulb at 1, it is still technically on.

From the api:

Brightness is a scale from 1 (the minimum the light is capable of) to 254 (the maximum). Note: a brightness of 1 is not off.

@bwssytems
Copy link
Owner

@digiltd That will help resolve this. Thanks

@bwssytems bwssytems added this to the V4.0.0 milestone Jan 9, 2017
@ph4x0
Copy link
Author

ph4x0 commented Jan 24, 2017

I tested the feature today and unfortunately it is not 100 percent correct implemented. Like digiltd allready mentioned, the hue bri state can only be between 1 and 254. In version 3.x the problem was that the dim 0 command was replaced with the on command but now it is bri 255. So the effect is that the light is turned off because 255 is not a valid state. So far so good but I think it would be the best to work like all other hue lamps. If you set bri 255 to a hue light it will internally set bri 254, also in all readings. So to be more at the hue api just allow bri 1 to bri 254.
Just to give more Information why this is not working well for me, I dim my lights with the logitech harmony and so I just swipe to the left to get the lowest dim value, All hue lights are set to bri 1 and still lighting but all my other lamps are now turned off (but they should not). It is much better now because they are not at full power anymore (was quite anoying in the night) but of is also not what I need.

@bwssytems bwssytems modified the milestones: v4.0.2, V4.0.0 Jan 24, 2017
@bwssytems
Copy link
Owner

Updating in 4.0.2

bwssytems added a commit that referenced this issue Jan 24, 2017
Fixes #272
Fixes #384
Fixes #387
Fixes #389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants