ikifar2012 / amcrest2mqtt-addon

A Home Assistant addon for amcrest2mqtt
4 stars 4 forks source link

AD110 Doorbell event broken? #20

Closed snozzley closed 1 year ago

snozzley commented 1 year ago

I think the doorbell event for AD110 devices is no longer working.

I think this may be related to the recent release, but I'm not sure how to downgrade an addon in HA to test older versions.

In the logs I get the doorbell event like below:

14/04/2023 21:15:21 [INFO] Listening for events...
14/04/2023 21:26:03 [INFO] doorbell rang
14/04/2023 21:26:03 [INFO] {'Code': '_DoTalkAction_', 'action': 'Pulse', 'index': '0', 'data': {'Action': 'Invite', 'CallID': '20230415092603@153345@192.168.86.40', 'CallSrcMask': 4}}

However in MQTT I seem to be getting an image inserted where I previously had the doorbell event. i.e.

amcrest2mqtt/<serial>/doorbell
�PNGIHDR�8g�VIDATx���g�$�y&�~�}y�U��g�{0� �J$i)���V)i�Z�F�ƽ��q��?'✈�P썳

previously I would check for:

  - platform: mqtt
    topic: amcrest2mqtt/<serial>/doorbell
    payload: 'on'

Has this maybe moved elsewhere? (I tried checking all MQTT events, but couldn't see a doorbell event getting set anywhere else)

Version info on my AD110:

  "device_type": "AD110",
  "device_name": "Front Door",
  "sw_version": "1.000.00AC009.0.R",
snozzley commented 1 year ago

This looks like it may be the problem: https://github.com/ikifar2012/amcrest2mqtt/blob/main/src/amcrest2mqtt.py#L372 That looks like it's stamping the image over the doorbell topic?

ikifar2012 commented 1 year ago

So what I did was change the fork of the addon which was supposed to solve some of the issues people have been encountering but it seems like the main branch has some bugs, I have been thinking of switching it to the patch-1 branch which only has a one line change https://github.com/dchesterton/amcrest2mqtt/pull/91. I do not have the doorbell to test so I need testers, I have also been thinking of using this fork as it looks somewhat more organized https://github.com/layertwo/amcrest2mqtt

snozzley commented 1 year ago

Happy to test either for you - just not sure how to load a specific version into HA as the addons seem to just pull 'latest' ?

Otherwise if you're wanting to update/fix yours, I think it would just be a matter of putting the camera snapshot in a different topic, and publishing the doorbell topic. I could try make a PR for that if you wanted?

ikifar2012 commented 1 year ago

I think some other things are broken too, as for HA yes it only pulls whats in the config file in my addons repo https://github.com/ikifar2012/ha-addons I will switch the branch over to patch-1 in the next release and hopefully that will solve things

ikifar2012 commented 1 year ago

Was human detection ever broken for you because that's what patch-1 (https://github.com/dchesterton/amcrest2mqtt/pull/91) aims to solve

snozzley commented 1 year ago

I have never used it (Or even sure if AD110 supports it?) sorry

raymond-w commented 1 year ago

Any idea when the next version is released?

I also did not use presence, only want the button trigger :)

ikifar2012 commented 1 year ago

Let me know if 2023.5.0 fixes anything

nightcrawler2164 commented 1 year ago

I just updated to 2023.5.0 and I still have the issue where doorbell press event (a binary sensor) is still unavailable. This stopped working a few weeks ago, any ideas/troubleshooting suggestions?

2023-05-08_14-51-14

raymond-w commented 1 year ago

Same here after the 2023.5.0 update. Also removed it and added it again.

ikifar2012 commented 1 year ago

any errors in the logs or anything strange in mqtt?

mattstrong121 commented 1 year ago

After updating I am still seeing the same thing as @snozzley in the original post. There is an image being sent in the doorbell event amcrest2mqtt/serial#/doorbell. If there is any addition info needed please let me know. And thanks for maintaining this add-on. I appreciate it!

snozzley commented 1 year ago

Doorbell is working well again with 2023.5.0, thanks! :D

Jakkumn commented 1 year ago

FYI, if you are using go2rtc (such as via frigate), make sure you are using the correct back channel @mattstrong121 @karthikvenkat123 . If you are not, go2rtc will steal the doorbell press and you'll be in constant 'call' mode and you'll always be in an unknown state. To fix that, use the following similar like for go2rtc config: rtsp://user:pass@hostOrIp:554/cam/realmonitor?channel=1&subtype=0#backchannel=0

kylewilliams321 commented 5 months ago

So what I did was change the fork of the addon which was supposed to solve some of the issues people have been encountering but it seems like the main branch has some bugs, I have been thinking of switching it to the patch-1 branch which only has a one line change dchesterton/amcrest2mqtt#91. I do not have the doorbell to test so I need testers, I have also been thinking of using this fork as it looks somewhat more organized https://github.com/layertwo/amcrest2mqtt

I'd help testing. I'm encountering this issue I believe. I have the ad110.