OLKB Terminal

After a little messing around, I have a very smooth backlight control that I will control with home assistant. My plan is to leave the control on the display itself, but at sundown, it will go to the bare minimum and at 6:30am (about when I am supposed to wake up) it will light up to a reasonable normal brightness.

After the wifi settings and stuff, this is what it took in the yaml file to set pin 27 to be the PWM light, and make “off” be something other than actually off:

# Setup the output pin
  - platform: ledc
    pin: GPIO27
    id: gpio_27
    frequency: 100Hz
    min_power: 0.02

# Now make it look like a light
  - platform: monochromatic
    output: gpio_27
    name: "DeskPi Backlight"
    restore_mode: ALWAYS_ON
    gamma_correct: 1.0

I am printing a bracket to mount the esp32 now. You can see the preview on the screen of what I am printing too (using the prusa mini thumbnail plugin and some home assistant config files to get the right thumbnail).


Dang, that is slick.

You know what that needs…a little solar input and battery level monitor. Nothing huge, just a little diy backup system to run a few things, maybe cut your power bill a bit.

1 Like

I am thinking of adding a photo resistor to get ambient light level.

I am having power issues now. I have the screen and the esp32 powered by the USB on the pi. At startup it is too much for my usbc power block and it resets. So I have to solve that.

I would like to power it all from one cable. But I am not sure how I can get all that in a small package. I may just break down and use a few USB cables to power it up until I come up with a good solution.

I would rather invest my energy into getting solar power on the house over something for this project. But we haven’t decided on that either.

1 Like

Use a 12V wall wart and then two smaller DC-DC buck converters. One for the pi. One for everything else.

1 Like

Jeff, it is a work of art!

With so many headless appliance applications for the rpi (octoprint, HA, etc), and the popularity of retropie, your idea can be seen as a creative fusion of the 2 otherwise separated themes. This no doubt is lending to it’s popularity.

I have been putting off buying a firetab for use as my HA kiosk, and I do have a spare 3b+. I am also a fan of authentic beige hardware (my primary pc still resides in a beige full tower, circa 1998). There is only the cost of a decent ips display getting in my way here.

1 Like

OMG… heck yeah esphome rocks! Don’t get me wrong, esphome can get in the way of the valuable arduino/esp learning process, but man does it simplify management of HA integrated esp devices!

I started off manually coding my own esp HA devices in PIO. It was a pita to make any changes to the system, and the workflow was about as bad as it gets, even with ota. Plus esphome has an HA api, which is much faster and more powerful than plain MQTT (which is otherwise how you would get an esp to talk to HA).

Say I want to add another one of my 3button OLED devices in another room, I can copy/paste a short yaml code, change a few variables on top, and flash it. Any changes to the system can quickly be distrubuted through the webui via ota as well. If the core or any libraries need updates, a single webui click can upload new fw to all your devices automatically. Finally, the available libraries give a huge range of options for sensors and other devices that will work (without compiling custom code anyways). I haven’t found an application yet where there wasn’t already some decent device with a library already available.

The only downside I should add, is that compiling fw on a pi3 or less is likely to crash HA due to low memory. I ended up using a pi4 for ha to get it all working smoothly, but the pi4 is mostly wasted as it is only really needed when I update/change esphome devices. The rest of the time it never gets over 0.1 load average lol.

1 Like