Repository navigation
Boiler Monitor, Display and Home Assistant Project #20429
Replies: 5 comments 5 replies
|
Did you consider whether the recently added HASPmota |
|
Am working to add your lv_boiler_graph.be driver to my project - updated for my data, but when I start it I am getting error messages such as: I believe it has something to do with "haspmota_widgets.tapp" file. I downloaded it then uploaded to my ESP32 file system, but when I reset my device, it just puts the haspmota_widgets demo over my "pages.jsonl display. My autoexec.be has the following includes. Do I need to add something else to include lv.chart ?
I also looked at the haspmota "chart" object but it is unclear to me how to actually add live data points to the chart. I am running on an ESP32-S3 with PSRAM, Tasmota32-LVGL version 15.0.1 |
|
Here is my lv_grill_graph.be driver file: |
|
@sfromis, set_axis_range got me past that error but ran into similare issues a few lines down. Finally just commented out the 2 lines and the chart works as it should. Could not find a working replacement for these 2 lines - but the chart still works. Pretty neat stuff. |
|
would you be so kind to removeme from your sent list
Op vr 3 apr. 2026 12:02 schreef sfromis ***@***.***>:
… The code posted earlier in this thread already had the line with
lv.PART_SERIES_BG commented out, hence you "invited" the error by no
longer having it commented out.
You just saying "similar" instead of actual details means no way of
suggesting what would work, but I do notice that set_style_size needs 3
arguments instead of 2 - width, height and selector.
—
Reply to this email directly, view it on GitHub
<#20429?email_source=notifications&email_token=BG2K5WBR4HN2KEZDZZEGRV34T6D4LA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRUGM3DIMZYUZZGKYLTN5XKOY3PNVWWK3TUUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#discussioncomment-16436438>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BG2K5WCU7R4GVENBO3KLSOT4T6D4LAVCNFSM6AAAAACXK574KSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBTGY2DGOA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Background
For a couple of years now, I've had an ESP8266 on my boiler monitoring temperatures and whether it's burning or not and reporting to Home Assistant. Recently, I got a couple of Lilygo T-Display-S3 ESP32s to mess around with and thought it would be good to have the display as my boiler monitor. After giving it some thought and some successes with Tasmota, Berry, LVGL and HASPmota, I gave it a go. Those last three things were all new to me and I found little on the web to guide me (I like following examples rather than reading often cryptic manuals), but with the help of this forum and in particular
sfromisands-hadinger, I got there in the end. So here is my Project with all the code and stuff and I hope others find it helpful. I've got a few ideas to tweek it a bit but now it's in, I want to let it settle down and prove it's working properly over several days. I'll probably spend a few days writing this project so it will grow as I add more detail; I hope that's OK.Overview
First off, some pictures of the display.



