Thanks again for the tips when I was setting up my kitchen display back in October. I now have a working solution, or maybe I should call it a “prototype”.
For those who are interested, I asked for a solution to turn the screen on and off through command line, as I wanted to use a PIR sensor to turn on the screen when someone comes near the screen.
I ended up connecting the PIR sensor directly onto one of the GPIO pins on the Raspberry. Currently, I use a script that polls the PIR sensor every minute for “presence”, and turn the screen on if it has been turned off. The script turns the monitor off after 15 minutes of inactivity.
I am looking to improve my script when I find time, to:
- Make it interrupt-driven instead of polling continually
- Subscribe to a Mosquitto event, so I can integrate the screen on / off command into Openhab. This way, when I turn off all lights in the kitchen after sunset, I can turn the screen off at the same time.
Here is a picture of my screen, after it was built into the kitchen. I do have some fine-tuning of the surround trim to do, but so far, I am pleased with the integration! Thanks for the inspiration in this thread!!