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
All Tuya TS110E dimmers broke after update! Cannot update state in all models #16863
Comments
@Koenkk is it possible to fix that ? |
@chojnicki it won't fix the issue but I want to understand better what happens. Can you stop z2m, remove the device state from |
@Koenkk _TZ3210_zxbtub8r
_TZ3210_k1msuvg6
This how both of them looked like just after stop/start. I had to refresh manually every field. Lights were off, but after refreshing state again state |
@Koenkk I can even give you access to HA with Z2M and live stream to lamp if that will help you 😁 |
Is |
@Koenkk not sure if I understand correctly, so to be sure I will describe steps and provide logs again.
Logs from this step:
So yes, there is |
@chojnicki then the device reports the wrong state (1 = ON, 0 = OFF). I cannot do anything about that, it's a bug in the device firmware. This may be caused because we now control this device a little bit differently to workaround other bugs in the fw. Are there any other issues besides refreshing the state? |
@Koenkk But at least _TZ3210_zxbtub8r was working for months for me with Z2M until updates, and this device does not support OTA to be broken by firmware update 🤔 |
Could you check if the issue is fixed with the following external converter: const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_zxbtub8r', '_TZ3210_k1msuvg6']),
model: 'TS110E_1gang_1',
vendor: 'TuYa',
description: '1 channel dimmer',
fromZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
.fromZigbee.concat([tuya.fz.power_on_behavior]),
toZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
.toZigbee.concat([tuya.tz.power_on_behavior]),
exposes: [e.light_brightness()],
configure: async (device, coordinatorEndpoint, logger) => {
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
},
};
module.exports = definition;
external_converters:
- ext_converter.js
|
Nope, it removed min_brightness and max_brightness so for sure converted is loaded correctly, but refreshing state still gives exact same results. |
I described them in separate issue only for new model #16804. _TZ3210_zxbtub8r:
_TZ3210_k1msuvg6:
|
Can you provide the debug log when doing this with the latest known working version? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging. |
I did found way to downgrade Z2M in HA (addon) :/ I found git commands about switching branch, but I think this is for standalone z2m, no idea how to do this for HA addon. |
What was the last known working version? I can you provide you an external converter to match the behavior of that version. |
Like I said in first post, I updated Z2M (normal version, not edge) only while debugging new dimmer model, and I'm not sure what version was before, but probably around month old, so maybe 1.29.*. BUT to be clear, it was working for model _TZ3210_zxbtub8r (at least refreshing state), not _TZ3210_k1msuvg6. I updated Z2M and later switched to edge after I bought _TZ3210_k1msuvg6 that was not working. |
@chojnicki this external converter gives the behaviour from 1.28.2: const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
fingerprint: [{modelID: 'TS110E', manufacturerName: '_TZ3210_zxbtub8r'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_ngqk6jia'}],
model: 'TS110E_1gang',
vendor: 'Lonsonho',
description: 'Zigbee smart dimmer module 1 gang with neutral',
extend: extend.light_onoff_brightness(),
};
module.exports = definition; Can you try if it works with that? If not, since HA doesn't support downgrading, can you setup a separate z2m environment with the working version and provide me the debug logging? |
@Koenkk still exact same issues :/ Problem is - I have only one zigbee adapter, installed on computer with HA system. I cannot set up separate Z2M :( |
@Koenkk I forgot that I can just restore HA backup... Reversed to 1.29.2-1. Tested on
|
@chojnicki I think I understand what happens. In 1.29.2 there was a bug when refreshing state it would update |
@Koenkk Yes that's correct |
I see, so then the issue was also there in 1.29.2 but in 1.29.2 there is another bug which causes the state to be published on the wrong property ( |
Hm so I'm confused - what can be done about that? I understand that device firmware sucks, but at the same time on previous Z2M version it's at least usable :) |
@chojnicki device provides the wrong state so there is nothing we can do about that. What I can do is to disable the refresh button but this is tricky since I'm not sure this bug applies to all versions of this device. The easiest workaround would be to not click the refresh button |
@Koenkk problem is it's not just about refreshing in dashboard. Like eexplained previously, device updates state by itself after some time. So I turn light off, it becomes on with brightness 0 in HA by itself, so I cant turn light on again. |
@Koenkk more logs for you. I checked what's is up with that state reporting, and I see that device does report state correctly after turning light on/off directly in device (pins). Normally I'm not using that, just my own automations, by since device reports changed state, I thing it should do it also while refreshing or any other action? I'm using new device that as never connected to Z2M/HA, on version 1.29. Can you find something useful in that? Light is on, turn it off by pins on device:
Now turn it on by pins on device:
I'm NOT touching dashboard (no refresh state) so device is updating it by itself as it should. We can see that Now tests in dashboard: Light is on, turn it off by dashboard:
It updated state correctly in dashboard, but let's click refresh state anyway:
Turn on in dashboard:
Refresh:
|
@chojnicki when using z2m 1.30.2 and not using any external converter and clearing the state (stop z2m, remove from data/state.json and start z2m), does the |
@Koenkk I will make sure later, but if I remember correctly, 95% for no. |
@Koenkk did that, and not there is no Removed from state.json, started addon and just waited:
After refreshing everything (while light is off) and then clicking refresh state:
Light is on, clicked refresh state - dashboard now shows it as off (but it is still on):
Edit: plus bonus logs with that brightness decreasing -1 issue. Maybe related, maybe not...
|
@chojnicki this is the same as we already found in #16863 (comment) Device returns the wrong state when doing a GET. I cannot do anything about that, its a bug in the firmware of the device. The reason why this didn't happend in earlier z2m versions is because a GET would update the |
The one with decreasing brightness to -1 by itself. But about state - it's not only while clicking refresh, device or z2m/hs is updating this by itself. That's why I even noticed this. |
This one should be fixable, pushed a possible fix.
Can you provide the debug log when the device state updates by itself? |
Hi @Koenkk
The light l2 is ON, I set brightness:230 on Endpoint: l2:
I check (publish:get) brightness on Endpoint: l2 now:
and got brightness:251, I had previously set brightness:230. What exactly do mean: |
@jacekmarek could you provide the herdsman debug log when setting the brightness? See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable the herdsman debug logging. Note that this is only logged to STDOUT and not to log files. |
Similar as what we saw with @chojnicki were it reported the wrong state when doing a GET, yours reports a wrong brightness after doing a GET ( |
@Koenkk Thanks for anwser. |
Hi @Koenkk
This proves that you can read the brightness level correctly from the device, when I try to read from Z2M, I get a message UNSUPPORTED_ATTRIBUTE, why? Where is the problem? I also did a test with ZHA, also everything works fine, there are no problems as described @chojnicki : |
That is interesting, do you have any ZHA debug logging so I can see what requests it send? |
No, I don't because I did it quickly, I don't use ZHA integration in my HA, I've been using Z2M forever :). |
I have a _TZ3210_3mpwqzuu that also incorrectly reports the state when pressing the refresh button or reading the genOnOff Attribute using the dev console. This is only really a problem because either Home Assistant or Z2M will occassionally refresh the state automatically resulting in an incorrect reported status. The physical switches, set to toggle, are however always able to correcty switch the lamps on and off regardless of which state they report. @Koenkk |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
The issue still exists. |
I have 5 of these devices which I recently installed. 4 out of 5 work, however they are extremely slow to respond. Sometimes not at all. 1 of the 5 just refused to respond to any commands. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
@Koenkk Is it possible to reopen this? issue still exists at least for _TZ3210_3mpwqzuu |
@patapovich what issues are still present with z2m 1.35.1? |
Erratic brightness level reports in HA vs. setting, and the biggest issue is the state of L1 and L2 (on vs. off) usually being reported inverted when changed through Home Assistant. I have a CC2531 stick on the way so that I can sniff the traffic and compare Zigbee2MQTT to the Tuya gateway, but it is still in transit. |
Can you provide the debug log of this? See this on how to enable debug logging. |
Issue still persist.. :( |
I am also experiencing some of these issues with my TS110E_2gang_1 (_TZ3210_3mpwqzuu), specifically:
I will gladly provide any assistance in the form of debug logs if asked, considering that the onOff cluster seems to work properly I think this should be hopefully possible to remedy. |
So I have created external converter file by copying code from here but excluded the |
What happened?
I already reported issue with this dimmer in #16804 but it's not exactly related, that's why I need to make new one. In previous one it was about wrong support for new model/firmware
_TZ3210_k1msuvg6
. But I already have_TZ3210_zxbtub8r
and_TZ3210_wdexaypg
(2 gang) that was working before.While debugging
_TZ3210_k1msuvg6
i updated Z2M (not sure what version I had before, but something around month old), and then tried Edge. But while doing this, my old dimmers broke. When I refresh state, it always shows ason
, but it's not true. Not only that - it showson
withbrightness
0` - or maybe it really starts it with 0, not sure, and why would it do that.So when I really click to turn on, it starts with brightness 0. What's worse - HA updates it in some period by itself (not sure why, but not important). Because of that, all my light become unusable, because I can't turn them on by automation (they start with brightness 0).
Note that I DO NOT have custom converters. I also tried converter from #16804 shared by @Berlusconi13, and multiple other converters I found in old TS110E issues, but none of them fixes that problem. Of course same situation on both latest and edge version. I tried to tweak converter by myself, but no luck. My guess is that is somewhere deeper in tuya libs.
Since there is no easy way to downgrade addon in HomeAssistant - I'm without lights. My wife will kill me, so pleeease @Koenkk heeelp 🆘
What did you expect to happen?
Correct state update
How to reproduce it (minimal and precise)
Refresh state
Zigbee2MQTT version
1.30.1
Adapter firmware version
0x26680700
Adapter
ConBee2
Debug log
(turned off with max brightness from dashboard)
Info 2023-03-01 18:03:53MQTT publish: topic 'zigbee2mqtt/office_ceiling_lamp', payload '{"brightness":0,"brightness_1":254,"last_seen":"2023-03-01T17:04:31.057Z","linkquality":95,"max_brightness":255,"min_brightness":1,"power_on_behavior":"previous","power_on_behavior_1":"previous","state":"OFF","state_1":"OFF","switch_type":"momentary"}'
(click refresh state)
Debug 2023-03-01 18:03:59Received MQTT message on 'zigbee2mqtt/office_ceiling_lamp/get' with data '{"state":""}'
Debug 2023-03-01 18:03:59Publishing get 'get' 'state' to 'office_ceiling_lamp'
Debug 2023-03-01 18:03:59Received Zigbee message from 'office_ceiling_lamp', type 'readResponse', cluster 'genOnOff', data '{"onOff":1}' from endpoint 1 with groupID null
Info 2023-03-01 18:03:59MQTT publish: topic 'zigbee2mqtt/office_ceiling_lamp', payload '{"brightness":0,"brightness_1":254,"last_seen":"2023-03-01T17:04:37.486Z","linkquality":95,"max_brightness":255,"min_brightness":1,"power_on_behavior":"previous","power_on_behavior_1":"previous","state":"ON","state_1":"OFF","switch_type":"momentary"}'
The text was updated successfully, but these errors were encountered: