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

zigbee-moisture-sensor-v2 - need to change timing for heartbeat #116

Closed
briankitt opened this issue Apr 15, 2024 · 29 comments
Closed

zigbee-moisture-sensor-v2 - need to change timing for heartbeat #116

briankitt opened this issue Apr 15, 2024 · 29 comments

Comments

@briankitt
Copy link

I'm using zigbee-moisture-sensor-v2 with this sensor:
https://www.amazon.com/dp/B0CLJ951YS

It works perfectly, well, almost.

The water sensor doesn't appear to broadcast often enough to satisfy the drivers minimum broadcast requirements.

All day long, the sensors go offline, then online, then offline, then online, etc.

It's done cyclic, so that indicates to me that the water sensors are working, just not 'often enough'.

Is there a way to tweak the driver to increase the timeout before it decides it's 'offline'?

I have 18 sensors, and get notified constantly all day (and all night) that they are going online and offline.

@Mariano-Github
Copy link
Owner

Mariano-Github commented Apr 15, 2024

The driver configures the device with the default smartthings values:

300 sec for cluster 500, attribute 0002

21600 sec for battery, cluster 0001

The hub marks as offline when no message is received from those clusters for approximately 2:30 hours.

If it appears offline intermittently, it means that one of the clusters has not been configured correctly in the installation and does not send periodic messages or the messages do not reach the hub due to poor quality or signal strength.

These devices are usually placed in inaccessible places, under metal appliances, which attenuate the 2.4 GHz zigbee signal.

Try reinstalling the devices near the hub and placing repeaters, plugs, etc. for those that are further away from the hub.

You can use zwave sensors, which have lower frequencies, 800 MHz, and have less noise and have a longer range.

There are some tuya TS0207 models, which do not configure cluster 500 correctly and disconnect and reconnect when they receive the battery message, cluster 0001, which report every 6 hours

@briankitt
Copy link
Author

briankitt commented Apr 15, 2024 via email

@Mariano-Github
Copy link
Owner

The time to display offline is strictly controlled by the hub, not by the driver.

The 4 hours interval fits with what I told you, it is offline after about 2.30 hours, 4 hours later the battery message arrives to hub and it goes online for another 2.30 hours and 4 hours later another battery message arrives again ...

It is a problem with some Tuya TS0207 models, they do not send periodic 300 sec reports from cluster 500.

I could to configure battery reports every 1 hour instead of 6 hours, if can identify with model and manufacturer, which tuya devices have the problem, but if I do it to all of devices indiscriminately it would mean excessive and unnecessary battery consumption on the devices that work correctly.

@briankitt
Copy link
Author

briankitt commented Apr 15, 2024 via email

@Mariano-Github
Copy link
Owner

These devices are normally asleep, only accepting configuration changes during installation or when they are awake.

If you tell me the model and manufacturer of the devices that disconnect, I can change the configuration on those devices in the installation, reinstallation

@briankitt
Copy link
Author

briankitt commented Apr 17, 2024 via email

@Mariano-Github
Copy link
Owner

I can not see the puctures posted

@briankitt
Copy link
Author

image
image
image
image

And then the device is here on Amazon
https://www.amazon.com/dp/B0CLJ951YS

@Mariano-Github
Copy link
Owner

Mariano-Github commented Apr 19, 2024

Modified configuration for battery report interval 3600 sec.

To device configure with new values you need instal or reinstall devices.

To reinstall devices without uninstall it:

  • Install this driver version or wait to driver updated automatically
  • Put device in pairing mode
  • In app, add device with search nearby option
  • Device will re install and configured with lost any routine or scenes
───────────────────────────────────────────────────
 Name         Zigbee Moisture Sensor Mc
 Version      2024-04-19T20:08:04.635029836
───────────────────────────────────────────────────

To confirm that the battery is reporting every 1 hour you can see the battery time graphs in the app

@briankitt
Copy link
Author

briankitt commented Apr 22, 2024 via email

@briankitt
Copy link
Author

What's next? They are still cycling offline and online?

@Mariano-Github
Copy link
Owner

I have no idea what is happening to your devices.

These devices are cheap and work well with your platform, but on other platforms they can be a pain.

If you send me the logs with the device pairing CLI and I can see what messages the device sends when it is configured, then I could analyze what happens, but I can't guarantee anything with these devices.

@briankitt
Copy link
Author

briankitt commented Apr 28, 2024 via email

@Mariano-Github
Copy link
Owner

@briankitt
Copy link
Author

