[RELEASE] Tuya Zigbee Vibration Sensor

'Tuya ZigBee Vibration Sensor' driver is available for installation from Hubitat Package Manager (HPM ).

Driver code is available from the GitHub repository: (link).

This driver supports Tuya-specific vibration sensors and some non-Tuya models (Samsung and TR). The latest devices have very good HE inbuilt drivers, but they are also included here because of the healthStatus attribute.

image
image
image

device links
Model: TS0210 Tuya Vibration Sensor
AliExpres (Zemismart) : (link)
Moes: (link)
Tuya Zigbee3.0 Vibration Detector For Glass Door And Window
* manufacturer: _TYZB01_pbgpvhgx
AliExpress: (link)
THIRDREALITY Zigbee Vibration Sensor
Amazon .de (link)

6 Likes

Revisions history :

  • ver 1.0.3 2022-02-28 - inital version
  • ver 1.0.4 2022-03-02 - 'acceleration' misspelled bug fix
  • ver 1.0.5 2022-03-03 - Battery reporting
  • ver 1.0.6 2022-03-03 - Vibration Sensitivity
  • ver 1.0.7 2022-05-12 - TS0210 _TYZB01_pbgpvhgx Smart Vibration Sensor HS1VS
  • ver 1.0.8 2022-11-08 - TS0210 _TZ3000_bmfw9ykl
  • ver 1.1.0 2023-03-07 - added Import URL; IAS enroll response is sent w/ 1 second delay; added _TYZB01_cc3jzhlj ; IAS is initialized on configure();
  • ver 1.2.0 2024-05-20 - add healthStatus and ping(); bug fixes; added ThirdReality 3RVS01031Z ; added capability and preference 'ThreeAxis'; added Samsung multisensor; logsOff scheduler; added sensitivity attribute,
  • ver 1.2.1 2024-05-22 - delete scheduled jobs on Save Preferences; added lastBattery attribute; added setAccelarationInactive command;
  • ver 1.2.2 2024-06-03 - (dev. branch) - sensitivity preference is hidden for non-Tuya models; threeAxis preference is hidden for Tuya models;

Amazon US link

One of the addition in the latest version is that the sensitivity parameter, as returned from the device is shown in the Current States :
image

This is the actual sensitivity value, as returned by the device itself.
Let me know if your sensors are returning back the configured sensitivity or not.

You need to activate the vibration sensor at the same time when you click on the 'Save Preferences' button.

Thanks a lot for the changes @kkossev
After updating the driver I paired one of my problematic devices again (it had been removed from HE and completely off for some time). After re-pairing a couple of times the sensor started communicating successfully with HE but activating constantly. I did as you suggested and changed the sensitivity level and then while active I clicked the "save preferences" button. The configured sensitivity was returned correctly. I have been testing it on a very stable surface with negligible vibration. It activated after about 10-20 minutes on the 3, 4, and 5 sensitivity levels but it has not activated on the minimum level (6) for a few hours now! I will keep testing and update in due course. Thanks again

2 Likes

There is one small addition in yesterday's new version - a new attribute 'lastBattery' with the time stamp when the last battery report was received from the device :

image

You can update the driver manually using the link in the first post.

1 Like

I'm using this driver on a Tuya Vibration sensor, and it doesn't "turn off" acceleration.
Here is the data portion:


Here is the states:

The acceleration hasn't changed, even though it's been still for quite a while.

I have added a command to reset the acceleration active attribute :

image

(update the driver to the new version from the link on the top post).

After the reset, does the device register a new vibration?

First, I think I should explain how I'm hoping to use this device.
I would like to put this on a dryer, in order to tell that the "drying cycle" has finished.
So, at approx. 2:58 (local time), after I reset the acceleration to inactive (thank you!), I ran the dryer for a minute or two. I got the following events:


I think that I have enough, to make up a RM rule to make an announcement at the appropriate time.

1 Like

i turned on debug and logging and get the following...is that ok
dev:392024-05-26 09:14:50.932 PMwarnDescription map not parsed: [raw:5F3D01FFF12800002901000100291F000200298FFD0300295B03, dni:5F3D, endpoint:01, cluster:FFF1, size:28, attrId:0000, encoding:29, command:0A, value:0001, clusterInt:65521, attrInt:0, additionalAttrs:[[value:001F, encoding:29, attrId:0001, consumedBytes:5, attrInt:1], [value:FD8F, encoding:29, attrId:0002, consumedBytes:5, attrInt:2], [value:035B, encoding:29, attrId:0003, consumedBytes:5, attrInt:3]]]

dev:392024-05-26 09:14:50.929 PMdebugDryer sensor: Parsing: read attr - raw: 5F3D01FFF12800002901000100291F000200298FFD0300295B03, dni: 5F3D, endpoint: 01, cluster: FFF1, size: 28, attrId: 0000, encoding: 29, command: 0A, value: 01000100291F000200298FFD0300295B03

