seydx/homebridge-camera-ui

MQTT JSON issues for doorbell messages

Eiluviann opened this issue · 0 comments

Describe the bug
MQTT message is sent as a JSON object. When a JSON object is provided as doorbellMessage in config, message is skipped because it is looking for a full plaintext match rather than specific value in JSON object as expected.

To Reproduce

  1. Enable doorbell for a camera
  2. Set topic for the doorbell MQTT message, set MQTT message to JSON object (via JSON config)
  3. Send MQTT message matching the configured topic with a JSON payload that should trigger the doorbell
  4. Log message appears saying that message does not match (configured message appears as [object Object])

Expected behavior
JSON object provided in doorbellMessage should be compared with incoming message. If incoming message is JSON and contains appropriate properties with appropriate values - doorbell should be triggered

Logs
(not available at the moment as I have switched to plain text)

Screenshots
N/A

Environment

  • Node.js Version: v18.16.0
  • Homebridge Version: v1.6.1
  • Camera UI Version: v5.0.27
  • Operating System: Ubuntu Jammy Jellyfish (22.04.3 LTS) (docker image)
  • Browser: Firefox Developer Edition, Safari