-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for screen to dim after a certain amount of time #2
Comments
Note: There is built-in screen blanking functionality (settings for it are in the Pi Configuration app, or in |
Might be configurable with
|
I did find the command |
Indeed, changing that value changes the screen timeout, and persists across reboots. HOWEVER, I did a quick test to see if a tap on the blank screen just wakes the screen, or is sent through as a normal 'click'. And annoyingly, it's sent through as a 'click'. So 'tap to wake' is not really an option, at least unless you designate a 'safe area' on your UI that you can tap to wake... or if you design a circuit that jiggles a mouse input when vibration is detected, and you tap the side of the display, something like that :/ Demo: tap-to-wake-screen.MOVGoing to ask on the forums: 'Tap to wake' Touch Display is risky |
From @6by9 on the Pi Forums:
So it sounds like a fix could be made, but it may be a little complicated. It'd be awesome to have that fix on the OS level so I don't have to do some weird shenanigans with a system service. For now, I'm just touching in a part of the screen where I know there are no buttons. |
It's probably broken now that everything is wayland, but you can take a look at my fork of this pi-touchscreen-dimmer, maybe just for some more inspiration. I've been using it to get auto dimming on my pi for years now https://github.com/gabeklavans/pi-touchscreen-dimmer. It doesn't quite achieve your 2. goal because the first tap both "wakes" and registers as a normal tap, but it's close. |
It's more of a workaround than fix but I've setup an automation in Home Assistant that will turn the display on/off when motion is detected. It doesn't fix the issue however does mean that when someone's in the room and may want to use the panel the display is on so they don't accidentally press a button when waking the screen up. I'm using a Pi 3B with Bookworm 64bit installed and the original Raspberry Pi display so there may be some difference. You can turn the backlight on or off by changing the value in For my display setting To setup the automation I setup passwordless SSH authentication between Home Assistant and the Pi. On the Pi I then created two scripts and changed the permissions for
Backlight On
Backlight Off
I had to create them as scripts on the Pi as running the command directly through Home Assistant would fail whereas calling the script didn't. Then I setup shell commands in Home Assistant by adding the below to my
You can run the command directly from the Home Assistant terminal with the After a restart of HA to get the shell commands to appear I created two automations.
Now whenever motion is detected the screen comes on and goes off when people leave the room. Like I said it doesn't fix the issue but depending on use case it may do the job. A possible next step would be to present the backlight controls to HA as entities that could then be used as part of a normal motion-activated blueprint rather than create two seperate automations. |
Something like this might be just the ticket. Couple it with radar-based presence sensors (I've been testing some Everything Presence sensors around the studio), and you could have the screen only come on while someone is detected in the room a bit more reliably than standard PIR sensors too. Otherwise I could tie it into my Simplisafe automation (when 'Off', turn on the display...). |
Indeed, one other thing I've found is that the permissions on |
I am using a rpi 4 and the older screen as well as the official case for both. (hacked a bit to hold a pwm fan) I think I am going to use one of two methods...
Neither option is fantastic but it should get me by in the meantime. |
Could you use an HC-SR04 distance sensor, and rather than use tap to wake, just have the display turn on when there's something within x distance? That way, it's not only off when you're away from the building but remains off if you're nowhere near the screen, that might be even more useful than tap to wake. |
For this feature to be useful:
That latter point would require a bit more work—not sure if the Pi Touch Display 2 has integration into Linux itself to have some kind of automatic screen dimming support out of the box (or failing that, turn it off or dim it to 0%)...
The text was updated successfully, but these errors were encountered: