Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check online status first #8

Open
CloneDevil opened this issue Feb 3, 2018 · 11 comments
Open

check online status first #8

CloneDevil opened this issue Feb 3, 2018 · 11 comments

Comments

@CloneDevil
Copy link

Is it possible to add a status check by pinging the server first?
At the moment the whole Homebridge gets nearly locked when the server is not online.

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

Good input.

Does homebridge lock up while waiting for a reply from Plex or is it just constantly retrying and thus blocking homebridge?

@CloneDevil
Copy link
Author

I think the problem occurs when I open the Homebridge-App and it automatically checks the status after selecting the room with the Plex-Server in it. I will look in the log-files later when I am at home.

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

That would certainly help fixing the ussue.

@CloneDevil
Copy link
Author

CloneDevil commented Feb 5, 2018 via email

@mpbzh
Copy link
Owner

mpbzh commented Feb 5, 2018

Feel free to reopen the issue when my code decides to act up again 😉

@mpbzh mpbzh closed this as completed Feb 5, 2018
@CloneDevil
Copy link
Author

CloneDevil commented Feb 6, 2018

Oh. Wrong github-repository!! I am testing too many projects at once.
In the log it says:
Getting current state...

Then after a while:
Error getting state (status code 1): Error: connect ETIMEDOUT [my plex ip address]:32400

@mpbzh
Copy link
Owner

mpbzh commented Feb 7, 2018

That still does not really answer my question:

Does homebridge lock up while waiting for a reply from Plex or is it just constantly retrying and thus blocking homebridge?

A slow request should not block the whole homebridge, because these requests are asynchronous which means homebridge should just go on working while it waits for the Plex server to reply.

Also it should not retry more quickly than it checks for the status anyways.

@CloneDevil
Copy link
Author

Ok. I try to describe it as well as possible:
I stopped Homebridge as service and startet it per SSH with "sudo homebridge"
After waiting for a while to load I open the Homekit-App on my iPhone and select the room with the Plex-Status inside I see in the running SSH-window this message: "Getting current state..." No other Homebridge accessory can update for ca. half a minute.
So the answer is that Homebridge locks up.

@mpbzh
Copy link
Owner

mpbzh commented Feb 7, 2018

This looks like a platform limitation: homebridge/homebridge#948

I'm not sure what to do about it. While I agree, that a non-reachable Plex should not block the whole homebridge, I'll have to think of an elegant solution for that problem.

Feel free to comment with any good ideas.

@mpbzh mpbzh reopened this Feb 7, 2018
@A320Peter
Copy link

Has anyone came up with a solition for this? My homebridge also completely locks up if my plex server is not running and in Home app I navigate to the room which contains this plex sensor. If plex server is running, everything is fast.

@MikeDeltaHH
Copy link

Think there isn´t a solution!? To avoid this i´ve made an extra room (like homecinema) in my home with only this device and when my plex server is off i don´t navigate to this room... not perfect but better than nothing...

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

No branches or pull requests

4 participants