Comments (7)
@itavero this was a fast bug fixing, thank you. I can confirm that v1.1.1 works with my RGB lights.
from homebridge-z2m.
This sounds like a bug. I personally almost never change colors and I'm not even sure if I own lights that support color_hs
, so I might have missed it.
Can you maybe fill in the questions from the Bug report issue template?
I've copied the template here:
Related devices
Are you experiencing this behavior with a particular device?
Please list which device(s) you experience this with.
To Reproduce
Steps to reproduce the behavior, for example:
- Change '...' via the Home app.
- Log shows MQTT message '...' being published to topic '...'
- The device does the following: '...'
Expected behavior
A clear and concise description of what you expected to happen, compared to what actually happened.
MQTT messages
If possible (and applicable), please provide the following:
- The device entry from
zigbee2mqtt/bridge/devices
(note: this is different fromzigbee2mqtt/bridge/config/devices
) - Status update from
zigbee2mqtt/[FRIENDLY_NAME]
- Messages published by this plugin that might be related to your issue (can also be seen in the homebridge logs)
Versions used
Please provide the version of the following pieces of software:
- This plugin
- Homebridge
- Zigbee2MQTT (can be found in MQTT topic
zigbee2mqtt/bridge/info
) - Homebridge Config UI X (if applicable)
from homebridge-z2m.
Just checked and there is indeed a bug in the code, in both handleSetHue and handleSetSaturation.
Also need to make sure that the queueDataForSetAction
merges the nested objects correctly, which I doubt will be the case right now.
@mattes-bru If you could provide me with at least the device entry from zigbee2mqtt/bridge/devices
(note: this is different from zigbee2mqtt/bridge/config/devices
), that would save me some time when writing the automated test to verify this bug.
from homebridge-z2m.
@itavero thank you for looking into this. I did a small test and it seems that the values for hue and saturation are correct. Both values change to a promising number when I change the color in the HomeKit app. So the objects seem to be merged correctly.
{
"date_code": "20140331CNWT****",
"definition": {
"description": "LIGHTIFY LED CLA60 E27 RGBW",
"exposes": [
{
"features": [
{
"access": 7,
"description": "On/off state of this light",
"name": "state",
"property": "state",
"type": "binary",
"value_off": "OFF",
"value_on": "ON",
"value_toggle": "TOGGLE"
},
{
"access": 7,
"description": "Brightness of this light",
"name": "brightness",
"property": "brightness",
"type": "numeric",
"value_max": 254,
"value_min": 0
},
{
"access": 7,
"description": "Color temperature of this light",
"name": "color_temp",
"presets": [
{
"description": "Coolest temperature supported",
"name": "coolest",
"value": 150
},
{
"description": "Cool temperature (250 mireds / 4000 Kelvin)",
"name": "cool",
"value": 250
},
{
"description": "Neutral temperature (370 mireds / 2700 Kelvin)",
"name": "neutral",
"value": 370
},
{
"description": "Warm temperature (454 mireds / 2200 Kelvin)",
"name": "warm",
"value": 454
},
{
"description": "Warmest temperature supported",
"name": "warmest",
"value": 500
}
],
"property": "color_temp",
"type": "numeric",
"unit": "mired",
"value_max": 500,
"value_min": 150
},
{
"access": 7,
"description": "Color temperature after cold power on of this light",
"name": "color_temp_startup",
"presets": [
{
"description": "Coolest temperature supported",
"name": "coolest",
"value": 150
},
{
"description": "Cool temperature (250 mireds / 4000 Kelvin)",
"name": "cool",
"value": 250
},
{
"description": "Neutral temperature (370 mireds / 2700 Kelvin)",
"name": "neutral",
"value": 370
},
{
"description": "Warm temperature (454 mireds / 2200 Kelvin)",
"name": "warm",
"value": 454
},
{
"description": "Warmest temperature supported",
"name": "warmest",
"value": 500
},
{
"description": "Restore previous color_temp on cold power on",
"name": "previous",
"value": 65535
}
],
"property": "color_temp_startup",
"type": "numeric",
"unit": "mired",
"value_max": 500,
"value_min": 150
},
{
"description": "Color of this light in the CIE 1931 color space (x/y)",
"features": [
{
"access": 7,
"name": "x",
"property": "x",
"type": "numeric"
},
{
"access": 7,
"name": "y",
"property": "y",
"type": "numeric"
}
],
"name": "color_xy",
"property": "color",
"type": "composite"
},
{
"description": "Color of this light expressed as hue/saturation",
"features": [
{
"access": 7,
"name": "hue",
"property": "hue",
"type": "numeric"
},
{
"access": 7,
"name": "saturation",
"property": "saturation",
"type": "numeric"
}
],
"name": "color_hs",
"property": "color",
"type": "composite"
}
],
"type": "light"
},
{
"access": 2,
"description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
"name": "effect",
"property": "effect",
"type": "enum",
"values": [
"blink",
"breathe",
"okay",
"channel_change",
"finish_effect",
"stop_effect"
]
},
{
"access": 1,
"description": "Link quality (signal strength)",
"name": "linkquality",
"property": "linkquality",
"type": "numeric",
"unit": "lqi",
"value_max": 255,
"value_min": 0
}
],
"model": "AC03645",
"supports_ota": true,
"vendor": "OSRAM"
},
"endpoints": {
"3": {
"bindings": [
{
"cluster": "genOnOff",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b0021cc4c9b",
"type": "endpoint"
}
},
{
"cluster": "genLevelCtrl",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b0021cc4c9b",
"type": "endpoint"
}
}
],
"clusters": {
"input": [
"touchlink",
"genBasic",
"genIdentify",
"genGroups",
"genScenes",
"genOnOff",
"genLevelCtrl",
"lightingColorCtrl",
"manuSpecificOsram"
],
"output": [
"genOta"
]
},
"configured_reportings": [
{
"attribute": "onOff",
"cluster": "genOnOff",
"maximum_report_interval": 3600,
"minimum_report_interval": 0,
"reportable_change": 0
},
{
"attribute": "currentLevel",
"cluster": "genLevelCtrl",
"maximum_report_interval": 3600,
"minimum_report_interval": 5,
"reportable_change": 1
}
]
}
},
"friendly_name": "0x7cb03eaa00ac82f3",
"ieee_address": "0x7cb03eaa00ac82f3",
"interview_completed": true,
"interviewing": false,
"model_id": "CLA60 RGBW OSRAM",
"network_address": 35569,
"power_source": "Mains (single phase)",
"software_build_id": "V1.05.10",
"supported": true,
"type": "Router"
}
from homebridge-z2m.
Thanks for the device model. I think I'll have some time to fix this in the coming few days. I'll make a release afterwards ;)
With regards to merging the objects: right now it goes OK, but it basically merges these objects:
-
{ "saturation": 100 }
-
{ "hue": 0 }
However, the two objects should actually be:
-
{ "color": { "saturation": 100 } }
-
{ "color": { "hue": 0 } }
I'm not sure yet if the nested objects will be merged correctly with my current code, but that can be tested easily. Just a note for myself that I do explicitly test this 😉
from homebridge-z2m.
Checks haven't completed yet and my lunch break is over, but I think I've fixed the issue (as you can see in the PR mentioned above).
I'll probably make a release later today.
from homebridge-z2m.
@mattes-bru This should be fixed in v1.1.1 which has just been released.
from homebridge-z2m.
Related Issues (20)
- [Device] Niko Wireless Zigbee Switch (battery, single button) HOT 4
- [Bug] Failed to process MQTT message on 'zigbee2mqtt/bridge/devices'. (Maybe check the MQTT version?) HOT 10
- [Bug] problem after upgrading zigbee2mqtt to 1.35 HOT 37
- [Bug] HOT 1
- CI: set-output is deprecated
- [Bug] TypeError: Cannot read properties of undefined (reading 'getCharacteristic') HOT 8
- Ikea SOMRIG Switch activities not reaching Homebridge [Bug] HOT 5
- [Bug] Can not get new devices into HomeKit after upgrading to 1.35 and 1.9.3 HOT 2
- [Bug] plugin crashes HOT 4
- [Device] Vimar roller shutter HOT 1
- [device support] Frient EMIZB-141 HOT 7
- [Bug] The BIG scene in Homekit doesn't work completely. HOT 23
- [Device] Aqara ZNLDP13LM - full brightness instead of previous when switched ON via Home App HOT 6
- [Bug] Tuya button not working in Homekit - Tuya SH-SC07 HOT 13
- [Bug] Specific grouped devices with scenes In z2m do not survive restarts HOT 8
- [Bug] Running the Mac OS - Homebridge Zigbee2MQTT - doesn't really start up when the Mac OS boots up. HOT 30
- [Feature] HOT 2
- [Feature] Expose dimmer switch as Fan HOT 4
- [Bug] `TargetPosition` of `WindowCovering` shouldn't update while in motion HOT 13
- [Bug] Coordinator device: Cannot read properties of null (reading 'vendor') HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-z2m.