cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 39 forks source link

Invalid JSON format #75

Closed sap-err closed 5 years ago

sap-err commented 5 years ago

Hi, I'm using temperature sensor. It works ok form Mqtt console. But when I send mqtt message from my driver automatically - I get an error: Topic: /AGK_MQTTGate_2048703094/cmd/homebridge/to/set payload: {"name": "Temperature (ID=A16096DB)", "service_name": "temperature", "characteristic": "CurrentTemperature", "value": "26.00"} response topic: /AGK_MQTTGate_2048703094/cmd/homebridge/from/response response message: {"ack":false,"message":"invalid JSON format"}

And again it works ok with the same data from console. Could you help me please?

cflurin commented 5 years ago

Hi, It seems that your payload is invalid. Use a tool like: https://github.com/thomasnordquist/MQTT-Explorer and check what your driver is sending.

sap-err commented 5 years ago

Thanks a lot, found that there was an ending 0 in the package. Now it works. But I have one more question. Why is the name of added accessory is ignored in My home app? It seems that the service_name is displayed instead.