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

Button Press doesn't work anymore #358

Open
Aspage opened this issue May 22, 2024 · 22 comments
Open

Button Press doesn't work anymore #358

Aspage opened this issue May 22, 2024 · 22 comments

Comments

@Aspage
Copy link

Aspage commented May 22, 2024

Hello!

Ever since (I think) HA 2024.5.x the button press on the doorbell doesn't register anymore. Maybe more isn't working anymore either, but I'm only using the cameras (still works!) and the doorbell press event.

Would be amazing if this could be fixed!

HA: 2024.5.x
Doorbell: DHI-VTO3211D-P4-S2

@smol84
Copy link

smol84 commented May 29, 2024

Also not working for me

@smol84
Copy link

smol84 commented May 30, 2024

I also enabled debugging as well as monitoring events - nothing coming up at all...

@Aspage
Copy link
Author

Aspage commented May 30, 2024

Did the same thing. Didn't see any events firing after button press.

@smol84
Copy link

smol84 commented May 30, 2024

Found these errors in the HA log file
2024-05-30 12:58:14.381 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'dahua' callsasync_add_job, which is deprecated and will be removed in Home Assistant 2025.4; Please review https://developers.home-assistant.io/blog/2024/03/13/deprecate_add_run_job for replacement options at custom_components/dahua/__init__.py, line 85: hass.async_add_job(, please create a bug report at https://github.com/rroller/dahua/issues 2024-05-30 12:58:14.427 WARNING (MainThread) [homeassistant.components.light] Entity None (<class 'custom_components.dahua.light.DahuaInfraredLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/rroller/dahua/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation 2024-05-30 12:58:14.428 WARNING (MainThread) [homeassistant.components.light] None (<class 'custom_components.dahua.light.DahuaInfraredLight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/rroller/dahua/issues

@derekcentrico
Copy link

Anyone get button press working? I'm using an EmpireTech DB2X-WP. Button events not going through. Happy to toss @rroller a coffee to fix. :-)

@rroller
Copy link
Owner

rroller commented Jun 5, 2024

I'm so sorry everyone. I've been busy and not able to dig into this. I will make it a top priority soon. I'll try for this weekend

@derekcentrico
Copy link

Not a problem, I know it's voluntary. Figured a bribe may help.

Events and logs aren't helpful aside from the logs stating that the add-on isn't compliant with recently depreciated and removed Core changes.

I enabled SIP Server on my doorbell. It's pushing events again. Didn't need it before.

@lluiscab
Copy link

lluiscab commented Jun 6, 2024

@derekcentrico Facing the same issue here but my doorbell has always had the SIP server enabled. Did you change anyhing else?

@derekcentrico
Copy link

@lluiscab I disabled/cleared the SIP settings (basically a factory reset on device so that cleared) and re-enabled with the SIP server on the local doorbell if that helps. Not sure at which point this made it function but SIP running on the local doorbell makes it work. If I disable it it stops working.

@Jumbles123
Copy link

Can confirm Disabling SIP stops button press from working on mine - VTO2211G-WP.
I may be a numpty but in the log when the button is pressed i get "Doorbell Button Pressed detected sound" and then 30 seconds later i get "Doorbell Button Pressed cleared (no sound detected)"
Is that normal behavior?
I only just got the button press working so am unsure.

@derekcentrico
Copy link

Sure, so my log says that as well. The 30 second delay, I think, is related to the SIP calling a home device (theoretically but not happening unless you have those base stations).

@CodeMasterTalon
Copy link

CodeMasterTalon commented Jun 7, 2024

Since the change to schedule_update_ha_state the integration is now using a hard fix value of 30 seconds to poll the VTO for any updates. This can be changed by updating SCAN_INTERVAL_SECONDS = timedelta(seconds=30) under init.py. I updated this setting to 2 seconds and the doorbell press works faster. Home Assistance is now polling the doorbell every 2 seconds. The async_schedule_update_ha_state() seems like it was waiting for the doorbell to push a message to home assistance instead of waiting for polling interval to happen.

@rroller
Copy link
Owner

rroller commented Jun 8, 2024

So far I can't reproduce this. I have a VTO2202F, I press the button and I immediately get a button press event.
I do have SIP enabled...
image

Testing now with it disabled...

@lluiscab
Copy link

lluiscab commented Jun 8, 2024

After updating to Home Assistant 2024.6.1 (not sure if that had anything to do with it) and restarting the VTO, I'm receiving the button press event again. Regardless of what the real cause for this issue might be, it feels like there's some error checking / reconnecting logic missing from this component in order to handle this kind of issues more smoothly, maybe we could get a "Connection to VTO lost" notification or similar.

@rroller
Copy link
Owner

rroller commented Jun 8, 2024

Can confirm, the button press doesn't work when SIP is disabled.

@rroller
Copy link
Owner

rroller commented Jun 8, 2024

https://github.com/rroller/dahua/releases/tag/0.9.55 released to fix a few of the deprecation warnings above. I'm not able to apply a fix for the button press as I've not been able to reproduce the issue yet

@Aspage
Copy link
Author

Aspage commented Jun 10, 2024

To make things more complicated:

  • I was on a very old (manual) version: version 0.50.0
  • SIP Server is enabled (always was, not sure what it does, though)
  • I rebooted the device and hopefully this will help
  • I updated to the latest version: 0.9.55. But since rrollerr states it hasn't been able to reproduce it yet, I'm not getting my hopes up :(

but of course, thanks to rrollerr for this integration! I'm very grateful for it!

@JoshDev
Copy link
Contributor

JoshDev commented Jun 13, 2024

Could this be related to - #230

I.e. Dahua disabled the button presses on their end with a firmware upgrade?

@Aspage
Copy link
Author

Aspage commented Jun 17, 2024

Guys, I don't know about you, but after installing HA 2024.06.2 or 2024.06.03 (I installed them at the same time, so not sure which one), I suddenly get buttonpress-events again!

For me, the problem seems to be solved! Was an HA issue afterall, it seems.

Can anybody confirm?

@derekcentrico
Copy link

Guys, I don't know about you, but after installing HA 2024.06.2 or 2024.06.03 (I installed them at the same time, so not sure which one), I suddenly get buttonpress-events again!

For me, the problem seems to be solved! Was an HA issue afterall, it seems.

Can anybody confirm?

Still borked on my install. See my post above yours.

@Aspage
Copy link
Author

Aspage commented Jun 17, 2024

Guys, I don't know about you, but after installing HA 2024.06.2 or 2024.06.03 (I installed them at the same time, so not sure which one), I suddenly get buttonpress-events again!
For me, the problem seems to be solved! Was an HA issue afterall, it seems.
Can anybody confirm?

Still borked on my install. See my post above yours.

That post was from 2 weeks ago. Did you upgrade your HA to the latest 2024.6.3? That's what apparently fixed it for me.

@smol84
Copy link

smol84 commented Jun 22, 2024

I updated and still not working. Gobe back to the dahua vto integration instead which isn't as good but at least it works with button press

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

8 participants