The device has sensors monitoring 3 temperatures and 2 opto-isolated mains detectors for incoming demand (HW/CH) and if the internal thermostat is also demanding. From the latter I can derive burn time and how much oil is being consumed and even get how much oil is left in my tank. It reports to Home Assistant and gets some data back , eg the kwh and cost for the day (I intend to add 'Oil in tank').
On the Tasmota side, there is some setting up to do, some Berry code to add and a HASPmota page file that defines how things get displayed on the screen.
In Home Assistant, it gets picked up as a Device and a couple of MQTT sensors need adding manually through the configuration.yaml file. There are also a few Automations and Template entities to add. I will describe all these in the sections below.
Hardware
Lilygo T-Display-S3 and Shell - Bangood
Mains detector (3 Channel) - AliExpress
Temperature Sensors DS18B20 - AliExpress
Tasmota
SetOption114 1andSetOption73 1are required along withSwitchMode1 2andSwitchMode2 2. To match the Berry code, I gave better names to these switches with -SwitchText1 DemandandSwitchText2 Burn.Button1andButton2. Both are used in the code/Home Assistant.Configure OtherI set both theDevice NameandFriendly Name 1toBoiler.Configure MQTTI set my Home Assistant IP inHost, entered my User and Password, and set theTopictoboilerdisplay.Berry
This is where things got tricky for me with no knowledge of Berry. What I've done may be 'bad' code but it works. I'm happy to receive constructive criticism. The first thing to note is that Berry is only on the ESP32 Tasmota variants and my understanding is that it is an object language sitting alongside Tasmota and can communicate with it. When Tasmota starts up it looks for a file called
autoexec.beand will execute it. In that file you can create functions, rules and timers (and more I expect but they are all I used). Here is my Berry code in theautoexec.befile:There's lots of comments in the code so I won't try to explain it here but will try to answer any questions on it.
Another file called
lv_boiler_graph.beis responsible for the graph page shown in one of the pictures above. I based it on the code I found in this GitHub Tasmota repository for the WiFi widget included on the Tasmota page. This is the code for mylv_boiler_graphwidget:I've added comments to my code and don't profess to understand much of the LVGL speak within it.
These two files above and a third file ( haspmota_widgets.tapp ) got from GitHub need adding to the device through the
Manage File Systemconsole.HASPmota
This is where you define the Pages you want displayed on the screen. It looks a bit daunting at first but you quickly get used to it once using it, I found. Each line of the
pages.jsonlHASPmota file represents 1 object on screen. The line contains the attribute values you want for each and if omitted they take a default. Here's my file which also needs adding through theManage File Systemconsole:Persist
I wanted my device to be the 'Source' of the lifetime usage in hours of the boiler so needed to ensure it retained it across reboots. That it where Persist comes in; it's a method to store something in Flash memory. I read that it wears out over so many writes but without knowing the numbers (I read anything between 10,000 and 100,000 write cycles) didn't want to push my luck so opted to save the number once per day at midnight using the
mn()function and thecronin theautoexec.befile.I can't remember the details but I think I created the original Persist entry using the Berry Console by typing something like:
You have to type 2 Returns together to get the above 3 lines to then run. After that you will see a new file called
_persist.jsonin theManage File System; mine now looks like:If people think I could get away with more frequent saving then let me know. Currently, I'm not planning on rebooting that often so the odd day's missed hours don't worry me.
Wiring
Here's the wiring diagram:

And a picture of my original loom. Originally I was going to have the plug/socket connector inside the case but I decided to make the wiring to the board longer and the connector outside the casing for ease of taking it back to the breadboard.
Home Assistant
If the Tasmota Integration is installed in HA the device should be discovered automatically and go by the name of the Device Name given in
Configuration Other, in my caseboiler. The mains detection Entities will have the namesbinary_sensor.boiler_switch1and_switch2. The Temperature sensor Entities will have the names of the formsensor.boiler_ds18b20_1_temperaturealso a 2 and a 3. Now in my case the device appeared twice, with the Temperatures in one and the mains detectors in the other. It may have been because I'd been messing around on the workbench with 2 different Lilygos using the same MQTT Topic and HA just got in a muddle. Hopefully, anyone implementing this project does not get the same!Two other Entities (runtime and life runtime) coming from the device have to be manually entered in the configuration.yaml file with the following code:
You should note that the Topics above match the Topics used in the Berry
autoexec.becode file. The Entities will go by the namessensor.boiler_runtime_todayand_life. If you already have mqtt sensors configured, miss out the first 2 lines and add the rest to your mqtt block.That's all the sensors sorted and you now need to add an Automation to publish the HA stats. I chose to do this every 5 minutes, when there's a change in
sensor.boiler_runtime_todayand in response to the second onboard button being pressed. Here is the code for the automation:Note:
discovery_id:anddevice_id:will be different on another implementation. The mqtt publish topic issues the commandBoilerStatsto the Tasmota device and theboilerstatsfunction defined in theautoexec.befile is what gets run as a result.Also note that I was concerned about reboots of the device during the day losing the runtime so far, so I added some code to retain the value so far in HA, report it in the boiler stats such that the device can compare the 2 values and update its internal one if necessary. The code is in the
autoexec.beabove and the HA automation is here:That's all for now. I have some other stuff in HA to record the oil left in the tank as it gets used and to store values for 'Yesterday' so I can have dashboards that show Today's values with Yesterday's as a comparison. I also want to add some other features. Once I've tidied them up to my liking I will add them.
Happy to have comments about how I might have done stuff better and questions if I've not explained anything properly.
All reactions