ageorgios / homebridge-sonoff-tasmota-http

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

invalid hostname? #5

Closed troglodisme closed 6 years ago

troglodisme commented 6 years ago

Hi there,

I am trying to run your plugin for homebridge but can't seem to get the setup right. I can run the tests in the browser and my sonoff turns on and off, but when I introduce the settings in the homebridge config file it doesn't seem to like it.

My config:

{ "accessory": "SonoffTasmotaHTTP", "name": "SonoffTasmotaHTTP", "hostname": "192.168.1.31"

    }

I get this in the terminal:

undefined:1 RESULT = {"POWER":"ON"} ^

SyntaxError: Unexpected token R in JSON at position 0 at JSON.parse () at Request._callback (/usr/local/lib/node_modules/homebridge-sonoff-tasmota-http/index.js:32:29) at Request.self.callback (/usr/local/lib/node_modules/homebridge-sonoff-tasmota-http/node_modules/request/request.js:186:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (/usr/local/lib/node_modules/homebridge-sonoff-tasmota-http/node_modules/request/request.js:1163:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-sonoff-tasmota-http/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1055:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) Homes-iMac:~ home$

ageorgios commented 6 years ago

The Tasmota compatible version of the plugin is 5.10.0b and later

If you need compatibility with previous Tasmota versions, fork this commit: https://github.com/ageorgios/homebridge-sonoff-tasmota-http/tree/6f73a32fd8ae01f16813f8f0bd3844d3da469e4d