solmoller / eversolar-monitor

Script to capture data and create statistics from Eversolar/zeversolar Solar Inverters. Includes easy install image files for Raspberry Pi. Working edition since 2012 :-)
https://github.com/solmoller/eversolar-monitor/blob/wiki/Introduction.md
MIT License
30 stars 20 forks source link

add tag to the webserver inverter.data.pac to enable interaction with other devices i.e. esp8266's #32

Closed LeighAS closed 3 years ago

LeighAS commented 5 years ago

change from on the webserver page. '<div style="color: darkgreen; font-size: 36pt; font-weight: bold; float: right;"'>'+inverter.data.pac+' '<span style="font-size: 14pt;" '>W'</span'>'</div'>

to

'<div class="inverter_pac" style="color: darkgreen; font-size: 36pt; font-weight: bold; float: right;"'>'+inverter.data.pac+' '<span style="font-size: 14pt;"'>W'</span'>'</div'>

please ignore the extra escape chars I just wanted to show the html line properly

so that it is possible in one line using a webscraping esp8266 to get the continuous power. Currently I have to

var pac = document.getElementsByClassName("inverter_content")[0].innerHTML.substr(93) pac.slice(0, pac.indexOf("<") )

this will help me make a homebrew charge limiter to collect only the excess solar energy into our Nissan leaf. Either using openevse or actually spoofing the pilot signal on our podpoint charge point.

Thanks for your help. I tried to see where this was being done but it want obvious to me that it was in the .pl file at all.

Currently 5 days in and have just joined eversolar perl loggers on pvoutput.org

solmoller commented 5 years ago

Interesting!

I am unsure I understand the change request, but data can be presented as you wish. Simplest way is getting latest data from mysql, that should be easy.

(I am traveling and your change request is presented as two identical lines)

BR Henrik

tir. 17. jul. 2018 15.17 skrev whereswally606 notifications@github.com:

change from on the webserver page. '+inverter.data.pac+'W

to '+inverter.data.pac+'W

so that it is possible in one line using a webscraping esp8266 to get the continuous power. Currently I have to

var pac = document.getElementsByClassName("inverter_content")[0].innerHTML.substr(93) pac.slice(0, pac.indexOf("<") )

this will help me make a homebrew charge limiter to collect only the excess solar energy into our Nissan leaf. Either using openevse or actually spoofing the pilot signal on our podpoint charge point.

Thanks for your help. I tried to see where this was being done but it want obvious to me that it was in the .pl file at all.

Currently 5 days in and have just joined eversolar perl loggers on pvoutput.org

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/solmoller/eversolar-monitor/issues/32, or mute the thread https://github.com/notifications/unsubscribe-auth/ACC_EBQD4tP5hsqf0J9vFC87K4j3FmWeks5uHePVgaJpZM4VS0-5 .

LeighAS commented 5 years ago

no problem I actually solved the issue with document.getElementsByClassName("inverter_content")[0].childNodes.item(1).childNodes.item(1).childNodes.item(0) which get me the power ac in one line so I shouldn't need the tag now. Im sorry for prematurely raising and issue.

they were subtle in the difference so ive edited it in bold. don't worry about it since I can do it without the tag. My knowledge of web dom/xpath/jscript is not as good as my programming.

solmoller commented 5 years ago

Good to hear

Can you please describe your solution? What do you use the esp8266 for, and how is it set up?

BR Henrik

tir. 17. jul. 2018 19.23 skrev whereswally606 notifications@github.com:

no problem I actually solved the issue with

document.getElementsByClassName("inverter_content")[0].childNodes.item(1).childNodes.item(1).childNodes.item(0) which get me the power ac in one line so I shouldn't need the tag now. Im sorry for prematurely raising and issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/solmoller/eversolar-monitor/issues/32#issuecomment-405660791, or mute the thread https://github.com/notifications/unsubscribe-auth/ACC_EP68tOQHnpdhTyZ58RGX0AigrTtUks5uHh2egaJpZM4VS0-5 .

LeighAS commented 5 years ago

document.getElementsByClassName("inverter_content")[0].childNodes.item(1).childNodes.item(1).childNodes.item(0)

in console gets me straight to the node I need which contains the inverter.data.pac value.

I haven't set it up yet but essentially the esp8266 will do one of two things I will either turn on a relay thus turning on my chargepoint to the car when the solar production is enough to break even with the night rate

or

It will spoof the pilot signal duty cycle to allow the leaf to charge at a rate matching the current solar production. this is the better less wasteful solution. Zappi chargers already do a similar thing but im trying to do this for less than £10 rather than £500. And I already have a 3.6kw podpoint charge point.

Being able to poll this data from the inverter is the first stage.

Also in the future I intend to get a second eversolar inverter and put a second array on my conservatory roof. So the fact I will be able to pull the combined pac of the same webpage is a massive bonus.