seaside1 / unifiprotect

openHAB UniFi Protect Addon
Eclipse Public License 2.0
21 stars 6 forks source link

OH re-estabilishing connection from: Timeout while sending request to UniFi Protect #20

Closed Magicsplash closed 5 months ago

Magicsplash commented 6 months ago

First of all, thanks for this lifesaver of a binding. Not having a physical chime to sound made me experiment with this binding. I can trigger the audio system to sound a TTS message that someone is at the door.

The setup I'm running is:

OH 4.1.0 on Raspberry Pi

UDM-Pro, protect 2.10.11; G4 doorbell firmware version: 4.68.21

Whenever there's a hic-up on the line between OH and the UDMP, the binding logs it's gone offline with the following message:

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifiprotect:nvr:udm-p-nvr' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Timeout while sending request to UniFi Protect

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifiprotect:g4doorbell:udm-p-nvr:frontDoorCamera' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

A moment or so later it comes back with:

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifiprotect:nvr:udm-p-nvr' changed from OFFLINE (COMMUNICATION_ERROR): Timeout while sending request to UniFi Protect to ONLINE

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifiprotect:g4doorbell:udm-p-nvr:frontDoorCamera' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

Afterwards the 'last seen', 'last rang' channels keep working as normal, but isRinging, isMotionDetected, isDark etc. won't change at all.

Feels like there's something going wrong when re-establishing the connection from the binding to de NVR when it has gone offline.

If there's anything you would like for me to provide, please ask.

Andre1Becker commented 6 months ago

Hey - this could be related to this issue here:

Connection lost after 20min. with latest UDM PRO Protect version 2.10.11

But mainly i've got the same issues but other log entries. Maybe you could try to catch that while debug logs are enabled:

open openHAB console and set logging for unifi protect to TRACE:

log:set trace org.openhab.binding.unifiprotect

After grabbing anything useful, go back to default with:

log:set info org.openhab.binding.unifiprotect