Virtual genset and autostart for an older onan

I’ve been wanting to give the ekrano the ability to start my generator, but I unfortunately have a 2011 dutch star that has a “push and hold to warm/start” rocker. I found a relay board hosting an ESP32-S3 and wrote custom firmware for it that can read the flashing lamp output to figure out the current state of the generator, and two relay outputs (enable and start/stop) so that it can effect transitions itself. I use the freakent dbus-mqtt-devices modified to support gensets to allow the board to register into dbus as a genset device.

There’s a small circuit that uses an NPN BJT to condition the lamp output from the generator(battery voltage) down to an inverted 3.3V signal for one of the microcontroller’s GPIO ports to read.

With this connected, the generator appears in the ekrano and reacts to changes in the genset start state set by the software. I have a separate project for digital buttons that use an ESP32-C6 powered 1.6" AMOLED display to replace the existing rocker button. The generator switch sends a manual start request to the ekrano via MQTT, the ekrano sets the start state, then the relay board starts the generator.

Here’s a video of it working: https://www.youtube.com/shorts/LSkJzUZFEGk

This is the relay board firmware project: https://silo.loom.farm/hypnos

This is the relay board: https://www.waveshare.com/product/arduino/industrial-controller/esp32-s3-relay-6ch.htm

The switch firmware project: https://silo.loom.farm/switchy

The switch device: https://www.waveshare.com/esp32-c6-touch-amoled-1.64.htm

Bonus video, the digital replacement for the visor control rockers is hosted on this relay board as well: https://www.youtube.com/shorts/9H4PP6n28EM

Pics of the permanent input board install: