wzwenzhi / Wenzhi-ZigBee2mqtt

How to add wenzhi ZigBee sensor to ZigBee2mqtt
13 stars 5 forks source link

Support turning off data reporting ZigBee presence sensor models #11

Open wzwenzhi opened 3 months ago

wzwenzhi commented 3 months ago

2024.8.24

WZ75 series:ZigBee 5.8G circular(MTG075-ZB-RL) , ZigBee 24G circular(MTG275-ZB-RL) , ZigBee 5.8G ceiling(MTG035-ZB-RL) , ZigBee 24G ceiling(MTG235-ZB-RL);
JS: https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/blob/main/mtg035_radar_240701.js Old versions require firmware updates to achieve this feature. Please send your device ID to any customer service representative of our store after accessing the Smart Life app (please do not leave a message for the Choice store). If you can update the firmware through the bin file, please download the file in the attachment. WZ75-zigbee_upgrade_package.zip

X85series:MTD085 JS: https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/blob/main/mtd085_convertor_240628.js

M100 5.8GHz radar series: ZigBee 5.8G wall mount(WZ-M100/WZ-M100-W) , ZigBee 5.8G ceiling mount(WZ-M100-C)
The approach adopted in this series is to set a reporting time interval to avoid frequent data reporting. JS: https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/blob/main/wenzhi_tuya_M100_240704.js

Note: The M100 series 24Ghz radar version is currently not supported, and this feature is under development.Older versions may not support remote firmware updates. So if you mind, we suggest purchasing the 5.8G version of this series in our store first. The 5.8G radar in this series has excellent performance.

wzwenzhi commented 3 months ago

If you have better suggestions. Please leave a message for us.

wzwenzhi commented 3 months ago

If you have better suggestions. Please leave a message for us.

Our store: https://wenzhifactory.aliexpress.com/

jphooiveld commented 2 months ago

Can you flash the firmwares from the WZ75-zigbee_upgrade_package.zip file through the OTA procedure in Zigbee2MQTT? I tried to add the firmware files manually and add the converters but Zigbee2MQTT can't seem to find the firmwares in OTA for all the MTG275-ZB-RL devices I have registered in it.

java-devil commented 2 months ago

Guys @wzwenzhi - are you aware of the existence of this issue in Home Assistant: https://github.com/Koenkk/zigbee2mqtt/issues/19045 ?

(notice how many people are pained by this very problem)

What we really need are the Zigbee OTA files that you clearly have since you are able to push them on request. All we need are the binaries and then the community should be able to take over from there :)

Other than this your products are amazing. Please help us help you make it usable for all Home Assistant users.

mremedi2023 commented 2 months ago

Hi, same problem here, these sensors flood the data buffer causing me to have to restart my coordinator every 2 days, I'm about to get rid of them. Sensor: Tuya MTG075-ZB-RL

kkossev commented 2 months ago

I can confirm that TS0601 _TZE204_ya4ft0w4 (tuyaVersion: 1.0.10) effectively disables the spammy distance reporting and these are not sent every second on the air anymore! 👍 (Tuya DP=101)

Thank you @wzwenzhi !

kkossev commented 2 months ago

@wzwenzhi is this the right link to your store and the correct device (the non-spammy one TS0601 _TZE204_ya4ft0w4 ) ?

https://www.aliexpress.com/item/1005004704966668.html

image

jkaberg commented 2 months ago

Any ETA on M100 series 24Ghz firmware @wzwenzhi ?

cowbe0x004 commented 2 months ago

I have a MTG275-ZB-RL and added mtg035_radar_240701.js to the zigbee2mqtt folder and external converter, I'm getting this error, [2024-10-02 20:23:32] error: z2m: Failed to load external converter file 'mtg035_radar_240701.js' (tuya.tz.datapoints.key is not iterable) [2024-10-02 20:23:32] error: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version [2024-10-02 20:23:32] error: z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device

Do I need to update firmware for this converter to work? I don't have a tuya gateway.

