rainlake / homebridge-platform-lightify

MIT License
13 stars 5 forks source link

Discovered failed connect timeout #23

Closed SiGmAX666 closed 4 years ago

SiGmAX666 commented 4 years ago

Edit: Config issue. I used the wrong freaking variable. RTFM. PEBKAC!

dalethomas81 commented 4 years ago

Try pinging the Lightify gateway from the Docker container and also check your firewall settings. From the log, it looks like either 192.168.50.102 is not the Lightify gateways address or it cannot reach the gateway. Also, make sure your homebridge-lightify instance is not running simultaneously.

Sent from my iPhone

On Jan 4, 2020, at 10:10 PM, SiGmAX666 notifications@github.com wrote:

 I am trying to change from homebridge-lightify which works perfectly (but can't do automations of more than one Lightify device at a time) to homebridge-platform-lightify. I have 3 dimmable A19 bulbs, nothing special.

As I am running in Docker, I simply moved my entire ./homebridge folder and re-created it, with a single config for homebridge-platform-lightify to try and narrow down the discovery failure issue.

"platforms": [
    {
        "platform": "Lightify",
        "host": "192.168.50.102",
        "name" : "Lightify",
        "showGroups" : false,
        "hideNodes" : false
    }
]

The result is what I get in my log file, over and over again.

[1/4/2020, 7:03:54 PM] Loaded plugin: homebridge-platform-lightify [1/4/2020, 7:03:54 PM] Registering platform 'homebridge-platform-lightify.Lightify' [1/4/2020, 7:03:54 PM] --- [1/4/2020, 7:03:54 PM] Loading 1 platforms... [1/4/2020, 7:03:54 PM] [Lightify] Initializing Lightify platform... [1/4/2020, 7:03:54 PM] Loading 0 accessories... [1/4/2020, 7:03:54 PM] [Lightify] connection has error undefined [1/4/2020, 7:04:14 PM] [Lightify] can not connect to lightify bridge, timeout [1/4/2020, 7:04:14 PM] [Lightify] Discovered failed connect timeout [1/4/2020, 7:04:16 PM] Loaded config.json with 0 accessories and 1 platforms. Am I doing something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SiGmAX666 commented 4 years ago

The other instance is definitely not running, I removed and replaced it for testing purposes. I am pretty familiar with Docker as I've used it for 3yrs and run 30+ containers currently, I am sure I did this part correctly.

That is also definitely the static IP of Lightify - I assign static up to x.200 on my IoT subnet - and it is pingable from within the container. Same IP also works great under homebridge-lightify.

SiGmAX666 commented 4 years ago

Bump..any other input?

dalethomas81 commented 4 years ago

This is a curious issue but I’m certain it’s not this plugin causing this. Did you try turning off your firewall? The gateway uses port 4000. Even though you can ping it you may need to open that port. I don’t know enough about Docker to speak on that. Also, I recommend moving over to node-red and using the node-Lightify library directly. This is what I have done and haven’t looked back.

SiGmAX666 commented 4 years ago

With great embarrassment, I confess to PEBKAC. I re-RTFM tonight and started with a fresh fresh RPi running Homebridge in Docker and it is working great. The issue was my config. I started with a fresh config and noticed the error in my ways. bridge_ip vs host from other lightify plugins. Oops.

Also @dalethomas81 I do plan to Node-RED to the Dockerized RPi in the future, it's how I control some DIY IoT devices at a different location (also running on RPi with Docker). I highly suggest Docker for any sort of appliance application, it adds minimal overhead and makes upgrades and backups much easier through segmentation.