metbosch / homebridge-http-temperature

HomeBridge HomeKit Plugin for HTTP temperature endpoints
https://www.npmjs.com/package/homebridge-http-temperature
Apache License 2.0
33 stars 18 forks source link

shelly 1PM with a temperature add-on #35

Closed colussim closed 6 months ago

colussim commented 7 months ago

Hello, I would like to use this plugin with a shelly 1PM with a temperature add-on. I use this configuration : { "accessory": "HttpTemperature", "name": "Temperature Exterieur", "url": "http://X.X.X.X/rpc/Temperature.GetStatus?id=100&format=json", "http_method": "GET", "field_name": "tC", "units": "C", "debug": true, "auth": { "user": "admin", "pass": "XXXXXXXX" } }

the shelly query returns the following result: {"id": 100,"tC":17.8, "tF":64.1}

I have the following error : Error updating state: Unexpected end of JSON input

An idea of the problem ?

Thanks, Emmanuel

metbosch commented 7 months ago

@colussim Please check that there is no hidden character after the JSON. The error seems to comes from the JSON parser which is not able to properly parse the data.

colussim commented 6 months ago

Hi @metbosch sorry for the late return, it was indeed a character problem in the json file, Thanks