ebaauw / homebridge-rpi

Homebridge plugin for Raspberry Pi.
Apache License 2.0
308 stars 18 forks source link

Error: Invalid host #88

Closed pespinel closed 3 years ago

pespinel commented 3 years ago

As I saw in other issues (#50) the connection to localhost or 127.0.0.1 was being rejected.

The only workaround was to set the host key to "::1" and now all the Homekit accessories from RPI are working (Smoke, Light, Temperature) but I'm getting the following error in the HomeBridge console:

[25/03/2021, 00:17:06] [RPi] error: unhandled rejection: RangeError: host: not a valid host
    at newRangeError (/usr/local/lib/node_modules/homebridge-rpi/node_modules/homebridge-lib/lib/OptionParser.js:22:52)
    at Function.toHost (/usr/local/lib/node_modules/homebridge-rpi/node_modules/homebridge-lib/lib/OptionParser.js:320:13)
    at Object._callbacks.<computed> [as host] (/usr/local/lib/node_modules/homebridge-rpi/node_modules/homebridge-lib/lib/OptionParser.js:664:33)
    at OptionParser.parse (/usr/local/lib/node_modules/homebridge-rpi/node_modules/homebridge-lib/lib/OptionParser.js:807:29)
    at new PigpioClient (/usr/local/lib/node_modules/homebridge-rpi/lib/PigpioClient.js:354:18)
    at RpiPlatform.checkDevice (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiPlatform.js:201:16)
    at RpiPlatform.init (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiPlatform.js:156:22)
    at RpiPlatform.<anonymous> (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiPlatform.js:17:46)
ebaauw commented 3 years ago

Did you try [::1]?

Not sure where you got that workaround from? The issue you mention suggests to allow remote connections to pigpiod as workaround.