[IDEA] Use rpi LEDs as status LEDs for moOde itself - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: [IDEA] Use rpi LEDs as status LEDs for moOde itself (/showthread.php?tid=2445) |
RE: Use rpi LEDs as status LEDs for moOde itself - Tim Curtis - 04-30-2020 (04-30-2020, 01:04 AM)TheOldPresbyope Wrote:(04-29-2020, 11:17 PM)romain Wrote:(04-29-2020, 11:10 PM)Tim Curtis Wrote: What the issue with NFS? I don't have any experience with it. lol, the good ol days. @romain I'm still not clear whether any coding changes are necessary in your script to deal with the NFS stuff. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 (04-30-2020, 01:04 AM)TheOldPresbyope Wrote:I agree with Kent, since the share is already mounted with 'ro' option data integrity on the NFS server will be preserved anyway and hard mount becomes unnecessary.(04-29-2020, 11:17 PM)romain Wrote:(04-29-2020, 11:10 PM)Tim Curtis Wrote: What the issue with NFS? I don't have any experience with it. Add this to the freeze it may induce and you have already two reasons not to use NFS hard mounts imho. In the worst case with soft mounts, the connection will be lost and the client will stop contacting the server. If the server gets back online, the script will remount the share automatically. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 (04-30-2020, 01:26 AM)Tim Curtis Wrote:Tim, there are no changes necessary in my script if you decide to go with NFS soft mount as the default behaviour.(04-30-2020, 01:04 AM)TheOldPresbyope Wrote:(04-29-2020, 11:17 PM)romain Wrote:(04-29-2020, 11:10 PM)Tim Curtis Wrote: What the issue with NFS? I don't have any experience with it. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 (04-30-2020, 01:25 AM)Tim Curtis Wrote:Maybe something like a 'LED Operation' dropdown list with two options:(04-29-2020, 11:28 PM)romain Wrote:(04-29-2020, 10:25 PM)Tim Curtis Wrote: I think auto-remount is goodness for all users but I'll have to think about how the LED status feature will co-exist with the existing LED feature. The existing feature is for users that want to turn the LED's off. Maybe on System Config we could do drop downs like below.Rethinking about how both features would co-exist, I think LED0 and LED1 shouldn't be set independantly when choosing the "Mount Status" because both LEDs are useful for this purpose. Does it make sense ? - On/Off (default) - Mount Status with the LED0/LED1 toggle switches just below If the user chooses the Mount Status option then the LED0/LED1 toggle switches could become unavailable, hidden or greyed out, and the LEDs would be disabled by worker.php letting the systemd service handle them. Maybe too complicated, I don't know. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 @Tim Curtis for more clarity maybe you could rename the script and systemd files to 'mountstatus' rather than 'checksources' which doesn't sound very explicit. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 @Tim Curtisyou'll probably have to change something in worker.php when mount status is enabled ; rc.local by default is started after all the other services and executes worker.php lastly. If LEDs are disabled in favour of mount status, worker.php, as it works actually, switches the LEDs off after mount status is started and you have to wait for about one minute to see the LEDs on again. For testing, I've delayed the execution of mount status after rc-local.service in the systemd unit file but it didn't change anything. RE: Use rpi LEDs as status LEDs for moOde itself - Tim Curtis - 04-30-2020 It will probably have to run within workers job processing loop similar to clock radio etc. RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 (04-30-2020, 03:14 PM)Tim Curtis Wrote: It will probably have to run within workers job processing loop similar to clock radio etc.OK Tim RE: Use rpi LEDs as status LEDs for moOde itself - romain - 04-30-2020 (04-30-2020, 03:14 PM)Tim Curtis Wrote: It will probably have to run within workers job processing loop similar to clock radio etc. Tim, just for testing, I've disabled both systemd service and timer units before putting the following commands in worker.php, after line 631: Code: sysCmd('systemctl start checksources.service'); I don't know exactly if this how and where it should be added but now mount status works at startup. RE: Use rpi LEDs as status LEDs for moOde itself - Tim Curtis - 04-30-2020 I was initially thinking of doing the logic in the while loop as a checkSources() function but your approach should work just fine :-) |