This is VERY informative, and I've learned an incredible amount about my devices.
1 thing, for example, is that devices are reporting far more frequently then I guessed.
I apologize, I should have done this first, this would have given you so much more information about my problem.

First off, check out this screen print. Look at the devices that are offline. I intentionally captured my time, so you could compare my time (Central Daylight Time) to the Smart Things debug log time stamps.

image

Now, look at the log. Even though these devices are showing 'offline', they are reporting on a regular basis?
So how does that happen? They are successfully reporting, yet, SmartThings shows they are offline?
That seems odd.
But clearly, the problem is not in the reporting of the status?

Here is 1 hour worth of log. Let me know if you need more.
Zigbee.log

@Mariano-Github
Copy link
Owner

Mariano-Github commented May 2, 2024

I have looked at the entire log, taking note of the most relevant of the 18 sensors:

  • starts at 18:17:10 and ends at 01:31:11

  • At 18:37:52 "Washing Maching" sensor was removed

  • At 18:55:12 It is reinstalled and configured.

  • Battery configuration 3600 sec. Device response: Ok

  • IASzone configuration, cluster 0500 (dry or wey) 2100 sec. Device response: Ok

  • The battery and IASZone attributes are read and the capabilities are initialized with the values received: 93% and Dry.

  • Only one sensor (Master small sink), during the log, spontaneously reports cluster 0500, (dry) only once at 00:31:11.

  • No other sensor spontaneously reports either cluster 0500, (dry or wet) or cluster 0001, (Batt).

  • All the logs you see are the activation of the Health Check function to read cluster 0500, attribute 0002, because the messages are not received.

  • the device does not respond to readings because it is asleep.

  • Result, they are all offline except the "Master small Sink" when the report was received at 00:31:11.

The problem is not very clear:

  • The device responds that it accepts the configuration, but no periodic reports are received from the device, neither battery nor IASZone.
  • When a spontaneous reporter message is received from a device, the Rssi intensity: -86 dbm is quite low.
  • It could be that the messages are issued and do not reach the Hub, although it is strange that almost none arrive.
  • It could be that the devices do not send messages correctly, but it is rare for them all to fail.
  • You could try placing two sensors near the hub to see if they stay online and send periodic reports.
  • I can't think of anything else to try.

I attach a photo of the summary of the logs
PXL_20240502_095110587

@briankitt
Copy link
Author

briankitt commented May 2, 2024 via email

@Mariano-Github
Copy link
Owner

What channel do you have the router's WiFi on and what zigbee channel does the hub have?
they could be interfering

@briankitt
Copy link
Author

briankitt commented May 2, 2024 via email

@briankitt
Copy link
Author

briankitt commented May 2, 2024 via email

@Mariano-Github
Copy link
Owner

Mariano-Github commented May 2, 2024

Zigbee channel can see and change in my.smartthings.com advanced users.

Do not use channel 25

Screenshot_20240502-200641

Wifi 2.4 ghz channel can see and change in your router settings

@Mariano-Github
Copy link
Owner

Mariano-Github commented May 2, 2024

This is a publish of interference zigbee and wifi channels

https://www.metageek.com/training/resources/zigbee-wifi-coexistence.html

The fact that the router and the hub are very close can increase interference

@briankitt
Copy link
Author

briankitt commented May 3, 2024

Oh, got it. sorry. Per your suggestion, I changed it to 25. I'll update you after 24 hours, that should be enough time for everything to adjust. I also changed my WiFi for my Orbi down to 2, since 11 can interfere with 25 based on the document.

image

@Mariano-Github
Copy link
Owner

Some olders devices can have problems with channel 25, but new devices i think work fine

@briankitt
Copy link
Author

briankitt commented May 6, 2024 via email

@Mariano-Github
Copy link
Owner

I don't understand anything, but everything indicates that this device is not working well.

Try a different zigbee detector to see if it is a problem with your zigbee network or not.

These are more expensive, but they do work well.

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.amazon.com/-/es/Aeotec-SmartThings-alimentado-concentrador-inteligente/dp/B095TR9NYR&ved=2ahUKEwjNtuXhr_mFAxWExgIHHZkfBpwQFnoECBIQAQ&usg=AOvVaw0hwjdbyhc9pUR01NGk_dLK

@briankitt
Copy link
Author

briankitt commented May 6, 2024 via email

@Mariano-Github
Copy link
Owner

I meant buying 1 to test and see if it is a problem with the zigbee network or the devices.

Then you return it and with the conclusions you draw you make a decision.

There may be more models, you can ask in the community, but the TS0207 cause many problems to many users

@briankitt
Copy link
Author

briankitt commented May 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants