Share My Creation Home Assistant Solar Info Panel

Home Assistant Solar Info Panel

Purpose

The purpose of the Home Assistant (HA) Solar Info Panel (SIP) is to display in regular intervals, the house power data on a TFT or OLED display.
  • Solar - production (W) [PowerFromGrid]
  • House - power usage (W) [PowerToHouse]
  • Grid - supply or load [PowerTo/PowerFromGrid]
  • Battery - charging level (%) [BatteryChargeState] & state charge or discharge (W) [PowerToBattery/PowerFromBattery]
  • Date & Time shown on the top of each page
    (unit)[Home Assistant Entity]
The initial solution uses the device Sunton ESP32 2.8" TFT w320xh240 (Cheap Yellow Display CYD).
The CYD has 3 pages, which can be selected via touch:
  • Main - Solar Info Panel with the 4 textboxes Solar Production [SOLAR], House Usage [HOUSE], Grid Import & Export [GRID], Battery Charging State & Usage [BATTERY].
  • Battery - Charging state & usage (positive battery is charged, negative battery is discharged).
  • Settings - Set display brightness (0-100) or level (0-255) of the CYD backlight RGB LED white.
In addition to the CYD, an ESP32 with OLED display is used to mainly display the battery charge state direct at the battery.
This display has 4 pages Solar > House > Grid > Battery selected via red push-button.
The hardware is DIY MORE ESP32 0.96" OLED, w128xh64. The top area w128xh16 has yellow text (default) and the area below blue text.

The solution
  • can handle many clients and the data is immediate published.
  • is custom made and developed for personal use only.
  • source is shared.
Devices
1745393235802.png


Concept
There are 3 components interacting with each other being Home Assistant (HA), Node-RED (NR) and B4R.
  • B4R to connect to the WiFi network and sent HTTP GET request to the HA NR RESTful server.
  • NR RESTful server to get the relevant HA entities data, create HTTP response content CSV string and sent the HTTP response to B4R.
  • B4R to parse the HTTP response CSV string and updates the display. The display is controlled using the B4R library URL rLovyanGFXEx.
HTTP Response Format
CSV string with HA entities data:
powerfromsolar,powerfromgrid,powertogrid,powertohouse,powertobattery,powerfrombattery,batterychargestate,powerdatestamp,powertimestamp
B4X:
774,0,506,268,0,0,100,20250422,1207

Hardware
  • Sunton ESP32 2.8" TFT, w320xh240, touch, driver ILI9341.
  • DIY MORE ESP32 0.96" OLED, w128xh64, no touch, driver SSD1306.
Software
To-Do
  • Built proper cases for the devices (3-D printing).
  • HTTP response byte array instead CSV string.
Node-RED Flow
HTTP RESTful server listening to GET requests http://ip-ha:1880/endpoint/solarinfo?data=all.
Receiving the request, the current state of the HA entities are obtained and the date/time stamp is set.
HTTP response is a CSV string: 774,0,506,268,0,0,100,20250422,1207
1745321965940.png

Note: There are more flows to built the power data.
 

Attachments

  • solarinfopanel-restful-100.zip
    91.8 KB · Views: 114
Last edited:
Top