Topic: manually switching to night mode?
Hi there,
I would like to switch my chumby to nightly mode by a script. Is there a command that can do this?
Ctop
You are not logged in. Please login or register.
chumbysphere forum → Software → manually switching to night mode?
Hi there,
I would like to switch my chumby to nightly mode by a script. Is there a command that can do this?
Ctop
Try this:
#!/bin/sh
stop_control_panel
echo 1 > /tmp/nightmode
start_control_panel
This exploits a feature of the Control Panel that restores Night Mode if it crashes and restarts for some reason in the middle of the night.
Great! Thanks,
Ctop
Update:
I have tried it now, that I can connect to my Chumby again.
As far as I can see, this does not change the mode -- if the Chumby is already in nightmode, this script will restore the controlpanel in nightmode, but if not, it will restart in normal mode.
What I want to achieve is switching to nightmode whatever the current mode is.
Ctop
Hmmm, I just tried it and it seemed to work for me.
By putting the '1' in /tmp/nightmode, the Control Panel should start up in Night mode, no matter what mode it was previously in.
Duane,
This seems to be a tricky one. Your script does not seem to work reliably if the dimlevel is 2 (screen off). After a lot of experimenting, I ended up with this script:
#!/bin/sh
stop_control_panel
sleep 2
echo 0 > /proc/sys/sense1/dimlevel
sleep 1
echo 1 > /proc/sys/sense1/dimlevel
echo 1 > /tmp/nightmode
start_control_panel
By switching the screen on for a moment and then to level 1 it does indeed end up in nightmode at the end. I will see if this fulfills my requirements.
Thanks for your help, anyway,
Ctop
chumbysphere forum → Software → manually switching to night mode?
Powered by PunBB, supported by Informer Technologies, Inc.