neolink icon indicating copy to clipboard operation
neolink copied to clipboard

Doorbell press event support

Open ruben-janssens opened this issue 11 months ago • 31 comments

Is your feature request related to a problem? Please describe. I am using Neolink to connect to the new WiFi battery doorbell. Everything works like expected (after some fiddling of course) but now I need to know when someone presses the bell.

I would implement it myself but then I would need to learn Rust from scratch :)

ruben-janssens avatar Dec 28 '24 17:12 ruben-janssens

It's a nice enhancement and I wouldn't mind tackling it. But I'd need access to the wireshark packets to reverse engineer the protocol

QuantumEntangledAndy avatar Jan 21 '25 08:01 QuantumEntangledAndy

If you can provide some steps on how I should setup an environment to capture those packets I can provide them to you.

ruben-janssens avatar Jan 21 '25 08:01 ruben-janssens

I have also been looking at how the button press event is implemented in the official HomeAssistant Reolink integration. There the package reolink_aio is used. When looking into it it seems like the event is called visitor on cmd code 33

https://github.com/starkillerOG/reolink_aio/blob/main/reolink_aio/baichuan/baichuan.py#L423

Not sure if this could be of any help...

ruben-janssens avatar Jan 21 '25 08:01 ruben-janssens

Oh we have CMD 33 already done. It will pop up as a motion alert but we filter it out.

QuantumEntangledAndy avatar Jan 21 '25 09:01 QuantumEntangledAndy

How would you expect it to be integrated? Are you using the mqtt to read events?

QuantumEntangledAndy avatar Jan 21 '25 09:01 QuantumEntangledAndy

Yes I use MQTT to receive everything on HomeAssistant so that would be ideal :)

ruben-janssens avatar Jan 21 '25 09:01 ruben-janssens

I'm working on a build for this to test. Are you using docker or bare metal neolink?

QuantumEntangledAndy avatar Jan 24 '25 09:01 QuantumEntangledAndy

