hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.45k stars 93 forks source link

Unable to process MQTT message #1037

Closed marrrkus closed 8 months ago

marrrkus commented 8 months ago

Homebridge UniFi Protect Version

v6.16.0

Homebridge Platform and OS

RPi4

Homebridge Version

v1.7.0

Node Version

v18.19.0

UniFi OS Version

v3.2.9

UniFi Protect Controller Version

2.10.11

Describe the problem

Hey guys,

I have a clean install of homebridge and this wonderful plugin. Unfortunately, I get the following errors (couldn't find anything related on google or github):

[1/24/2024, 10:21:41 AM] [UniFi Protect] Dream Machine Pro [XXX] Front Door [G4 Doorbell]: Unable to process MQTT message: "". Error: Unexpected end of JSON input. [1/24/2024, 10:21:41 AM] [UniFi Protect] Dream Machine Pro [XXX]: Unable to process MQTT liveview setting: "". Error: Unexpected end of JSON **input.

Anyways, [homebridge-unifi-protect] is working for quite some time but without any notice it stops doing anything and not recognizing any more motion or ring events.

Any advice?

Thanks! Markus

Homebridge HBUP JSON configuration

{
    "controllers": [
        {
            "address": "192.168.X.X",
            "mqttTopic": "unifi/protect",
            "mqttUrl": "mqtt://USER:PASS@192.168.X.X:XXXX",
            "password": "PASS",
            "username": "USER"
        }
    ],
    "name": "UniFi Protect",
    "platform": "UniFi Protect"
}

Relevant log output

[1/24/2024, 10:21:41 AM] [UniFi Protect] Dream Machine Pro  [XXX] Front Door [G4 Doorbell]: Unable to process MQTT message: "". Error: Unexpected end of JSON input.

[1/24/2024, 10:21:41 AM] [UniFi Protect] Dream Machine Pro [XXX]: Unable to process MQTT liveview setting: "". Error: Unexpected end of JSON **input.

[homebridge-unifi-protect] (node:283267) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
(Use `node --trace-deprecation ...` to show where the warning was created)

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

hjdhjd commented 8 months ago

Thanks for the report - the error is because something is trying to speak to HBUP via MQTT and trigger an event and is doing so incorrectly or in an unsupported way. What’re you doing with MQTT?

marrrkus commented 8 months ago

Sorry, I was on a business trip.

I am pushing ring and motion events to ioBroker. There should not be any request coming from ioBroker.

hjdhjd commented 8 months ago

I would take a closer look at what’s coming across MQTT. This message is because someone is publishing a message to unifi/protect/XYZ/liveviews/set - I’m afraid there’s not much more I can do here. Look at the MQTT documentation for more detail on what HBUP expects (in this case a JSON) when using that message.

Best of luck!

github-actions[bot] commented 8 months ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.