jkaberg commented 1 month ago

Any ETA on M100 series 24Ghz firmware @wzwenzhi ?

@wzwenzhi ?? The device is unusable as it is (spamming the zigbee network), you need to provide an new firmware for OTA ASAP!

JeroenTuinstra commented 1 month ago

The converter file does not want to load:

2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] error:  z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
-- | -- | --
2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] error:  z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] error:  z2m: Failed to load external converter file 'mtg035_radar_240701.js' (tuya.tz.datapoints.key is not iterable)

Am quite at a loss at getting the device MTG275-ZB-RL TS0601_TZE204_dtzziy1e to not flood my zigbee network. I don't even know where to find the firmware version, or is that only available through a TUYA Zigbee Gateway. Currently using the SLZB-06 LAN to Zigbee coordinator.

Am more than willing to buy a Tuya Zigbee Gateway to update the device, as I love the design. Some help at getting these devices stable would be great!

cowbe0x004 commented 1 month ago

The converter file does not want to load:

2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] �[31merror�[39m:  z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
-- | -- | --
2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] �[31merror�[39m:  z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
2024/10/23 12:21:47 | stdout | [2024-10-23 12:21:47] �[31merror�[39m:  z2m: Failed to load external converter file 'mtg035_radar_240701.js' (tuya.tz.datapoints.key is not iterable)

Am quite at a loss at getting the device MTG275-ZB-RL TS0601_TZE204_dtzziy1e to not flood my zigbee network. I don't even know where to find the firmware version, or is that only available through a TUYA Zigbee Gateway. Currently using the SLZB-06 LAN to Zigbee coordinator.

Am more than willing to buy a Tuya Zigbee Gateway to update the device, as I love the design. Some help at getting these devices stable would be great!

same error as mine, you'll need to flash the firmware first, which no one other than @wzwenzhi knows how to do, but he aint replying...

mremedi2023 commented 1 month ago

Same here, I decided to buy a Tuya LAN gateway (I think Moes is the brand) and put these devices on that gateway, I had to do the same with a Tuya ammeter that also flooded the data bus

El mié, 23 oct 2024 a la(s) 8:14 a.m., Andréw Hüang ( @.***) escribió:

The converter file does not want to load:

2024/10/23 12:21:47 stdout [2024-10-23 12:21:47] �[31merror�[39m: z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
2024/10/23 12:21:47 stdout [2024-10-23 12:21:47] �[31merror�[39m: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
2024/10/23 12:21:47 stdout [2024-10-23 12:21:47] �[31merror�[39m: z2m: Failed to load external converter file 'mtg035_radar_240701.js' (tuya.tz.datapoints.key is not iterable)

Am quite at a loss at getting the device MTG275-ZB-RL TS0601_TZE204_dtzziy1e to not flood my zigbee network. I don't even know where to find the firmware version, or is that only available through a TUYA Zigbee Gateway. Currently using the SLZB-06 LAN to Zigbee coordinator.

Am more than willing to buy a Tuya Zigbee Gateway to update the device, as I love the design. Some help at getting these devices stable would be great!

same error as mine, you'll need to flash the firmware first, which no one other than @wzwenzhi https://github.com/wzwenzhi knows how to do, but he aint replying...

— Reply to this email directly, view it on GitHub https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/issues/11#issuecomment-2431768220, or unsubscribe https://github.com/notifications/unsubscribe-auth/BENWU6WIBUSMIO5MA3SNNBTZ46AKJAVCNFSM6AAAAABNBGOVQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZRG43DQMRSGA . You are receiving this because you commented.Message ID: @.***>

jvdburgt commented 1 month ago

For all of you struggling with this issue, a solution has been found and is presented here: https://github.com/Koenkk/zigbee2mqtt/issues/19045#issuecomment-2424843697

Although this is a non-OTA solution, it's very workable and only requires a $3 usb-stick, $2 dupont cables (both available on AE) and about 20 minutes of your time to figure out the steps.

With that, you can flash your presence sensors in <5 minutes per sensor.

cowbe0x004 commented 1 month ago

For all of you struggling with this issue, a solution has been found and is presented here: Koenkk/zigbee2mqtt#19045 (comment)

Although this is a non-OTA solution, it's very workable and only requires a $3 usb-stick, $2 dupont cables (both available on AE) and about 20 minutes of your time to figure out the steps.

With that, you can flash your presence sensors in <5 minutes per sensor.

this doesn't work for MTG275-ZB-RL.

jkaberg commented 1 month ago

For all of you struggling with this issue, a solution has been found and is presented here: Koenkk/zigbee2mqtt#19045 (comment)

Although this is a non-OTA solution, it's very workable and only requires a $3 usb-stick, $2 dupont cables (both available on AE) and about 20 minutes of your time to figure out the steps.

With that, you can flash your presence sensors in <5 minutes per sensor.

while I appreciate the (hard) work and time put into that solution IMHO it's not feasible to expect users to fix manufacturer firmware or that we need to buy third party developer equipment to do so, it's the responsibility of the manufacturer to provide firmware fixes via OTA updates as per Zigbee design.

jvdburgt commented 1 month ago

I could not agree with you more. This is a major letdown of its customers by Tuya and for me personally has resulted in considering other brands in the future.

Having said that, just wanted to point out a workaround that some of you may be interested in 😇

JeroenTuinstra commented 1 month ago

@jvdburgt Thanks for this link - I had found this tread already, but got lost in the many messages. Also downloaded the repository but didn't find the windows executable. I will have to go through the tread again and filter out the real steps as many things are still unclear.

JeroenTuinstra commented 1 month ago

@jvdburgt Where can I actually find the new firmware for the TS0601_TZE204_dtzziy1e. I only see links for the ZY-M100.

cowbe0x004 commented 1 month ago

@jvdburgt Where can I actually find the new firmware for the TS0601_TZE204_dtzziy1e. I only see links for the ZY-M100.

First post, WZ75-zigbee_upgrade_package.zip

jvdburgt commented 1 month ago

@jvdburgt Thanks for this link - I had found this tread already, but got lost in the many messages. Also downloaded the repository but didn't find the windows executable. I will have to go through the tread again and filter out the real steps as many things are still unclear.

Yeah, it might be helpful to read the posts in reversed order, so from last post backwards 😅

JeroenTuinstra commented 1 month ago

@cowbe0x004 So this "trick" doesn't work with the MTG275-ZB-RL? You have tried it? I read here that someone has flashed the _TZE204-ztc6ggyl with this method or am I wrong: https://github.com/Koenkk/zigbee2mqtt/issues/19045#issuecomment-2397548578

cowbe0x004 commented 1 month ago

@cowbe0x004 So this "trick" doesn't work with the MTG275-ZB-RL? You have tried it? I read here that someone has flashed the _TZE204-ztc6ggyl with this method or am I wrong: Koenkk/zigbee2mqtt#19045 (comment)

TS0601_TZE204_dtzziy1e is the one I'm talking about, not ztc6ggyl.

JeroenTuinstra commented 1 month ago

So there is no solution for that version? I have the _TZE204_dtzziy1e version.

JeroenTuinstra commented 1 month ago

Interestingly, I bought a Tuya Zigbee Gateway today and when I connected the device to the gateway it indicated that there was an update for the MCU. This was without intervention of @wzwenzhi. So it seems Tuya themselves are now distributing the correct firmware. Zigbee traffic has gone down considerably.

IMG_3559

HA-TB303 commented 1 month ago

Ok, good tip. Ordered one as well. Always handy to update other tuya devices.

jphooiveld commented 1 month ago

@JeroenTuinstra, I have five of the same devices as you (_TZE204_dtzziy1e). I ordered the Tuya gateway which arrived today but it can't seem to find the updates. It says here that the Zigbee Module is on firmware v1.0.6 and and MCU Module is on firmware v1.0.3, so I would expect it to find the update to v1.0.5 for the MCU Module but alas no luck at the moment.

Did it find the updates right away or did it take some time? Maybe they're releasing it in phases... my location is The Netherlands for my Tuya account.

JeroenTuinstra commented 1 month ago

@jphooiveld It found it instantly. I am in Belgium. I did contact the store, but they requested an ID and I didn't have the gateway at that moment, so I never gave them the ID. But connecting them to the Gateway gave me right away the option to update the MCU.

jphooiveld commented 1 month ago

Thanks for the reply @JeroenTuinstra. I left the gateway and one presence sensor online for the whole night but no update unfortunately. Even tried a new burner account with location set to Belgium but that didn't work either. Maybe just try again in a few weeks time. Nothing I can do for now.

markhaines commented 4 weeks ago

I've successfully managed to update some ZY-M100 devices using the ST-Link dongle + replacement firmware method am now trying to sort my MTG235-ZB-RL devices which are showing the same 'noisy' behaviour. From reading this thread have I understood it right that the only to currently get the firmware upgraded is if I buy a Tuya gateway, join them to that and let them receive it OTA? I can't do it using z2m OTA or manually via the dongle?

HA-TB303 commented 4 weeks ago

Can't speak for the Tuya ZY-M100-L, but the ZY-M100-24G won't upgrade using the Tuya gateway. "No firmware update available."

jphooiveld commented 3 weeks ago

@markhaines, that's the only method sofar. I did purchase both a ST-link and a J-link dongle but did nog manage to backup and flash my MTG-275 which is a very similar device to yours. I'm also not very knowledgeable on electronics engineering and printed circuit bords so I was just messing around and guessing where to connect the pins (which obviously failed).

Thankfully I had orderded three devices through the Wenzhi store on Aliexpress and they were happy to help even for two devices purchased in another shop. Unfortunately the Tuya gateway broke down afther updating the first sensor so I even had to purchase a second one. I did notice that all the sensors got pushed update V1.0.5 and after that I immediately got another update to V1.0.6.

I purchased the sensors quite some time ago and it seems the firmware V1.0.3 does not recognize that there is an update available for it. My guess from the post of @JeroenTuinstra that he was on V1.0.4?

Shout out for the Wenzhi store by the way. They were very helpful in the chat. A pleasant experience.

My zigbee network is working fine again. I notice that my zigbee dongle (SLZB-06M) is running quite a few degrees cooler now without all the spam.

markhaines commented 3 weeks ago

@jphooiveld that's interesting. I wonder if it's possible to pull the firmware version using Zigbee2MQTT - at the moment I can't see which firmware version my units currently have. I don't mind taking a punt on buying a Tuya gateway to solve the problem - they're the only devices I have left on an old Sonoff network, separated from my new SLB-06 based network.

Is this like the gateway you used? https://www.aliexpress.com/item/1005005703607711.html

jphooiveld commented 3 weeks ago

@markhaines, that's the first one I used and that broke down. I also had a lot of issues with the wifi. After updating the first sensor of five the gateway broke down and stayed offline no matter what I did. I could reset it and register on the Tuya cloud but it would not initialize anymore. I don´t know if all the traffic and the update at the same time was too much or that I just had a faulty unit ;)

The second one I ordered was the following one with ethernet port (Wired Hub):

https://nl.aliexpress.com/item/1005005225025973.html

This one was much easier to setup and I had no issues. Up to you which one you choose.

JeroenTuinstra commented 3 weeks ago

@jphooiveld, yes I was on 1.0.4 and when I connected to the gateway I right away got the update. I didn't see the update to 1.0.6, but I will try to connect one of them again to the gateway and see if he gets the update.

This is the gateway I got: https://www.amazon.com.be/dp/B09185N7MN?ref=ppx_yo2ov_dt_b_fed_asin_title

markhaines commented 3 weeks ago

I bought a similar zigbee hub from Amazon which turned up this morning. Set it up with SmartLife app, let SmartLife update the hub to latest firmware, then joined the 4 x problem sensors to it. Interestingly it identified all of the sensors as at v1.06 (seemingly without having had any firmware updates flagged). I then rejoined the sensors over to my 'new' main zigbee network (run by a PoE SLB-06 controller). Having checked the z2m Map I can see that 3 of the 4 are still merrily chatting away every second. Interestingly the other one doesn't exhibit the same behaviour.

Not sure what my next move is, as I only have 3 x problem units I might not care if it doesn't impact the responsiveness of the overall mesh. I mainly wanted to drop down from 2 to 1 zigbee networks, which I have been able to do since fixing the issue on the M100 devices (I have 6 or so of those running). Alternatively I could take a punt and try buying a new unit from Aliexpress and see if they've fixed the issue. Or maybe the 5.8Ghz version rather than the 24Ghz one? I want to stick with this model though as I use the relay feature to control extractor fans in the bathrooms.

jphooiveld commented 3 weeks ago

@markhaines, I don´t know if you already did but add the mtg035_241016.js converter to zigbee2mqtt as external converter. See https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/blob/main/mtg035_241016.js

After restarting zigbee2mqtt you should have a new option under "Exposes" named "Distance Report". It's also available in home assistant itself for that sensor. After you turn it "off" it should reduce the network traffic.

I must admit that I didn't have to set it to "off" here to reduce the traffic. I do have a different device (MTG-275), so I have no clue if the firmware updates are completely the same for both. Otherwise try to ask for help from the Wenzhi chat on aliexpress.

markhaines commented 3 weeks ago

Wasn't aware of that - will give it a try later! Thanks

KeithL52 commented 11 hours ago

Just for interest, I have several of the MTGxx5-ZB-RL series presence sensors, all the 24G models, some wall mounted and some ceiling mounted, I have them all in Zigbee2MQTT and after some effort on the latest firmware which reduces the number of distance reports, it seems to be working.

I purchased an ethernet Tuya Zigbee Hub to do the updates, mine is a Moes brand.

For the wall mounted MTG275-ZB-RL

TS0601_TZE204_dtzziy1e this one is supported by Zigbee2MQTT out of the box. I updated it to the latest firmware using the Tuya Zigbee Hub, I just removed it from Zigbee2MQTT added it to the Tuya Zigbee Hub did the update then removed it and re-added it to Zigbee2MQTT, settings remained unchanged, all I needed to do was change the friendly name, automation's continued to work.

For the ceiling mounted MTG235-ZB-RL I have been sent 2 different versions

TS0601_TZE204_clrdrnya this one is supported by Zigbee2MQTT out of the box. I updated it to the latest firmware using the Tuya Zigbee Hub, I just removed it from Zigbee2MQTT added to the Tuya Zigbee Hub did the update from V1.0.4 to V1.0.6 then removed it and re-added it to Zigbee2MQTT, settings remained unchanged, all I needed to do was change the friendly name, automation's continued to work. The last 2 I ordered came with the latest firmware from the factory.

TS0601_TZE200_clrdrnya this one is not supported by Zigbee2MQTT at the moment, an external converter is needed, it is available on this GitHub https://github.com/wzwenzhi/Wenzhi-ZigBee2mqtt/blob/main/mtg035_241016.js A "New device support" issue has been raised https://github.com/Koenkk/zigbee2mqtt/issues/24831 I checked for the latest firmware using the Tuya Zigbee Hub and it says V1.0.4 is the latest for this model, this was confirmed by Wenzhi support.

Its all a bit confusing having 2 devices with identical model numbers MTG235-ZB-RL but different manufacturer names and both using different latest firmware versions.

The other option to update the firmware is to give Wenzhi the ID but to still need to connect it to a Tuya Zigbee Hub so you may as well just do it yourself assuming its available from Tuya.

It would be great if Wenzhi would allow OTA updates through Zigbee2MQTT ?