homebridge-Fibaro-HC2 icon indicating copy to clipboard operation
homebridge-Fibaro-HC2 copied to clipboard

homebridge for fibaro doesnt get connected when the homecenter lite controller restarts

Open allwyn007 opened this issue 4 years ago • 44 comments

my home bridge gets disconnected with fibaro hcl controller whenever the controller restarts... please suggests a way that whenver fibaro homecenter lite restart after 5 minutes homebridge(raspberry pi)should also restart

allwyn007 avatar May 28 '20 13:05 allwyn007

There's no "state" between homebridge and hc, so it shouldn't care if hc/hcl restart. By the way how often do you need to restart hc ?

ilcato avatar May 28 '20 13:05 ilcato

once power goes off, both hc and homebridge(raspberry pi) gets off. once power comeback fibaro needs atleast 2-3 minutes to get started at the same time homebridge starts and is not able to get connected with hc. so i have to restart the homebridge whenever there is power outage and then only its get connected with hc and thus works with homekit..

allwyn007 avatar May 29 '20 12:05 allwyn007

I can suggest to insert a 5 minutes delay in your homebridge startup script. What are you using for the homebridge management?

ilcato avatar May 29 '20 12:05 ilcato

docker

allwyn007 avatar May 29 '20 12:05 allwyn007

how are you starting it?

ilcato avatar May 29 '20 12:05 ilcato

Start Homebridge Run this command to start Homebridge docker run -d --restart=always --net=host
--name=homebridge
-v /storage/homebridge:/homebridge
-e HOMEBRIDGE_CONFIG_UI=1
-e HOMEBRIDGE_CONFIG_UI_PORT=8581
oznu/homebridge:raspberry-pi

allwyn007 avatar May 29 '20 12:05 allwyn007

Homebridge Starts on Boot Open /storage/.config/autostart.sh for editing in nano: nano /storage/.config/autostart.sh

allwyn007 avatar May 29 '20 12:05 allwyn007

@ilcato can you please suggest script.. i am new to coding

allwyn007 avatar May 29 '20 12:05 allwyn007

show me the /storage/.config/autostart.sh file

ilcato avatar May 29 '20 12:05 ilcato

docker restart homebridge

allwyn007 avatar May 29 '20 12:05 allwyn007

this command is added to the bottom of the line /storage/.config/autostart.sh file

allwyn007 avatar May 29 '20 12:05 allwyn007

insert sleep 300 before it

ilcato avatar May 29 '20 12:05 ilcato

so the command will be 'sleep 300 docker restart homebridge'

allwyn007 avatar May 29 '20 13:05 allwyn007

sleep 300 && docker restart homebridge & is this command okay!?

allwyn007 avatar May 29 '20 13:05 allwyn007

No: sleep 300 docker restart homebridge

ilcato avatar May 29 '20 13:05 ilcato

i tried to add but it says no such file or directory

allwyn007 avatar May 30 '20 06:05 allwyn007

In wich operating system are you running the script?

ilcato avatar May 30 '20 07:05 ilcato

raspbian

allwyn007 avatar May 30 '20 07:05 allwyn007

p

allwyn007 avatar May 30 '20 07:05 allwyn007

Try with sudo before the nano command

ilcato avatar May 30 '20 07:05 ilcato

i tried still it says same

allwyn007 avatar May 30 '20 07:05 allwyn007

https://github.com/oznu/docker-homebridge/wiki/Homebridge-on-LibreELEC

i followed the above to setup homebridge

allwyn007 avatar May 30 '20 07:05 allwyn007

Did you try the approach described in the last 2 pages?

ilcato avatar May 30 '20 08:05 ilcato

in which last 2 pages?

allwyn007 avatar May 30 '20 08:05 allwyn007

You posted another to a pdf page before the previous one

ilcato avatar May 30 '20 08:05 ilcato

yes i tried that but that was not working

allwyn007 avatar May 30 '20 08:05 allwyn007

Please execute: ls /storage/.config/autostart.sh

ilcato avatar May 30 '20 08:05 ilcato

it says la command not found

allwyn007 avatar May 30 '20 08:05 allwyn007

Sorry ls

ilcato avatar May 30 '20 08:05 ilcato

it says like this ls: cannot access '/storage/.config/autostart.sh': No such file or directory

allwyn007 avatar May 30 '20 08:05 allwyn007