Hi,
I'm trying to activate the autodim display plugin via CLI.
In other words I want to to trigger the dim time earlier as set in the options.
The idear is to send the command while I shutdown my pc in the evening.
Some bash script will do the trick ...of course with some preconditions depending on the current time.
It tried some things with the CLI but did'nt succeed.
As I understood I have to send the MAC address followed by pluginname and other commands. But I don't think there is a CLI programmed for autodim.
Is there an other way?
Thanks in advance!
Results 1 to 7 of 7
Thread: Activate AutoDim via cli/bash
-
2009-08-25, 03:23 #1Member
- Join Date
- Oct 2007
- Posts
- 78
Activate AutoDim via cli/bash
System: Ubuntu, SqueezeCenter-Version: 7.5.5 - r32671, perl 5.008008
Player: Squeezebox v3 @ Bose LifeStyle Series III, Squeezebox Radio, Squeezebox Boom
Plugins: TrackStat, SugarCube, Dynamic Playlists, AutoDim
-
2009-08-25, 16:42 #2Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
Auto Display needs some minor changes to allow you to change the dim time via CLI (you can change the preference with the CLI, but Auto Display currently won't re-assess its "next run" schedule in response to a preference change via CLI).
Have you looked at Gordon Harris' SvrPowerControl plugin (http://forums.slimdevices.com/showthread.php?t=48521)? I'm not sure what you hope to achieve with Auto Display, but there's a good chance that Gordon's plugin will be of interest to you -- many people use it to make Squeezeboxes handle server shutdowns more gracefully.http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock
-
2009-08-25, 20:43 #3Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
If you want to try this with AutoDisplay, try version 2.1.8 which is now in my testing repository, http://www.tux.org/~peterw/slim/slim7/repodata-test.xml
You will need to be using SqueezeCenter 7.3 -- I have not tested with 7.2, so the installation file for AutoDisplay specifies that SC 7.3 is required, even though it probably would work with 7.2.x, probably even 7.0.x, if you wanted to install it manually (including editing the install.xml file).
AutoDisplay uses 4 different player prefs: autodisplay_off_time (time to go dim at night), autodisplay_on_time (time to restore the normal brightness), autodisplay_flag (whether to use AutoDisplay for the player, 0=no, 1=yes), and autodisplay_brightness (brightness level, 0=dark, etc.). Version 2.1.8 now reassesses the dim/bright schedule if you change the on or off times.
Times for autodisplay_off_time and autodisplay_on_time are expressed as seconds after midnight local time. E.G., 8:00 pm is 20:00 hours, so that would be 72000. To set the preference, you'd use a CLI command like
Let me know how it goes!Code:00:04:20:11:22:33 playerpref plugin.autodisplay:autodisplay_off_time 72000
PeterLast edited by peterw; 2009-08-25 at 21:42.
http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock
-
2009-08-26, 14:08 #4Member
- Join Date
- Oct 2007
- Posts
- 78
He Peter,
just saw your post and I think I have to explain what I'm trying to do a little bit more detailed.
My Server is running Squeezecenter 24/7. And currently there is no need to change this.
The computer in my room which is turned on at least for a short time to check mails once a day before I go to bed is the computer I want to use to send a cli command to my server to darken the display of the Squeezebox in my room.
Your cli expansion as I understand it, is made to permanently change the off_time. What I actually need is to temporary change it for the case I go to bed early and don't want to be bothered by the Squeezeboxes flarelight.
So I would just need a flag that is settable via cli that tells my Squeezebox to be darkened till the next on_time.
Your current version would do the trick too, but I would have to set up a cronjob to restore the "original" off_time.
Thanks a lot for your effort and improvements so far!
Hope this will be possible too.Last edited by Blu3IcE; 2009-08-26 at 14:13.
System: Ubuntu, SqueezeCenter-Version: 7.5.5 - r32671, perl 5.008008
Player: Squeezebox v3 @ Bose LifeStyle Series III, Squeezebox Radio, Squeezebox Boom
Plugins: TrackStat, SugarCube, Dynamic Playlists, AutoDim
-
2009-08-26, 15:13 #5Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock
-
2009-08-27, 02:05 #6Member
- Join Date
- Oct 2007
- Posts
- 78
Yes, right, but that would be a very ugly hack around the Squeezecenter since I don't have a get "original_off_time" to restore it.
And because of the separated client server architecture "original_off_time" could only be read by the client (which is the only one who knows the time he sends the earlier off_time) but the cron job (who needs this "original_off_time") has to be on the server.
Without restore I could reduce it all to this:
In the evening/or at client shutdown: echo '00:04:20:xx:xx:xx playerpref powerOffBrightness 0' | nc 192.168.x.x 9090 -w1 >>/dev/null
In the morning: echo '00:04:20:xx:xx:xx playerpref powerOffBrightness 4' | nc 192.168.x.x 9090 -w1 >>/dev/null
But for a real integration to Squeezeserver I would really appreciate a solution that not includes any cron jobs.System: Ubuntu, SqueezeCenter-Version: 7.5.5 - r32671, perl 5.008008
Player: Squeezebox v3 @ Bose LifeStyle Series III, Squeezebox Radio, Squeezebox Boom
Plugins: TrackStat, SugarCube, Dynamic Playlists, AutoDim
-
2009-08-27, 06:05 #7Senior Member
- Join Date
- Oct 2005
- Posts
- 2,769
The client could query the original value, store a new pref that you name ("original_off_time" would do fine) before changing the real pref, and the server job that runs in the middle of the night could query your new pref so it knows what to restore.
So you probably need to write some Perl. AutoDisplay is GPL so you can certainly modify it (just as I have) if you don't want to write a new plugin or modify core Logitech code. You could also use a long-running app on the server that subscribes to prefset events via the CLI, but that sounds worse to me than a cron job.But for a real integration to Squeezeserver I would really appreciate a solution that not includes any cron jobs.http://www.tux.org/~peterw/
Note: The best way to reach me is email or PM, as I don't spend time on the forums.
Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

Reply With Quote

