Topic: Night Mode Alternatives

Rather than just showing a clock, it would be nice to be able to pick a night-time widget (such as Chumby sleeping, etc.) to display.

Re: Night Mode Alternatives

Yeah, I think that would be a good idea.

Re: Night Mode Alternatives

As someone else has suggested, I'd like to have a night mode that totally disables the screen...I am extraordinarily sensitive to light when falling asleep/sleeping and need complete blackness.  Lighting up when the alarm goes off would be an added bonus smile

Joan
wohali@EFNet or freenode

Re: Night Mode Alternatives

I wrote a little script that turns off the display, disables the touchscreen and disconnects the wifi during nightmode. If it's running you can't tell whether the chumby is on or off, except that the device is a little bit warm smile

Precondition: Screen-brightness has to be set to full, because I use that for detecting the night mode.

I put the following script under "/psp/goodNightChumby.sh"

#!/bin/sh
if [ $(cat /proc/sys/sense1/dimlevel) == 1 ]; then
  echo 2 > /proc/sys/sense1/dimlevel
  echo 0 > /proc/chumby/touchscreen/enable
  ifconfig rausb0 down
  while [ $(cat /proc/sys/sense1/dimlevel) == 2 ]; do
     sleep 10
  done
  echo 1 > /proc/chumby/touchscreen/enable
  # at this position, I have to do some network-config,
  # but normally start_network.sh should do everything needed.
  /usr/chumby/scripts/start_network.sh
fi

And in /psp/crontabs/root I added the line:

* * * * * /psp/goodNightChumby.sh

So, every full minute there is a check whether chumby is in night mode and turns everything off in that case. It only wakes up by the topswitch and by an alarm.

Re: Night Mode Alternatives

Why thank you, sir. This was perfect. I removed turning off the network drivers (commented out ifconfig and start_network.sh)

Now given this mechanism, it's possible even to kill off the control panel and run some other widget (if you go and edit the flashplayer_watchdog as well). You'd have to stash the .swf file somewhere in the JFFS2 filesystem.

This might be the next thing to investigate...I just need a nice widget to run at night. For someone else. I'll be happy with it black. smile

Joan
wohali@EFNet or freenode

Re: Night Mode Alternatives

wohali wrote:

Why thank you, sir. This was perfect. I removed turning off the network drivers (commented out ifconfig and start_network.sh)

You need network when the screen is deactivated? smile

wohali wrote:

Now given this mechanism, it's possible even to kill off the control panel and run some other widget (if you go and edit the flashplayer_watchdog as well). You'd have to stash the .swf file somewhere in the JFFS2 filesystem.

Killing the control panel is a much bigger deal, because then I would have to take care about the alarms myself and monitor the topswitch. If you want to use a certain widget during night, just create a channel called "night mode" or something this way, add your widget, and instead of going to night mode simply select that channel. That would have nearly the same result smile

Greetings from Austria
Christian

Re: Night Mode Alternatives

OMG- I'd looove to customize my night-mode... from controlling the brightness of the screen's background and the clock, to choosing alternate "themes" for the night-mode (such as make it a dark, low-contrast fishbowl, or show a sleeping kitty or a sleeping moon, or a sleeping Chumby- something more playful than the clock- u get it). big_smile

8 (edited by Beastlykings 2008-03-11 18:47:08)

Re: Night Mode Alternatives

Thank you sir!
I'm gonna try this tonight!

So this is activated when I turn on night mode, and it all goes back to normal afterwards?


-Tom


EDIT: I'm gonna change it up a little bit, I'm gonna keep network on for mah podcasts.
Btw what was the point of turning off the touchscreen?

Re: Night Mode Alternatives

I posted another night-mode detector script to automatically decrease the audio volume and then stop the player. Handy if you play music stream at night with the screen set to night mode, like me.
http://forum.chumby.com/viewtopic.php?pid=10812#p10812

Re: Night Mode Alternatives

Beastlykings wrote:

So this is activated when I turn on night mode, and it all goes back to normal afterwards?

exactly

Beastlykings wrote:

what was the point of turning off the touchscreen?

I don't want to activate the screen accidentally. With the touchscreen disabled I have to hit the topswitch to wake it up.

Re: Night Mode Alternatives

Christian or anyone that has experience,

I need your help - I used Christian's script and done exactly as you/he stated:
1) used vi to create a script file as listed above, in /psp/ called goodNightChumby.sh
2) I amended the /psp/crontabs/root as described

But the script does not work...I am running in full brightness and then I turn-on nightmode - and nothing happens.

I am running Beta - 2.6.68 does that make a difference?

let me know,
stuart.

Re: Night Mode Alternatives

Christian / others?

Do I need to mark the script as executeable?

Something like Code:
chmod a+x /psp/goodNightChumby.sh

Let me know,
stuart.

Re: Night Mode Alternatives

All,

I answered my own question - after you do all this - you need to mark the script as executable for it to work - maybe you'll knew this, but being new - it was new to me.

stuart.