Skip to content

A small display for Home Assistant to retrieve the current house consumption and energy price via a sensor in HA. Uses a Wemos D1 Mini and an ILI9341display.

License

Notifications You must be signed in to change notification settings

johannyren/PowerDisplayHomeAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerDisplayHomeAssistant

Update: This display is now ported to ESPHome, which has many benefits over this implementation. I recommend using that instead, although it will require an ESP32 instead of an ESP8266. This implementation works but will no longer be maintained. See link: [https://github.com/johannyren/PowerDisplayESPHome]

This is a small display that shows the current electricity consumption, together with a graph of the today's electricity price, using either NordPool or Tibber. The software pulls the data from a Home Assistant instance, so all sources must be available there.

alt text

The hardware consists of a Wemos D1 Mini and a ILI9341 display.

Wiring of the ILI9341:

ILI9341   -> WEMOS D1
VCC       -> 3.3V
GND       -> GND
CS        -> D2 (GPIO4)
RESET     -> D3 (GPIO0)
D/C       -> D4 (GPIO2)
SDI(MOSI) -> D7 (GPIO13)
SCK       -> D5 (GPIO14)
LED       -> 3.3V

alt text

alt text

Libraries

This sketch id using the library TFT_eSPI (https://github.com/Bodmer/TFT_eWidget) Be sure to update the file User_Setup.h in the \libraries\TFT_eSPI folder to set pin numbers.

To match the pin numbers for the ILI9341 wiring above, use the following:

// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
    #define TFT_CS   PIN_D2  // Chip select control pin
    #define TFT_DC   PIN_D4  // Data Command control pin
    #define TFT_RST  PIN_D3  // Reset pin (could connect to NodeMCU RST, see next line)

Datasources and connection to Home Assistant

Data sources from Home Assistant are defined in settings.h, together with WiFi details and bearer token for accessing Home Assistant.

Icons for Grid and Solar symbols are defined in icons.h. A few variants are available - choose the ones you prefer.

Casing

STL files are available for 3D printing a casing for the display. Two variants - one straight for putting on a wall, and one tilted, optimal for a desktop display.

About

A small display for Home Assistant to retrieve the current house consumption and energy price via a sensor in HA. Uses a Wemos D1 Mini and an ILI9341display.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published