I use the neolink package on a debian LXC in proxmox. Thanks for the quick implementation!

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Andrew King @.> Sent: Friday, January 24, 2025 10:38:29 AM To: QuantumEntangledAndy/neolink @.> Cc: ruben-janssens @.>; Author @.> Subject: Re: [QuantumEntangledAndy/neolink] Doorbell press event support (Issue #339)

I'm working on a build for this to test. Are you using docker or bare metal neolink?

— Reply to this email directly, view it on GitHubhttps://github.com/QuantumEntangledAndy/neolink/issues/339#issuecomment-2612077540, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARFNT3ULORTFCROHMUIGSGL2MICZLAVCNFSM6AAAAABUJ6ZIHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGA3TONJUGA. You are receiving this because you authored the thread.Message ID: @.***>

ruben-janssens avatar Jan 24 '25 09:01 ruben-janssens

Ok I have the build happening here hopefully it will work and then the binaries will be available

QuantumEntangledAndy avatar Jan 24 '25 10:01 QuantumEntangledAndy

I'm currently not home so I can test this in 3 ish hours.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Andrew King @.> Sent: Friday, January 24, 2025 11:04:14 AM To: QuantumEntangledAndy/neolink @.> Cc: ruben-janssens @.>; Author @.> Subject: Re: [QuantumEntangledAndy/neolink] Doorbell press event support (Issue #339)

Ok I have the build happening herehttps://github.com/QuantumEntangledAndy/neolink/actions/runs/12947382929 hopefully it will work and then the binaries will be available

— Reply to this email directly, view it on GitHubhttps://github.com/QuantumEntangledAndy/neolink/issues/339#issuecomment-2612132182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARFNT3THNEUUI7QJ52IZDWD2MIFZ5AVCNFSM6AAAAABUJ6ZIHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJSGEZTEMJYGI. You are receiving this because you authored the thread.Message ID: @.***>

ruben-janssens avatar Jan 24 '25 10:01 ruben-janssens

Build will take an hour anyways so no rush

QuantumEntangledAndy avatar Jan 24 '25 10:01 QuantumEntangledAndy

Ok build of the binaries are here https://github.com/QuantumEntangledAndy/neolink/actions/runs/12947507860

Docker is here quantumentangledandy/neolink:feat-visitor

QuantumEntangledAndy avatar Jan 24 '25 13:01 QuantumEntangledAndy

Talk about perfectly timed, will test them now

ruben-janssens avatar Jan 24 '25 13:01 ruben-janssens

Do I have to modify any config to add the visitor functionality ? Like for example in mqqt features ?

ruben-janssens avatar Jan 24 '25 14:01 ruben-janssens

Alright got the event! A small problem dho

Message 138438 received on neolink/Doorbell/status/visitor at 15:13:

visitor

Neolink has send the event almost 140000 times

ruben-janssens avatar Jan 24 '25 14:01 ruben-janssens

Same with the AI event and something is wrong with the motion event no longer coming through

ruben-janssens avatar Jan 24 '25 14:01 ruben-janssens

https://github.com/QuantumEntangledAndy/neolink/actions/runs/12961197957 next build

Should fix the repeating notifications, couldnt replicate the motion stopping on mine but I don't have ai or visitor

QuantumEntangledAndy avatar Jan 25 '25 05:01 QuantumEntangledAndy

I will be able to test the next build in a week


From: Andrew King @.> Sent: Saturday, January 25, 2025 6:42:23 AM To: QuantumEntangledAndy/neolink @.> Cc: ruben-janssens @.>; Author @.> Subject: Re: [QuantumEntangledAndy/neolink] Doorbell press event support (Issue #339)

https://github.com/QuantumEntangledAndy/neolink/actions/runs/12961197957 next build

Should fix the repeating notifications, couldnt replicate the motion stopping on mine but I don't have ai or visitor

— Reply to this email directly, view it on GitHubhttps://github.com/QuantumEntangledAndy/neolink/issues/339#issuecomment-2613794712, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARFNT3UZGQTUYDCYYQQU2X32MMP37AVCNFSM6AAAAABUJ6ZIHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJTG44TINZRGI. You are receiving this because you authored the thread.Message ID: @.***>

ruben-janssens avatar Jan 25 '25 05:01 ruben-janssens

I see that the issue is now fixed. Thanks! But for some reason motion events are still not pushed through. I have enabled debug mode but that also gives nothing.

ruben-janssens avatar Feb 02 '25 15:02 ruben-janssens

Is the motion on your camera PIR?

QuantumEntangledAndy avatar Feb 03 '25 00:02 QuantumEntangledAndy

Reolink has some different ways to detect motion.

  • One of the ways is PiR into AI
  • another is PIR only (can't detect that any more since we lost push notifications)
  • another is detecting changed pixels between frames

The motion detection in Neolink is for the third kind, changed frames

Did it work before? I'd like to get a wireshark dump so I can examine the packets and see what is coming from the cameras can you provide one?

QuantumEntangledAndy avatar Feb 03 '25 00:02 QuantumEntangledAndy

Ah then I think it is not working because of the lost push notifications. I have it setup to disconnect when no motion is detected after a certain amount of time because it is a battery powered doorbell.

ruben-janssens avatar Feb 03 '25 10:02 ruben-janssens

Since there's no push notifications it won't reconnect by itself anymore.

P.s. do you have an NVR? I think I can reverse engineer their protocol to hook into its notification system. But I don't have one myself to find out

QuantumEntangledAndy avatar Feb 03 '25 10:02 QuantumEntangledAndy

Sadly I don't have the NVR or the home hub. I have thought about buying one of them if neolink didn't work out. Maybe for the greater good I should buy one ...

If we can solve it in 30 days I could theoretically send it back even.

ruben-janssens avatar Feb 03 '25 10:02 ruben-janssens

I'm not sure about the less than 30 days thing. (Work is always busy and would require a lot of effort to reverse engineer)

I'm hoping to find something to help or maybe try other experiments.

QuantumEntangledAndy avatar Feb 03 '25 11:02 QuantumEntangledAndy

Hi @QuantumEntangledAndy, just wanted to let you know that I will be buying the Home Hub. Just waiting for a sale price. Once I have it I will get back in touch

ruben-janssens avatar Mar 11 '25 12:03 ruben-janssens

@QuantumEntangledAndy I'm in luck and got one at a discount :) Whenever you have some free time could you provide me with a setup to gather the packets between the home hub and the battery doorbell

ruben-janssens avatar Mar 18 '25 19:03 ruben-janssens

Hey there. Have you made any progress on this? Also using a battery doorbell and would love to integrate it into homeassistant to play chimes on my smart speakers on button press.

koproductions-code avatar Apr 25 '25 13:04 koproductions-code

Hi @koproductions-code @QuantumEntangledAndy I don't know if it's interesting but I'm trying to reverse engineer the connection in https://github.com/starkillerOG/reolink_aio/issues/125 because my python understanding is better than Rust

ruben-janssens avatar Jun 18 '25 09:06 ruben-janssens

I know this is a little stale; but any updates ? Anything you need in order to get this working ? Happy to help as have just got this all up and running.

sh00t2kill avatar Oct 08 '25 11:10 sh00t2kill