-
Notifications
You must be signed in to change notification settings - Fork 71
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
[Bug]: State control vibration sensor #540
Comments
post the device diagnostics does the value never goes off on localtuya after it turning on? this also depends on device behavior you may want to enable debug for the device/interrogation and check what's device reporting when states goes on or off |
I believe the device goes to sleep after a detection and does not communicate the next status (that is "drop"). I also noticed that if you change the "sensitivity" it is not sent to the device but is updated at the next event (when a new vibration is detected). If you were able to "wake up" the device a few seconds after detecting the event, it could capture the correct state. |
If that's the case how does the APP know when the device goes off, This is the first time I see low-power ZigBee device If that's the case then perhaps we can detect that using gateway? A look into logs is required If you enabled the debug for the sub-device then the debug for gateway will be enabled with name ends with Test when vibration is on and when it goes off wait for about a minute then copy logs. |
There are other forums online with similar problems with vibrator devices. It seems that there are some brands that after detecting the vibration return the value off, other brands do not. By doing the query from TUYA IOT even during the vibration the value always remains on "vibrate". |
the logs is short device update in |
vibration events from Tuya App: Logs: |
I don't think we can detect when it goes off by it states it seems the device always stays online, however is it possible it's by timer? |
These devices (vibration) have anomalous behavior and have also been analyzed in other discussions because they cause problems even when connected directly to HOMEASSISTANT and managed via mqtt. As already mentioned, the device does not send the off signal after detecting the vibration. If you manage to intercept the start of the vibration, you should force it back to "off" after a reasonable time. From the tuya app the vibration is highlighted for a few seconds and then the device is highlighted off (3 - 4 sec). Sometimes pid 1 "shock_state" switches to "drop" from "vibration" but this is rare, this PID almost always stays on "Vibration". I have tried 3 devices from different brands and with all of them the behavior is the same. Would it therefore be possible to intercept the vibration state and force the value "off" after 3-4 sec? It would be the solution for all this type of devices. Thank you!! |
Try to give binary_sensor_reset_state_interval branch with the reset timer feature on a shot. |
Is it already possible to do a test in the "master" version? Thanks! |
You need to reconfigure the binary sensor entity and set a reset timer. |
No, that's the device configuration, not entity. Click submit until you reach the entity configuration that you want to set a reset timer for it it shoud exists at the bottom of the entity configuration |
You may need to ensure that you installed master correctly, after downloading it copying custom_components into HA |
This issue was closed because it was resolved on the release: 2025.2.1 |
So basically how does this works if the device updated with the "on" value after 5 seconds it will return to "off" state, If the "on" value updated within the "5 seconds" the timer will be extended/reset to 5 seconds again. |
there is one thing I don't understand.... The status of the "vibrate" sensor always remains on "vibrate"... I think the new update brings it back to drop/off but then the sensor remains on "vibrate" and does not vary with the next change. The timer logic is correct but it should find the state change somewhere else because in PID 1 the state almost never changes. I think that's why it doesn't work. |
I think I may missed one thing which is that "status_update" only called if status changed since there is a condition for that.
It doesn't needs to change because the current logic rely on status update call not the state it self, so whenever the status_update is called from device this should trigger. |
LocalTuya Version
last
Home Assistant Version
last
Environment
What happened?
I tried several vibration sensors from different brands, all compatible with TUYA but I always encountered the same problem.
The vibration sensor works correctly from the TUYA app and detects the vibration, turning the device back to OFF in the same app once the vibration has stopped.
When doing the inquiry from IOT, however, the value of the binary sensor always remains on "vibration" and makes control in Homeassistant impossible.
Is there a way for returning the status to off by checking subsequent changes?
Diagnostics information.
No response
The text was updated successfully, but these errors were encountered: