# MQTT and Homebridge

**URL:** <https://discourse.nodered.org/t/mqtt-and-homebridge/41508>\
**Category:** General\
**Created:** [23 February 2021 19:24 UTC](https://discourse.nodered.org/t/mqtt-and-homebridge/41508 "2021-02-23T19:24:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bskitter](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@bskitter](https://discourse.nodered.org/u/bskitter)\
**Post date:** [23 February 2021 19:24 UTC](https://discourse.nodered.org/t/mqtt-and-homebridge/41508/1 "2021-02-23T19:24:14Z")

</div>

Hello,

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

```auto
[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

Byron

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 February 2021 19:50 UTC](https://discourse.nodered.org/t/mqtt-and-homebridge/41508/2 "2021-02-23T19:50:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 April 2021 19:51 UTC](https://discourse.nodered.org/t/mqtt-and-homebridge/41508/3 "2021-04-24T19:51:27Z")

</div>

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