ageorgios / homebridge-sonoff-tasmota-http

Control Sonoff Basic devices with Tasmota firmware through Homebridge
Other
15 stars 19 forks source link

Sonoff Status Commands Return as JSON #2

Closed alexymik closed 6 years ago

alexymik commented 6 years ago

Sonoff-Tasmota firmware version 5.10.0b

I noticed that the replies from the Sonoff are in JSON format.

Example:

{"POWER":"ON"}

The code as-is now returns undefined for the accessory state which causes Homebridge to lock up in a strange state.

I rewrote the accessory functions to use JSON.parse successfully, will commit soon

ageorgios commented 6 years ago

I have noticed it too but found no time to fix it. The pull request would be welcome.

alexymik commented 6 years ago

I sent the request -- however I have no idea if the older versions of the firmware work the way you have it in your original version. Not backwards compatible...