Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

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

Open
allwyn007 opened this issue May 28, 2020 · 44 comments

Comments

@allwyn007
Copy link

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

@ilcato
Copy link
Owner

ilcato commented May 28, 2020

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 ?

@allwyn007
Copy link
Author

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..

@ilcato
Copy link
Owner

ilcato commented May 29, 2020

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

@allwyn007
Copy link
Author

docker

@ilcato
Copy link
Owner

ilcato commented May 29, 2020

how are you starting it?

@allwyn007
Copy link
Author

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
Copy link
Author

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

@allwyn007
Copy link
Author

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

@ilcato
Copy link
Owner

ilcato commented May 29, 2020

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

@allwyn007
Copy link
Author

docker restart homebridge

@allwyn007
Copy link
Author

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

@ilcato
Copy link
Owner

ilcato commented May 29, 2020

insert sleep 300 before it

@allwyn007
Copy link
Author

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

@allwyn007
Copy link
Author

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

@ilcato
Copy link
Owner

ilcato commented May 29, 2020

No:
sleep 300
docker restart homebridge

@allwyn007
Copy link
Author

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

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

In wich operating system are you running the script?

@allwyn007
Copy link
Author

raspbian

@allwyn007
Copy link
Author

p

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

Try with sudo before the nano command

@allwyn007
Copy link
Author

i tried still it says same

@allwyn007
Copy link
Author

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

i followed the above to setup homebridge

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

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

@allwyn007
Copy link
Author

in which last 2 pages?

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

You posted another to a pdf page before the previous one

@allwyn007
Copy link
Author

yes i tried that but that was not working

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

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

@allwyn007
Copy link
Author

it says la command not found

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

Sorry ls

@allwyn007
Copy link
Author

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

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

But you previously said that it contains:
docker restart homebridge

@allwyn007
Copy link
Author

i thought so but now iam trying to nano its not showing... is it possible to create again

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

You must create the .config Folder before with mkdir /storage/.config

@allwyn007
Copy link
Author

it says like this
mkdir: cannot create directory ‘/storage/.config’: Permission denied

@allwyn007
Copy link
Author

i tried with sudo
its created

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

use sudo mkdir /storage/.config

@allwyn007
Copy link
Author

its created ... can you tell me the next step

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

sudo nano /storage/.config/autostart.sh

@allwyn007
Copy link
Author

i did it and i pasted the sleep 300 docker restart homebridge but still the problem exists

@allwyn007
Copy link
Author

i mean the homebridge is not getting restarted

@allwyn007
Copy link
Author

with respect to 300

@ilcato
Copy link
Owner

ilcato commented May 30, 2020

Did you put th 2 commands into 2 different lines?

@allwyn007
Copy link
Author

yes...
still not working

@ilcato
Copy link
Owner

ilcato commented Apr 25, 2021

Did you restart the raspbian machine ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants