Some time ago I looked briefly at an Envertech data logger for small scale photovoltaic setups. Turned out that PV inverter are kinda unreliable, and you really have to monitor them to notice downtimes and defects. Since my pal shot for a quick win I've cobbled together another Python script to query the portal at www.envertecportal.com, and report back if the generated power is down to 0. The script is currently run on a vserver via cron and reports back via the system MTA. So yeah, you need to have something like that already at hand. Script and Configuration You've to provide your PV systems location with latitude and longitude so the script can calculate (via python3-suntime) the sunrise and sunset times. At the location we deal with we expect to generate some power at least from sunrise + 1h to sunet - 1h. That is tunable via the configuration option
toleranceSeconds. Retrieving the
stationIdis a bit ugly because it's not provided via any API, instead it's rendered serverside into the website. So I just logged in on the portal and picked it up by looking into the page source. www.envertecportal.com API I guess this is some classic in the IoT land, but neither the documentation provided on the portal frontpage as docx, nor the API docs at port 8090 are complete and correct. The few bits I gathered via the Firefox Web Developer Tools are:
https://www.envertecportal.com/apiaccount/login- POST, sent
pwdcontaining your login name and password. The response JSON is very explicit if your login was not successful and why.
- Store the session cookie called
ASP.NET_SessionIdfor use on all subsequent requests.
- Retrieve station info
https://www.envertecportal.com/ApiStations/getStationInfo- POST, sent
stationIdwith the ID of the station. Returns a JSON with an object named
Data. The field
Powercontains the currently generated power as a float with two digits (e.g. 0.01).
https://www.envertecportal.com/apiAccount/Logout- POST, sent
- The portal truncates passwords at 16 chars.
- The "Forget Password?" function mails you back the password in plain text (that's how I learned about 1.).
- The login API endpoint reporting the exact reason why the login failed is somewhat out of fashion. Though this one is probably not a credential stuffing target because there is no money to make, so don't care.
- The data logger reports the data to www.envertecportal.com at port 10013.
- There is some checksuming done on the reported data, but the system is not replay safe. So you can sent it any valid data string at a later time and get wrong data recorded.
- People at forum.fhem.de decoded some values but could not figure out the checksuming so far.