Skip to content

Show pressure & temperature readings from Home Assistant/MQTT on a mini display

Notifications You must be signed in to change notification settings

limpfish/home-assistant-barometer-display

Repository files navigation

home-assistant-barometer-display

A mini Home Assistant display to show pressure & temperature readings (and made to look pretty with 'freeform pcb' brass rods). It's powered by an esp8266 Wemos D1 Mini. Reads data via MQTT but would be an easy change to add a sensor directly.

barometer-breadboard_s

barometer-graph_s

Sensors dotted around the house, mostly BMP180 and SI7021, are pushing data to Home Assistant running Mosquitto over MQTT. Instead of having to load up the UI on my phone or PC, this is a permanent little display to show various sensor readings at a glance.

A switch toggles the display between an old style antique barometer and a pressure graph.

RCWL-0516 microwave radar motion detector turns the screen off when no-one is around.

It uses a KMR-1.8 128 x 60 TFT screen connected over SPI despite the incorrectly marked I2C pins on the board (that took some figuring out).

The code uses Adafruit's ST7735 and GFX libraries
ArduinoJson by Benoit Blanchon
PubSubClient by Nick O'Leary
ESP Wifi Manager by Tzapu.

The main barometer graphic was designed in Photoshop at 128 x 160 and then converted to 565 bit RGB suitable for the ST7735 with UTFTConverter.

You'll need to setup your own MQTT server details:

const char* mqtt_server = "192.168.0.160"; 
const char* mqtt_user = "DVES_USER";
const char* mqtt_pass = "DVES_PASS";

and your MQTT topics, it assumes the 4th is pressure :

char* mqtt_sub_topics[4][3] = 
{
  //name               // mqtt topic          // unit  (unused here) 
  { "Outside",         "shed/info",           ""},
  { "Living Room",     "tele/sonoff5/SENSOR", ""},
  { "Attic",           "tele/sonoff4/SENSOR", ""},
  // 4th must be pressure
  { "Pressure",        "tele/sonoff1/SENSOR", ""}
};

Circuit diagram

barometer-circuit-diagram_s

About

Show pressure & temperature readings from Home Assistant/MQTT on a mini display

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published