Ardiuno/esp TFT mqtt display

I thought maybe some would be interested of it in action, as i got my wemos R3 and set it up to monitor divert usage and heat pump and couple other devices… my all in one sketch for diversion and grid monitoring work pretty well as you can see from the video as it keep it well within an average of 20 watts or less it will hit a little above 20 watts but you have more under 20 then over 20 … ( it using a bubble search to determine the proper pwm , to bad I can not set the UNo to drive it at 13 mhz then it would be even more accurate as i found out with the ESp driving a SSR at 13mhz pwm you can achieve very good accuracy on 60hz grid … though you can use divisions of 13 but it not nearly as accurate as 13 mhz itself )

1 Like

if anyone interested
I updated my RA8875 energy monitor display. it still does the same as before but I added in extra functionality

Displays information directly from my weewx compatible device ie: Acurite 7in1 via MQTT sends from weewx

Display information from Mycroft AI remote info screen and EVCAN alert-Skilll

DSC05295

1 Like

I should of mentioned while it does use the Canadian EVCAN for Canadain weather alert updates on mycroft AI … you could use my metro Alert skill for European weather alerts on mycroft AI and send the warning to the screen in any European Language

Hello Stephen,

Which one is yours? :slight_smile:
https://www.buydisplay.com/catalogsearch/result/?q=RA8875+

I use a wemos mega r3 to drive it

oh and by the way my evcan/metro weather skills do not particularly need mycroft AI to operate they work as a simple background program running every 10 minutes getting weather data and publishing them to the screen that can run from any pi device

Hi,

if I purchase the two boards above and I publish the MQTT feeds from my EmonPi will it work with the setup code you have kindly published (with some tiny mods maybe)

Thanks

John

yes no problem
either edit what your emonpi publishes or edit mqtt_esp8266_2Way_com_AI_WEEWX_ENERGY_monitor.ino to look for how ever you want to publish your info - it basically just looking for single inputs but you could modify to parse json string but for json strings i find it easier just to make a translator that watches mqtt and when the json is published it translates and then publishes the data in single mqtt data points. that way if the json string changes format it easier to change the bash script on the pi then changing esp translation

it has alot of pages but if you are only interested primary display as shown above just edit -( I also disabled the touch in the sketch I uploaded just enable if you want all the other screens and graphs)

String input1 = "/energy/invert";
String input2 = "weather/outTemp_C";
String input3 = "weather/outHumidity";
String input4 = "/wind"; ##  is my invereter input  as it was made backwards compatible 
String input5 = "/grid"; 
String input6 = "/energy/divert";
.
.
.
#weemw
String input37 = "weather/barometer_mbar";
String input38 = "weather/dewpoint_C";
String input39 = "weather/heatindex_C";
String input40 = "weather/windchill_C";
String input41 = "weather/humidex_C";
String input42 = "weather/pressure_mbar";
String input43 = "weather/windSpeed_kph";
#mycroft and evcan/metro skill
String input44 = "/ai/time";
String input45 = "/ai/offlight";
String input46 = "/ai/onlight";
String input47 = "/ai/station";
String input48 = "/ai/artist";
String input49 = "/ai/song";
String input50 = "/ai/clear";

Thanks, will give it a go :slight_smile:

John

@stephen

I now have all the parts and managed (by fluke I suspect) to get the wemos mega r3 to connect to my WiFi as a test. I then tried to use your Meter_ring_1_espmqtt-test.ino This connects OK to my WiFi but nothing is displayed on the screen. I suspect I am doing something wrong. There is a set of DIP switches on the wemos board and I have no idea how I should set them. does the script get uploaded to the ESP8266 bit (this is what I did to test the WiFi) or does it get uploaded to the 2560 side? As you can tell I am totally new to this type of programming, though I have done other types. If it is not too much trouble could you give me an idiots set of instructions to get this to work. The reason I used the above ino was that it looked the way I wanted and did not have the weather bit which I did not really want :slight_smile: I am using a 12V feed into the wemos board I assume that is all that is needed it can supply 2A . At the moment I get nothing on the screen, it does not even look like it is lighting up Thanks for any help

John

which lcd are you using ra8875 or the smaller ILI9341

the ino you mentioned is for the smaller ILI9341. But I assumed from the previous post you were referring to RA8875
RA8875 libary - should be configured properly for the board type
ra8875.zip (435.1 KB)

if using RA8875 I would just try one of the sample sketches first… loaded it to the mega to see if it works with your board and if it does then progress farther otherwise you might have to change some setting for your board ( but I do not think so the ra8875 has changeable setting other then the touch screen-- but the ILI9341 does if using this board )

ra8875
there are two sketches one for the mega and one for the esp
esp set jumper 5,6,7 to on flash the rest off , then flash the uno set jumper 3,4 to on and the rest off… once done set 1,2 to on and the rest off…
here an example of how to flash the wemos r3
the sketch you mention is connected directly to an esp no wemos r3 required ( but i used mostly wemos r2 it is purely an esp board compared to the mega/esp board of the wemos r3 )

this is the sketches for the RA8875

Stephen,

Thanks for your help, was just the little bit of info that I needed. Have now managed to get it all working, though still tinkering to get it just the way I wanted. For anyone else trying to connect to the MQTT service on the EmonPi you need to alter the connection parameters to include the username and password for the service. Just got to find a nice case now :slight_smile:

John

1 Like

Glad you got it working and when you are done all your tinkering , I would be curious in seeing the end display. ( and if you want post the ino’s so others can take advantage from your experience )

for me as a display case i used an old digital picture frame that it fit into nicely

Have finally got to the point where I have the display working as close as I want for now :slight_smile:
I am sure that I will still do some more tinkering but it is OK for now.
I face created a repository if anyone else wants to use what I have done feel free

John

1 Like

Finally got round to dropping by my friend who is a wiz with wood and we made a great box to house the display :slight_smile:

John

Looks great! thumbsup
What spieces of wood?

Mahogany, he had a piece lying around so we spent the day Sun making the housing, fortunately he has the correct tools so could turn my (our) ideas into what you see, there was a rough plan but it just evolved as we went. Bit like the program that drives it. I am sure I will play about with it again but at the moment I am happy with what I have. @Bill.Thomson thanks for the thumbs up :slight_smile:

John

YVW,S!

looks good :slight_smile:

Ciao Stefano volevo chiederti si è possibile farlo con un esp32+TFT 2.8" e cosa cambierebbe nel codice e le connessioni grazie si mi dai una mano. :+1: :+1:t2: :+1:t2: :ok_hand:t2: :slightly_smiling_face:

 
Hi Stefano I wanted to ask you is it possible to do it with an esp32 + TFT 2.8" and what would change in the code and connections thanks if you give me a hand.

[Translation by Google - Moderator (RW)]

I never tried with an ESP32. On the TFT_eSPI driver page there’s a description of how to set up an ESP32. I would first try getting it to work with the driver’s default sketches. Don’t forget to adjust User_Setup.h to match your configuration. Once you get it working with one of the default sketches, you should be able to swap to my sketch with very little modification.