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 TFT or OLED displays.
  • 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 this CYD, other solutions have been developed:
  • DIY MORE ESP32 0.96" OLED, w128xh64 - Purpose: display the battery charge state direct at the battery.
    This display has 4 pages Solar > House > Grid > Battery selected via red push-button. The top area w128xh16 has yellow text (default) and the area below blue text.
  • M5 StickC-Plus2 ESP32-PICO-V3-02 1.14” TFT, w135xh240 - Purpose: display the battery charge state direct at the battery.
    This display has 4 pages Dashboard > Battery > Solar > Information selected via big M5 push-button.
    At present this is my favorite display - robust, easy to use.
The solution
  • can handle many clients and the data is immediate published.
  • is custom made and developed for personal use only.
  • is running since month without issues.
Devices



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:
B4X:
powerfromsolar, powerfromgrid, powertogrid, powertohouse, powertobattery, powerfrombattery, batterychargestate, powerdatestamp, powertimestamp
Data Example:
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.
  • M5 StickC-Plus2 ESP32-PICO-V3-02 1.14” TFT, w135xh240
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

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

Attachments

  • solarinfopanel-restful-110.zip
    166.9 KB · Views: 3
Last edited:

rwblinn

Well-Known Member
Licensed User
Longtime User
Update v1.1.0 (Build 2025-10-23) (See Post #1)

- NEW: Device M5 StickC-Plus2 ESP32-PICO-V3-02 1.14” TFT, w135xh240 (see also B4R Library rM5StickCPLus2).

This device is used to indicate charge level of the Solar Energy Storage Battery Box placed in the basement.

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…