MQTT and Homebridge


Today I tried to add a new device to my Homebridge via Nodered and I ended up crashing Homebridge.

I am using Homebridge-MQTT to interface Nodered and Homebridge but it seems like something changed.

Whenever Homebridge starts up I get an error on the topic "homebridge/from/#" saying

"Unexpected token h in JSON at position 0"

The error that shows up on the Homebridge Terminal is

[23/02/2021, 19:20:42] AssertionError [ERR_ASSERTION]: props cannot be undefined when setting props
    at On.Characteristic.setProps (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:974:11)
    at Accessory.setProps (/usr/lib/node_modules/homebridge-mqtt/lib/accessory.js:210:52)
    at Accessory.configureCharacteristics (/usr/lib/node_modules/homebridge-mqtt/lib/accessory.js:155:14)
    at Accessory.configureAccessory (/usr/lib/node_modules/homebridge-mqtt/lib/accessory.js:95:10)
    at Controller.addAccessory (/usr/lib/node_modules/homebridge-mqtt/lib/controller.js:107:17)
    at Model.<anonymous> (/usr/lib/node_modules/homebridge-mqtt/lib/model.js:153:22)
    at MqttClient.emit (events.js:315:20)
    at MqttClient._handlePublish (/usr/lib/node_modules/homebridge-mqtt/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/usr/lib/node_modules/homebridge-mqtt/node_modules/mqtt/lib/client.js:410:12)
    at work (/usr/lib/node_modules/homebridge-mqtt/node_modules/mqtt/lib/client.js:321:12)

Homebridge the restarts,

Anyone have experience with this issue ?

It also seems that Homebridge-MQTT is no longer being worked on, maybe this is the problem


It looks like homebridge-mqtt finds an incorrectly set property. Maybe you can determine which device/service is causing the issue with "mqtt explorer" while homebridge starts up and delete that device from mqtt.

Also your debug assumes JSON, while it could be other forms of data.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.