Danke, ich hatte val auch schon probiert, wohl nicht so richtig

Code: [Local Link Removed for Guests]
'SHELLY-Commands1 http://shellyem-3494547bb5f5/relay/0?turn=on
'touch.calib
OPTION.BASE 1
OPTION.WLOG 1
dim Feld$(6)
Feld$(1) = " Produktion":Feld$(2)="2":Feld$(3)="3":Feld$(4)="4":Feld$(5)="5"
dim Daten$(6)
tft.init 1
gui.init 2, black
Pegel0=0 :Pegel1=0
Prg1 = GUI.ProgressBar(5, 180, 305, 20,Pegel1 ,0 ,red ,white ,black )'ProgessBar GRID Power
Prg2 = GUI.ProgressBar(5, 202, 305, 20,Pegel0 ,0 ,green ,white ,black )'ProgressBar Power Generation
Gui.SetRange Prg1, 0, 3800 'single Phase full load
Gui.SetRange Prg2, 0, 800 'HM Inverter full load
TFT.TEXT.POS 3,10 : TFT.TEXT.SIZE 2 : tft.text.color white
tft.print "DTU.IP:", WORD$(IP$,1) ;"";wifi.rssi
tft.print ""
pause 2000
do
OnTouch touchme
gosub shellyreq
gosub DTUreq
gosub touchme
loop
Wait
shellyreq:
wgetasync"http://shellyem-3494547bb5f5/status" ' do an HTTPS GET request
'wlog WGETRESULT$
pause 3000
result$=wgetresult$
TFT.RECT 0, 60, 320, 120, tft.rgb(80,80,80),1,15
TFT.TEXT.POS 5,67 : TFT.TEXT.SIZE 3 : tft.text.color white
search1$="power"'channel
power$=json$(RESULT$, search1$)
search2$="voltage"'channel
voltage$=json$(RESULT$, search2$)
search3$="total"'channel
total$=json$(RESULT$, search3$)
search4$="total_returned"'channel
returned$=json$(RESULT$, search4$)
'wlog power$,voltage$,total$,returned$
if power$ = "not found" then
gosub failed
else
'write values to display
tft.text.color white
tft.print "Verbrauch:";
if left$(power$,1)= chr$(45)
tft.text.color green : power$=mid$(power$,2,4):Gui.SetColor Prg1, green, white, black
else
tft.text.color red
Gui.SetColor Prg1, red, white, black
endif
if instr(1,power$,".") =3 then
tft.print left$(power$,2);" Wh"
else
tft.print left$(power$,4);" Wh"
endif
TFT.TEXT.POS 5,97 : TFT.TEXT.SIZE 3 : tft.text.color white
tft.print "Total :";total$;" kW"
TFT.TEXT.POS 5,127 : TFT.TEXT.SIZE 3 : tft.text.color white
tft.print "Spannung:";left$(voltage$,3);" Volt"
Return
failed:
tft.text.color red
tft.print " Connection failed"
pause 2000
option.wdt 1
return
DTUreq:
DTUresult$=wget$("http://192.168.2.34/api/inverter/id/0")
DTUsearch$="ch"'channel
DTUret$=json$(DTUresult$, DTUsearch$)
'ret$=json$(WGETRESULT$, search$)
if DTUret$ <> "not found" then
DTUsw$=DTUret$
DTUsw$=replace$(DTUsw$,"["," "):DTUsw$=replace$(DTUsw$,","," ")
TFT.RECT 0, 10, 320, 30, tft.rgb(80,80,80),1,15
TFT.TEXT.POS -8,15 : TFT.TEXT.SIZE 3 : tft.text.color white
Daten$(1) = word$(DTUsw$, 4)
tft.print Feld$(1) + ":";
tft.TEXT.COLOR green
tft.print left$(Daten$(1),3) + " Wh"
endif
return
touchme:
Pegel1= val(power$)
Pegel0=Val(Daten$(1))
'wlog Pegel1;Pegel0
Gui.SetValue Prg1, Pegel1
gui.setvalue Prg2, Pegel0
'Gau2 = GUI.Gauge(10, 50, 150, 150, val(power$) ,black, white ,green ,3)
gui.refresh
gui.redraw
'wlog ramfree
return
Code: [Local Link Removed for Guests]
DTUresult$=wget$("http://192.168.2.34/api/inverter/id/0")
Code: [Local Link Removed for Guests]
{"id":0,"enabled":true,"name":"WR01","serial":"11419155xxxxxx","version":"10016","power_limit_read":65535,"power_limit_ack":false,"ts_last_success":1697645246,"generation":0,"status":0,"alarm_cnt":1,"ch":[[229.4,0,0,50.03,0,13.5,91.752,2519,0.7,0,0,564.9],[14.9,0.02,0.3,1081,49.406,0.075,297.5],[14.9,0.03,0.4,1438,42.346,0.1,295.9]],"ch_name":["AC","1","2"],"ch_max_pwr":[null,400,400]}
Is your ESP32 board damaged at the voltage regulator? Have you connected (too many) external devices (display etc.) to the internal 5V>3V3 regulator? This could be too much current or power dissipation for the regulator.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Oct 20, 2023 8:57 am *annoyed...;![]()
the ESP32 module - ESP32 dev Kit V4 - for the TFT display died again overnight - I noticed that it was very warm from the beginning an - this can be prevented by reducing the WIFI Power ?? ??? - Or has anyone already cooled the chip with a fan ??
it started with the fact that the get requests were no longer reliably processed - same as in the previous module
have a better Day
Ron