-
Notifications
You must be signed in to change notification settings - Fork 14
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
Enable UI Elements when network attaches #44
Comments
Right now the player makes 3 attempts (3 seconds each) to connect to the Google DNS server (8.8.8.8). If that fails it doesn't try to check a connection again: Line 335 in c4b5554
As far as I understand you are suggesting to continue checking network connection (e.g. every 10 sec, for how long? forever?) and enable modes on the Home screen whenever connection to the Internet appears. I think that should be doable. The player executes the following command for reboot: Line 2901 in c4b5554
I'm not sure why it doesn't work when you run it from a terminal manually. |
I think it would make sense to continue to check for network every few minutes. Also, it might make sense to check after the network config detects a newly administered connection (or cable plug-in). If I change 8.8.8.8 to the IP on my BB gateway, will the network check also change to that IP? I think that's interesting, b/c having network at home is not the same as having Internet. I'm probably over-thinking it, but it seems that NAS could be available when Internet radio is not. (My BB gateway provides a DNS for the LAN based on the DHCP client IDs.) |
OK, I'll add a thread which will check the Internet connectivity every minute. It will enable/disable the modes in the Home menu accordingly. It will also report status to the log when a connection was dropped or re-enabled.. That connectivity checker depends on the IP which you define in this property: Peppy/configuration/config.txt Line 30 in c4b5554
NAS can be used either for the 'Audio Files' or 'Collection' mode. These modes are enabled even if there is no connection to the Internet: Line 1681 in c4b5554
|
Often, I have to reboot (power cycle) the system several times before it connects to my WiFi and works. I noticed that when there is no network, the functions that depend on the network are greyed out. That makes sense. However, after going to the network configuration and getting it working, those functions are still greyed out. I have to reboot again before they become available, and sometimes this works and sometimes it does not. I think a good enhancement would be to re-enable the functions that rely on network once network is up so that a reboot is not necessary.
Also, I tried to be clever, and ssh to peppy, then do a `systemctl restart peppy'. I was thinking that this would be like a warm boot that would leave networking intact and restart the player. Sadly, that seems to do a shutdown instead.
The text was updated successfully, but these errors were encountered: