I originally wanted to explore using these intriguing SHARP memory displays for monitoring sensors and controlling smart switches around the house. These displays are sort of a love child between e-ink (low power) and LCDs (fast refresh rate). It is the same display used in Panic's anticipated Playdate handheld console.

With an ESP32 dev board, a rotary encoder and three mechanical switches, I started writing the code to display  sensor data and control the switches. It all works through the magic of MQTT messages and commands.

The smart switches are Shellys running Tasmota, an open source firmware that knows how to speak MQTT. It listens to commands like "on" and "off" and report back their current state via small MQTT payloads.

On the right-hand side in the picture above are the readouts of a few capacitive soil moisture sensors (similar to this on from Adafruit) and temperature sensors around the house. They periodically publish their readings to specific topics and the MQTT broker forwards them to interested subscribers. In this case, the code running on the ESP32 subscribes itself to these topics and displays the latest data whenever a new message arrives.

I didn't want to commit to specific displays or input devices, so I tried to make most of the code platform agnostic. The code running in the video above is the Arduino-land implementation of the input system and the output display.

As an example of porting the code to a different platform, on the same repo there is a software-only implementation of virtual inputs and display, which I run on my macbook. It should be relatively cross-platform:

All the code and 3d printable parts are in github.com/rbaron/deskmate.