MacWyznawca / homebridge-mqtt-switch-tasmota

Plugin to HomeBridge optimized to work with firmware Sonoff-Tasmota, MQTT.
MIT License
57 stars 18 forks source link

error running homebridge with plugin #11

Closed nikki-reprap closed 6 years ago

nikki-reprap commented 6 years ago

When ive installed this plugin I get the following error I have tried verifying my config.json and it is fine. am not sure what to try next. I am running on a pi 2 Jessie node.js was installed via apt-get

Thanks Nikki

pi@raspberrypi:~ $ homebridge WARNING The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister [9/11/2017, 10:48:00 AM] Loaded plugin: homebridge-mqtt-switch-tasmota [9/11/2017, 10:48:01 AM] Registering accessory 'homebridge-mqtt-switch-tasmota.mqtt-switch-tasmota' [9/11/2017, 10:48:01 AM] --- [9/11/2017, 10:48:01 AM] Loaded config.json with 1 accessories and 0 platforms. [9/11/2017, 10:48:01 AM] --- [9/11/2017, 10:48:01 AM] Loading 0 platforms... [9/11/2017, 10:48:01 AM] Loading 1 accessories... [9/11/2017, 10:48:01 AM] [Lights] Initializing mqtt-switch-tasmota accessory... [9/11/2017, 10:48:01 AM] [Lights] Nazwa do RESULT power /usr/lib/node_modules/homebridge-mqtt-switch-tasmota/node_modules/mqtt/lib/connect/index.js:62 opts.protocol = opts.protocol.replace(/\:$/, ''); ^

TypeError: Cannot read property 'replace' of null at Object.connect (/usr/lib/node_modules/homebridge-mqtt-switch-tasmota/node_modules/mqtt/lib/connect/index.js:62:34) at new MqttSwitchTasmotaAccessory (/usr/lib/node_modules/homebridge-mqtt-switch-tasmota/index.js:94:21) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:265:29) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:81:38) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12)

nikki-reprap commented 6 years ago

Solved. I had accidentally deleted the mqtt;//

nikki