Monitoring and controlling - HOYMILES microinverters
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
Hi, Peridot, you have a nice website there .. yes, the openenergiemontitor project leaves almost nothing to be desired
After a long search I found this:
https://forum.creationx.de/lexicon/inde ... erwachung/
will try it
Ron
After a long search I found this:
https://forum.creationx.de/lexicon/inde ... erwachung/
will try it
Ron
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
Interim status report
I decided to use a "SHELLY" product - the documentation seems better to me
The following is the partial !! result for the "ShellyEM" - a module for power measurement with relay output
The red indicator of the power value turns green when the solar system produces more than is needed
Part 1 -reading the AHOY DTU and part two -reading the SHELLY still need to be merged
I have inserted the watchdog that often breaks off the connection and the annex-module has to be restarted. I also suspect a defect because that the RSSI value is very high near the router.
the WGET$ command didn't work for me, I always got error messages -I'm sure I used the wrong syntax but I didn't figure it out
I decided to use a "SHELLY" product - the documentation seems better to me
The following is the partial !! result for the "ShellyEM" - a module for power measurement with relay output
The red indicator of the power value turns green when the solar system produces more than is needed
Part 1 -reading the AHOY DTU and part two -reading the SHELLY still need to be merged
I have inserted the watchdog that often breaks off the connection and the annex-module has to be restarted. I also suspect a defect because that the RSSI value is very high near the router.
Code: [Local Link Removed for Guests]
'Annex32 CAN 1.51.2 LFS
'Modul ESP32 node MCU . in A-Z -Touch
'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"
tft.init 1
tft.fill 0
ret$=""
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
'ONWGETASYNC answer_done
' do an HTTPS GET request
'pause 1000
do
'wgetasync"http://shellyem-3494547bb5f5/status"
'wlog ramfree
gosub shellyreq
pause 5000
loop
Wait
shellyreq:
wgetasync"http://shellyem-3494547bb5f5/status"
'wlog WGETRESULT$
pause 3000
result$=wgetresult$
tft.fill 0
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)
else
tft.text.color red
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
the WGET$ command didn't work for me, I always got error messages -I'm sure I used the wrong syntax but I didn't figure it out
You do not have the required permissions to view the files attached to this post.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
sometime later I will have to send commands, so I tried to turn the relay on and off with the SHELLY, but I only had success via the browser command line with:
but all attempts with WPUT or WPOST didn't work - can anyone help me with the syntax?
Just one of many attempts
can anyone help me with this????
have a nice day
Ron
Code: [Local Link Removed for Guests]
http://shellyem-3494547bb5f5/relay/0?turn=on
Just one of many attempts
Code: [Local Link Removed for Guests]
a$=wput$("http://shellyem-3494547bb5f5/relays","0?turn=toggle")
have a nice day
Ron
You do not have the required permissions to view the files attached to this post.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
- cicciocb
- Site Admin
- Posts: 2795
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 594 times
- Been thanked: 2004 times
- Contact:
Re: Monitoring and controlling - HOYMILES microinverters
Code: [Local Link Removed for Guests]
a$ = WGET$("http://shellyem-3494547bb5f5/relay/0?turn=on")
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
That's what I tried first too
after 1 or two loops i got errors:"No Data. httpCode:-1No Data......"
in this loop:[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Wed Oct 04, 2023 7:55 amCode: [Local Link Removed for Guests]
a$ = WGET$("http://shellyem-3494547bb5f5/relay/0?turn=on")
Code: [Local Link Removed for Guests]
tft.init 1
tft.fill 0
do
pause 5000
a$ = WGET$("http://shellyem-3494547bb5f5/relay/0?turn=on")
pause 10000
a$ = WGET$("http://shellyem-3494547bb5f5/relay/0?turn=on")
html a$
loop
Code: [Local Link Removed for Guests]
{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"overpower":false,"is_valid":true,"source":"http"}{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"overpower":false,"is_valid":true,"source":"http"}No Data. httpCode:-1No Data. httpCode:-1
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
- cicciocb
- Site Admin
- Posts: 2795
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 594 times
- Been thanked: 2004 times
- Contact:
Re: Monitoring and controlling - HOYMILES microinverters
It seems the same message that you receive using the browser .... or not?
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
yes !
but in the browser commandline i dont got errors
after reboot the ESP (repower) it dit works again but only one loop with the error message : no Data at the second loop sometimes it runs 3 loops without errors
but in the browser commandline i dont got errors
after reboot the ESP (repower) it dit works again but only one loop with the error message : no Data at the second loop sometimes it runs 3 loops without errors
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
- cicciocb
- Site Admin
- Posts: 2795
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 594 times
- Been thanked: 2004 times
- Contact:
Re: Monitoring and controlling - HOYMILES microinverters
try to type the command using the immediate window
wlog WGET$(......)
wlog WGET$(......)
-
- Posts: 142
- Joined: Thu Mar 02, 2023 10:15 pm
- Location: germany
- Has thanked: 80 times
- Been thanked: 32 times
Re: Monitoring and controlling - HOYMILES microinverters
And one more thing: when I used wlog I didn't get any data via wgetresult
You do not have the required permissions to view the files attached to this post.
Modules : 3xESP32-Cam MB (Chip"DM ESP32 S" ),AI-Thinker Audio Kit (ES8388), ESP32 Dev Kit with Display
- cicciocb
- Site Admin
- Posts: 2795
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 594 times
- Been thanked: 2004 times
- Contact:
Re: Monitoring and controlling - HOYMILES microinverters
I must check, the code for WGET$ and WGETASYNC internally is the same ...