dev:392024-05-26 09:14:49.909 PMwarnDescription map not parsed: [raw:5F3D01FFF12800002901000100293E000200298FFD0300299903, dni:5F3D, endpoint:01, cluster:FFF1, size:28, attrId:0000, encoding:29, command:0A, value:0001, clusterInt:65521, attrInt:0, additionalAttrs:[[value:003E, encoding:29, attrId:0001, consumedBytes:5, attrInt:1], [value:FD8F, encoding:29, attrId:0002, consumedBytes:5, attrInt:2], [value:0399, encoding:29, attrId:0003, consumedBytes:5, attrInt:3]]]

dev:392024-05-26 09:14:49.906 PMdebugDryer sensor: Parsing: read attr - raw: 5F3D01FFF12800002901000100293E000200298FFD0300299903, dni: 5F3D, endpoint: 01, cluster: FFF1, size: 28, attrId: 0000, encoding: 29, command: 0A, value: 01000100293E000200298FFD0300299903

dev:392024-05-26 09:14:48.909 PMwarnDescription map not parsed: [raw:5F3D01FFF12800002901000100294E000200298FFD0300296B03, dni:5F3D, endpoint:01, cluster:FFF1, size:28, attrId:0000, encoding:29, command:0A, value:0001, clusterInt:65521, attrInt:0, additionalAttrs:[[value:004E, encoding:29, attrId:0001, consumedBytes:5, attrInt:1], [value:FD8F, encoding:29, attrId:0002, consumedBytes:5, attrInt:2], [value:036B, encoding:29, attrId:0003, consumedBytes:5, attrInt:3]]]

dev:392024-05-26 09:14:48.906 PMdebugDryer sensor: Parsing: read attr - raw: 5F3D01FFF12800002901000100294E000200298FFD0300296B03, dni: 5F3D, endpoint: 01, cluster: FFF1, size: 28, attrId: 0000, encoding: 29, command: 0A, value: 01000100294E000200298FFD0300296B03

1 Like

@tim.ocallag check if you are using the latest dev. branch version, should be 1.2.1 ?

I've tested my 8 previously problematic devices (which activated constantly) using the new driver (1.2.0 and 1.2.1) for 10 days now.

The good news is that they don't activate for no reason but the bad news is that they are still too sensitive, even though they were set on the least sensitive level (6). Despite being on a stable surface with negligible vibration, even a bang in the next room, or a loud sneeze nearby, can set them off. I noticed the following TODO in the driver: "make sensitivity range dependant on the device model" but I don't know if the range can be adjusted for less sensitivity than 6?

Another issue is that after I re-paired 2 of the devices, the problem of activating constantly returned. After many attempts removing them and re-pairing them, this came right, however they are now even more sensitive than the remaining 6.

I'm glad there has been improvement and will watch out for any further updates.

Update Jul 10 2024: I am done with these Tuya sensors and have pulled all of them from my windows and stopped using them!
I had about 13 of them that were working reasonably well (paired on previous driver version 1.1.0) but decided to change the sensitivity level of all. I did this by activating and clicking SAVE PREFERENCES and confirming the sensitivity attribute in Current States (driver v.1.2.0). This turned out to be a very bad idea because I later realised that all of them had developed the issue of activating continuously. I tried re-pairing some but it didn't help so I gave up. I have about 20 now that are bricks! I am going to get a ThirdReality sensor instead and test that.

1 Like

@Owen it is difficult to determine why your sensors are so sensitive... I have only two - TS0210 _TYZB01_3zv6oleo and _TYZB01_pbgpvhgx, and at the lowest sensitivity settings they are quiet.

An alternative approach could be to pair the sensors to a Tuya Matter GW bridge and see if there is any difference when paired directly to HE.

1 Like

I have the ThirdReality Vibration Sensor. I might be wrong, but I don't think you can set the sensitivity via zigbee - I think you have to use the DIP switches and it only has 4 levels of sensitivity, not 6.
I found "Exposes vibration, battery_low, battery, voltage, x_axis, y_axis, z_axis, linkquality" https://docs.bary.io/devices/3RVS01031Z

1 Like

That's correct, the ThirdReality vibration sensor sensitivity is set from the DIP switches.

I will hide the sensitivity preference for the TR model in the next driver version.

2 Likes

Thanks for the suggestion. I'd like to avoid adding a bridge as it's an extra device to worry about :slight_smile:

1 Like

Thank you for the Driver development on the Tuya Zigbee Vibration sensor.

On the Hubitat device page I can see that the Acceleration State momentary reverts to the Inactive State according to the time set in the Preferences even if Vibration is still present? Is it possible for the State not to revert to Inactive if Acceleration (vibration) is still being detected?

1 Like