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

[miio] Wrong datatype for channel ambientBrightness in yeelink.light.ceiling4.json #9936

Closed
mrumpf opened this issue Jan 24, 2021 · 1 comment · Fixed by #13724
Closed

[miio] Wrong datatype for channel ambientBrightness in yeelink.light.ceiling4.json #9936

mrumpf opened this issue Jan 24, 2021 · 1 comment · Fixed by #13724
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@mrumpf
Copy link
Contributor

mrumpf commented Jan 24, 2021

It seems as if the datatype for the channel "ambientBrightness" is wrong in the device database JSON file:

For the channel "brightness" the type is defined as "Dimmer":

When defining a slider in a sitemap, the percentage value gets submitted as a fraction 0.68 for 68% and this gets rejected by the device. Even changing the value range of the slider to "step=1 minValue=1 maxValue=100" does not change the value being submitted to the devic.

Expected Behavior

The expected behaviour is that the channel is of type Dimmer and a Slider can be used in the sitemap to control the ambient light brightness in the same way it works for the main light brightness value.

Current Behavior

2021-01-24 11:05:10.345 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":70,"method":"bg_set_bright","params":[0.65000000]} -> 192.168.178.83 (Device: 158D3A35 token: CEBE3475
XXXXXXXXXXXXXXXX100059C3 Queue: 1).
2021-01-24 11:05:10.421 [TRACE] [nal.transport.MiIoAsyncCommunication] - Connection 192.168.178.83:60488
2021-01-24 11:05:10.533 [TRACE] [nal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 60 00 00 00 00 15 8D 3A 35 00 00 08 47
checksum: B2 3C FA 69 7A 74 62 83 ED 2D B8 87 7B 85 03 D5
content : 9D 10 98 3D B4 DB FF 5D 65 3C 75 92 3D 97 14 BE DA CB 90 80 46 82 11 5B 05 9B 1C 69 6E 5D 89 9A 86 97 AC 57 D7 06 03 AB B7 5A 4B 35 57 61 FB FD 44 83 DD 37 24 A4 26 54 8E D4 63 8F 39 61 66 BA
Header Details: Magic:21 31
Length:   96
Serial:   15 8D 3A 35
TS:1970-01-01 01:35:19
2021-01-24 11:05:10.535 [TRACE] [nal.transport.MiIoAsyncCommunication] - Received response from 192.168.178.83: {"id":70,"error":{"code":-5001,"message":"invalid params"}}

Possible Solution

The channel type should be changed from "Number" to "Dimmer":

Steps to Reproduce (for Bugs)

  1. Add a device of type yeelink-light-ceiling10 as defined here https://www.openhab.org/addons/bindings/miio/#yeelight-crystal-pendant-lamp-yeelink-light-ceiling10-item-file-lines
  2. Try to control the ambient brightness from Openhab

Context

I cannot control the brightness of the ambient light.

Your Environment

  • Version used: 3.0.0 (Build)
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...): Safari on Mac OSX
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...): Raspian 10.7
@mrumpf mrumpf added the bug An unexpected problem or unintended behavior of an add-on label Jan 24, 2021
Hilbrand pushed a commit that referenced this issue Feb 8, 2021
The ceiling10 Yeelight lamp has 2 dimmer for brightness:
"bright" for the main light and bg_bright for the ambient light.
Both are of type dimmer and accept percentage values between 1 and 100.
This fix changes the datatype of the bg_bright property from Number
to Dimmer in the device mapping database file ceiling4, which is also
the one that is used for the ceiling10 lamp.

Accepted without sign-off under minor change exemption.
themillhousegroup pushed a commit to themillhousegroup/openhab2-addons that referenced this issue May 10, 2021
…enhab#10065)

The ceiling10 Yeelight lamp has 2 dimmer for brightness:
"bright" for the main light and bg_bright for the ambient light.
Both are of type dimmer and accept percentage values between 1 and 100.
This fix changes the datatype of the bg_bright property from Number
to Dimmer in the device mapping database file ceiling4, which is also
the one that is used for the ceiling10 lamp.

Accepted without sign-off under minor change exemption.

Signed-off-by: John Marshall <[email protected]>
thinkingstone pushed a commit to thinkingstone/openhab-addons that referenced this issue Nov 7, 2021
…enhab#10065)

The ceiling10 Yeelight lamp has 2 dimmer for brightness:
"bright" for the main light and bg_bright for the ambient light.
Both are of type dimmer and accept percentage values between 1 and 100.
This fix changes the datatype of the bg_bright property from Number
to Dimmer in the device mapping database file ceiling4, which is also
the one that is used for the ceiling10 lamp.

Accepted without sign-off under minor change exemption.
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 5, 2022
…enhab#10065)

The ceiling10 Yeelight lamp has 2 dimmer for brightness:
"bright" for the main light and bg_bright for the ambient light.
Both are of type dimmer and accept percentage values between 1 and 100.
This fix changes the datatype of the bg_bright property from Number
to Dimmer in the device mapping database file ceiling4, which is also
the one that is used for the ceiling10 lamp.

Accepted without sign-off under minor change exemption.
@michiii1337
Copy link
Contributor

same bug with yeelink.light.light15.json, please fix

michiii1337 added a commit to michiii1337/openhab-addons that referenced this issue Oct 15, 2022
changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)
michiii1337 added a commit to michiii1337/openhab-addons that referenced this issue Oct 29, 2022
changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
jlaur pushed a commit that referenced this issue Oct 30, 2022
* Update yeelink.light.light15.json

changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue #9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
* Update yeelink.light.light15.json

changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
marcelrv added a commit to marcelrv/openhab-addons that referenced this issue Nov 15, 2022
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
lolodomo pushed a commit that referenced this issue Nov 16, 2022
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: #9936

Signed-off-by: Marcel Verpaalen <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 22, 2022
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Dec 24, 2022
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this issue Jan 8, 2023
* Update yeelink.light.light15.json

changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this issue Jan 8, 2023
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
* Update yeelink.light.light15.json

changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Feb 28, 2023
* Update yeelink.light.light15.json

changed Datatype form "Number" to "Dimmer" at channel "ambientBrightness"
same issue openhab#9936 (but already fixed)

Signed-off-by: Michi <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this issue Feb 28, 2023
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Jan 6, 2024
The majority of brightness channels were already converted to dimmer.
This PR applies same to the 'other'brightness channels like nightlight
and/or ambient

close: openhab#9936

Signed-off-by: Marcel Verpaalen <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants