Re: Monitoring and controlling - HOYMILES microinverters
Posted: Tue Oct 24, 2023 10:46 am
Ich nutze OpenDTU und habe Ron's Projekt etwas verändert.
Man(n) kann fast alles darstellen, einzelne Strings, ich brauche nur das was ich hier auf dem Bild zeige.
Danke an Ron für die Vorarbeit.
Edit: nachdem mir der Entwicker cicciocb bei der Curl in ESPBasic geholfen hat, kann man nun auch die Leistung über ESP32Basic einstellen
I use OpenDTU and have modified Ron's project slightly.
You can display almost anything, individual strings, I only need what I show here in the picture.
Thanks to Ron for the preparatory work
Edit: the developer cicciocb helped me with curl in ESPBasic, you can now also adjust the Power Limit via ESP32Basic
Annex Version 1.51.5 on ESP32-2432028b board tested
On this board you can switch off the RGB-LED with this code:
Edit 26.11.23 Code with bedder text print, watchdog
Man(n) kann fast alles darstellen, einzelne Strings, ich brauche nur das was ich hier auf dem Bild zeige.
Danke an Ron für die Vorarbeit.
Edit: nachdem mir der Entwicker cicciocb bei der Curl in ESPBasic geholfen hat, kann man nun auch die Leistung über ESP32Basic einstellen
I use OpenDTU and have modified Ron's project slightly.
You can display almost anything, individual strings, I only need what I show here in the picture.
Thanks to Ron for the preparatory work
Edit: the developer cicciocb helped me with curl in ESPBasic, you can now also adjust the Power Limit via ESP32Basic
Annex Version 1.51.5 on ESP32-2432028b board tested
On this board you can switch off the RGB-LED with this code:
Code: [Local Link Removed for Guests]
' RGB-LED switch off on ESP32-2432S028 board
LED_R = 4
LED_G = 16
LED_B = 17
pin.mode LED_R, input
pin.mode LED_G, input
pin.mode LED_B, input
Code: [Local Link Removed for Guests]
'TOUCH.CALIB
OPTION.BASE 1
OPTION.WLOG 1
option.wdt 40000
tft.init 1
gui.init 6, black
Pegel0=0 :Pegel1=0 : Pegel2=10: Pegel3=0: Slider=0
Testbalken1 = GUI.ProgressBar(5,31,316,147,Pegel3,0,pink, black,black)
Prg1 = GUI.ProgressBar(5, 180, 312, 20,Pegel1 ,0 ,pink ,black ,white )
Prg2 = GUI.ProgressBar(5, 202, 312, 20,Pegel0 ,0 ,yellow ,black ,white )
Gui.SetRange Prg1, 0, 4800
Gui.SetRange Prg2, 0, 900
TFT.TEXT.POS 3,10 : TFT.TEXT.SIZE 2 : tft.text.color white
tft.print " IP ADR:"+ WORD$(IP$,1) +"/";wifi.rssi
tft.print ""
pause 1000
do
gosub OpenDTUreq
gosub touchme
loop
Wait
OpenDTUreq:
wgetasync"http://192.168.0.73/api/livedata/status"
pause 4000
resultSolar$ = wgetresult$
power$=STR$(val(json$(RESULTSolar$, "Power.v")),"%2.1f")
voltage$=STR$(val(json$(RESULTSolar$, "Voltage.v")),"%2.1f")
total$=STR$(val(json$(RESULTSolar$, "YieldTotal.v")),"%2.1f")
Day$=STR$(val(json$(RESULTSolar$, "YieldDay.v")),"%2.1f")
Temp$=STR$(val(json$(RESULTSolar$, "Temperature.v")),"%2.1f")
Leistung$=STR$(val(json$(RESULTSolar$, "limit_relative")),"%2.1f")
'Day$ = str$(4200) zum testen der Balkenanzeige
if power$ = "not found" then
gosub failed
else
gui.refresh
gui.redraw
TFT.TEXT.POS 5,37 : TFT.TEXT.SIZE 2 : tft.text.color green
tft.text.color green,black'tft.rgb(0,0,0)
tft.print " P= "+ Power$ + " W" + " / " + Temp$ + " "+chr$(39)+" Cel"
TFT.TEXT.POS 5,67 : TFT.TEXT.SIZE 2 : tft.text.color pink
tft.text.color pink,black
tft.print " P Total : "+total$ + " kWh"
TFT.TEXT.POS 5,97 : TFT.TEXT.SIZE 2 : tft.text.color red
tft.text.color red,black
tft.print " P Heute : "+Day$+" W"
TFT.TEXT.POS 5,127 : TFT.TEXT.SIZE 2 : tft.text.color white
tft.text.color green,black
tft.print " Spannung: "+voltage$+" V"
TFT.TEXT.POS 5,157 : TFT.TEXT.SIZE 2 : tft.text.color yellow
tft.print " Limit : "+Leistung$ + " %"
TFT.TEXT.POS 5,182 : TFT.TEXT.SIZE 2 : tft.text.color white
tft.print "0- 5kw"
Return
failed:
tft.text.color red
tft.print " Connection failed"
pause 2000
OPTION.WDTRESET
'option.wdt 1
return
touchme:
Pegel1=val(Day$)
Pegel0=val(Power$)
Pegel2=val(Leistung$)
'
Gui.SetValue Prg1, Pegel1
gui.setvalue Prg2, Pegel0
TFT.TEXT.POS 5,182 : TFT.TEXT.SIZE 2 : tft.text.color red
tft.print " P Heute: "+Day$ +" W"
TFT.TEXT.POS 5,205: TFT.TEXT.SIZE 2 : tft.text.color green
tft.print " " +Power$+" W"
OPTION.WDTRESET
return
OnTouch touchme
wait
touchme:
touch.read 'Read the calibrated position
print "touched", touch.x, touch.y, touch.z
OPTION.WDTRESET
return