JohNan / home-assistant-flichub

Custom HomeAssistant integration for FlicHub
MIT License
8 stars 3 forks source link

Stuck #32

Open pvorthmann opened 3 weeks ago

pvorthmann commented 3 weeks ago

Starting yesterday, the Flic Hub integration is stuck on "initializing" and won't ever start. I tried downgrading my version of home assistant (had updated to 2024.90 yesterday) but that hasn't fixed it.

CannyDuck commented 3 weeks ago

Same for me. See this message on Flic HUB SDK console:

Made by JohNan - https://github.com/JohNan/pyflichub-tcpclient RangeError: host does not a contain a valid IPv4 address: undefined at listen (core.js:1670) at (root/home assistant /main.js:164) at require (core.js:2895) at requireMain (core.js:2903) at handlePacket (core.js:2937) at onPipeData (core.js:2974)

JohNan commented 3 weeks ago

I noticed that myself also.

The solution to this problem is to set the IP when starting the tcp server in the FlicHub

At row 165 in the script

}).listen(PORT, '192.168.1.64', function () {
    console.log("Opened server on port: " + PORT);
});

If you don't know what IP you have on the Hub you can use these lines to find out

Wifi: console.log(network.getState().dhcp.wifi.ip)
Ethernet: console.log(network.getState().dhcp.ethernet.ip) 

For it started the server but as soon as a client connected I got another error

Screenshot_20240906_235332_Chrome.jpg

I'll try to find some time to investigate this

labbs1 commented 1 week ago

Hi @JohNan, I've been trying to get this on track but without any luck. Did you have time to investigate this further?

Thanks

JohNan commented 1 week ago

It was fixed in this commit https://github.com/JohNan/pyflichub-tcpclient/commit/91496e308278670b66e7c8491f0ad163a2602bb1

It's a change of the Hub script where the host is now needed as well as the encoding.

wunni1 commented 3 days ago

Still doesn’t work for me. Changed to the new tp server.js file. But in HomeAssistant: Unable to connect to device. any idea what is going wrong?

Thanks