Results 1 to 9 of 9
Like Tree4Likes
  • 1 Post By footloose man
  • 2 Post By jonwise80
  • 1 Post By jonwise80
  1.    #1  
    Are there any Night Modes for WebOS like f.lux?
    That seem like the one thing my newer tablet has.

    It’s cool the community is still active, and it makes me happy to see I can still use my HP TouchPad after letting it sit off for 3 years with just some little fixes that people keep writing.
    Preemptive likes this.
  2. #2  
    I have also been wondering about this. Using Redshift on desktop, but i don't know if it would translate.
  3. #3  
    We discussed this at the user group meeting. The comment was that there do not appear to be configuration settings for this. I commented on the ambient light sensor, but I'm doubtful it reads colour - it's very likely to be a simple brightness detector.

    However, there are both front and rear cameras. The interface remains basic, but it's very likely that there is an auto white balance feature - where the colour cast of the image is adjusted for the ambient light. It's possible that perhaps the front camera could be used to get a reading via whatever interface in the system.

    I mention this because i think it's very likely that it is possible to control the colour. If it can be done on other mobiles, it's likely technically possible on Palm phones - assuming that there's something in the readable code for it or if the specs of the display and it's driver are known. Whether or not those things are practical, I don't know. However, webOS is a Linux system and f.lux & redshift work on multiple desktop & mobile systems. They must therefore be 'talking to' a common system interface.

    It seems both have command line access. Redshift assumes the display default is a daylight equivalent and adjusts accordingly. So it may be dialling in an adjustment rather than an absolute setting, but whatever works...

    I've seen it noted that no two displays are exactly the same colour - due to the manufacturing process, but I imagine they are close and for colour-dependant work, default adjustments can be made to the relative colour levels and brightness. I suspect for mobile displays, it's a case of 'close enough' or 'reject' as it's unlikely anyone is doing colour sensitive work on a mobile screen.

    So if anyone with the skills wants to try, I suggest installing a CLI version of either or both of the above programs and attempting to adjust colour via the CLI. If there is no apparent system configuration setting, it may simply be that the screen is at 'default'. If redshift assumes that and adjusts from there, it might be the obvious candidate (maybe f.lux is the same, I don't know).

    Anyhow, if it works, then a simple button GUI for 'day' or 'night' could be built. Then it could be connected to the clock to auto correct (run in background?) and change across the day. The super advanced step would be to sample any auto-white data from the cameras and brightness from the ambient light sensor, allowing the display to alter according to the circumstances, defaulting to the time of day setting.
    Last edited by Preemptive; 10/25/2018 at 11:44 AM.
  4. #4  
    Quote Originally Posted by Preemptive View Post
    If there is no apparent system configuration setting, it may simply be that the screen is at 'default'
    I've been thinking about this, and digging around. A formerly active member, who brought us many great patches (and, it turns out, was once an intern at Palm). Helpfully, he kept all his code on GitHub, including one of my favorite patches -- putting Brightness in the Device menu.
    While I can't find anything to change the color temperature, looking at his code, its clear that its possible to programmatically change the brightness:
    handleBrightSlider: function(event) {
    		this.controller.serviceRequest('palm://com.palm.display/control', {
    			method: 'setProperty',
    		this.controller.get('dm_brightness').innerText = "Brightness: " + Math.round(event.value) + "%";
    I suspect this is one of those serviceRequests that can't be called from the average app. It probably needs special privileges (which I understand can be secured just by spoofing the com.palm.webos app identity).
    I get that color temperature is best for sleep hygiene, but I think changing the brightness on a timer would be a good start. I definitely turn mine down before I put my Pre on the TouchStone for the night.

    I'll start playing with this...

    Confirming that 1) The code works, and 2) It requires that the app have an ID that starts with com.palm.webos
    Last edited by jonwise80; 10/30/2018 at 07:04 PM.
    Preemptive and cbosdell like this.
  5. #5  
    I don't believe, from my recollection, that there is anything to change the color temperature of the display.

    I suspect, however, one might be able to write a framebuffer driver that could apply adjustments. I am also not familiar with the video drivers, but it could be possible that there is something hiding in there.

    I was poking through the redshift code a few days ago and it seems to use X, but I didn't get to deep to see what other interfaces it has.
    Did you know:

    webOS ran on a Treo 800 during initial development.
  6. #6  
    Here's my concept app, I'm calling it "Night Moves" after the 70s movie, and because it moves sliders at night.


    So far just building the UI -- it doesn't actually do anything yet. I've spent a lot of time working around a pretty bad Mojo toggle switch bug.
    Here's the source:
    Last edited by jonwise80; 11/02/2018 at 08:18 AM.
  7. #7  
    It works! The app has three time shift points, and you can set the Brightness for each of them. You can set the Volume, but it doesn't work unless you the have the Audio control panel app open. I need to figure out how to deal with that.
    Its got a lot of bugs at the moment, but its a background app that uses system alarms, so you can kill it and it won't use battery life. When the shift time alarm hits, the app will launch and change your settings. Ideally, then the app goes away -- but I can't figure that part out yet. I might have to use a Dashboard scene...

    Setting alarms is annoying: when you set your time shift time, it needs to determine if that time is later today, and therefore a relative alarm, or if that time has already passed today, and it needs to be an absolute alarm. If you schedule an absolute alarm for today, it fires instantly. Each time an alarm fires, it needs to re-schedule itself for the next day.

    You can downloaded the latest build here:

    PS: Mojo itself has a lot of bugs.
    Last edited by jonwise80; 11/04/2018 at 07:26 AM.
    Preemptive likes this.
  8. #8  
    As there is now an app, I added it as a project to the webOS User Group Agenda.
    webOS User's Online Meet up - webOS Nation Forums
  9. #9  
    Quote Originally Posted by Preemptive View Post
    As there is now an app, I added it as a project to the webOS User Group Agenda
    Looking forward to chatting more about it! It was an interesting learning experience.

    The alarms now work reliably, and I figured out how to launch the app without a scene -- which is nice for true background operation. There's a brief screen flash when the App controller loads the stage, but if you don't have the app open, the stage will immediately dismiss itself. The actual changing of settings only takes a second, but is fraught with holes. For example, the Touchpad will move the Brightness slider as if the setting was changed, but the screen itself often won't change.

    There's also the challenge of properly handling all the launch modes:
    - Launch from an icon tap when the app is not running (must create a scene)
    - Launch from an icon tap when the app IS running (must bring the current scene into focus)
    - Launch from an alarm in the background when the app is not running (must not create a scene)
    - Launch from an alarm in the background when the app IS running (must not bring the current scene into focus)

    And then there's problem of notification. Its easy to create a notification, but system notifications trump app notifications. So you can tell the user "I changed the settings for you" but when you change the setting the system puts its own notification on top of yours (eg: ringer icon on Pre3). On the plus side, when the app is not in use, its not using your battery or system resources at all.

    I'm at 0.1.0 now, so 10 major revisions (link to download above) and things work pretty reliably on my Pre3. I'm still working on making brightness setting more reliable on my TouchPad.

Similar Threads

  1. Fumbling my way through webOS Development from scratch in 2018
    By jonwise80 in forum webOS Development
    Replies: 18
    Last Post: 10/29/2018, 02:20 PM
  2. A (new?) solution (/work-around) for HTTPS sites that won't load
    By jonwise80 in forum webOS Discussion Lounge
    Replies: 13
    Last Post: 10/23/2018, 12:11 PM
  3. Lg WebOS Tv out of memory error
    By jhamond987 in forum LG webOS TV
    Replies: 1
    Last Post: 10/19/2018, 02:39 PM
  4. Lg WebOS Tv out of memory error
    By Sagar Venugopal in forum LG webOS TV
    Replies: 0
    Last Post: 10/19/2018, 08:05 AM
  5. Mojo Maps for Google - new for 2018
    By George Mari in forum webOS Apps & Games
    Replies: 0
    Last Post: 10/12/2018, 09:18 PM

Posting Permissions