Test Site
http://www.forby.com/solar/?detail=1
I have started to use SQL server for logging data,
Actually, home_monitor software will collect the information from Envoy & Battery remotely,
and upload the data on website by calling solar_data.php
I am using jpgraph (www.jpgraph.net) for the line graphs,
and just GD line drawing for home layout.
solar.inc configruation related database
solar_db_initial.php initialize the database, and add the initial data records
solar_data.php add some data into db, and get solar informations
chart_panel0_inc.php house layout drawing information has hard-coded, and location of panel will be
referenced from dataset in DB,
I have updated from the concept software
1. json configuration
need 'envoy.json' in executable folder, it is a configuration file
It includes
Envoy Location / ID / Passowrd
FTP Folder for upload 'index.html' and 'panel.png'
Battery Back (just optional for myself, if needed)
Home Graphic Layout
Panel Layout
Panel Information (Groups, Location, Orientation, Serial Number, etcs)
2. FTP upload for web interface
need 'template.html' in executable folder, it will be updated to 'index.html'
It will showing METER readings
and Micro-inverter information
and House Layout
it is just concept how can be monitor Envoy IQ
and Generate Web page, and uploading using FTP
I will not publish the code on this website,
It is the last code for public,
I will just developt for myself only.
In fact, I can not keep going this programming, because I didn't got PTO yet.
and, My solar project has stuck by COVID-19.
Example
AcbSetSleepMode: "/admin/lib/acb_config.json",
AcbGetSleepModeData: "/admin/lib/acb_config.json",
AcbCancelSleepMode: "/admin/lib/acb_config.json",
AgfProfileIndex: "/installer/agf/index.json?simplified=true",
AgfProfileDetails: "/installer/agf/details.json",
AgfProfileInverterStatus: "/installer/agf/inverters_status.json",
AgfProfileSetProfile: "/installer/agf/set_profile.json",
CellularConfig: "/admin/lib/network_display.json?cellular=1",
ClearGFIPost: "/admin/lib/admin_dcc_display.json",
DhcpGetNewIp: "/admin/lib/network_display.json",
DiagnosticNetworkCheck: "/admin/lib/network_display.json",
EthernetConfigGet: "/admin/lib/network_display.json",
EthernetConfigPut: "/admin/lib/network_display.json",
EventsGet: "/datatab/event_dt.rb",
GetInfo: "/info.xml",
GetTimezones: "/admin/lib/date_time_display.json?tzlist=1",
Home: "/home.json",
InternalMeterInfo: "/ivp/meters",
InternalMeterReadings: "/ivp/meters/readings",
InternalMeterCurrentCTSettings: "/ivp/meters/cts",
Inventory: "/inventory.json?deleted=1",
InverterComm: "/installer/pcu_comm_check",
InverterProduction: "/api/v1/production/inverters",
InverterDelete: "/prov",
InverterPut: "/prov",
NewScanGet: "/ivp/peb/newscan",
NewScanPD: "/ivp/peb/newscan",
PowerForcedModeGet: "/ivp/mod/EID/mode/power",
PowerForcedModePut: "/ivp/mod/EID/mode/power",
PMUGet: "/admin/lib/admin_pmu_display.json",
PMUPost: "/admin/lib/admin_pmu_display.json",
RedeterminePhase: "/ivp/grest/local/gs/redeterminephase",
ReportSettingsGet: "/ivp/peb/reportsettings",
ReportSettingsPut: "/ivp/peb/reportsettings",
SetTimezone: "/admin/lib/date_time_display.json",
SystemReadingStats: "/production.json?details=1",
TariffSettingsGet: "/admin/lib/tariff.json",
TariffSettingsPut: "/admin/lib/tariff.json",
TunnelStateGet: "/admin/lib/dba.json",
TunnelStatePut: "/admin/lib/dba.json",
UpdateMeterConfig: "/ivp/meters/EID",
UpdateMeterCurrentCTConfig: "/ivp/meters/cts/EID",
UpdatePassword: "/admin/lib/security_display.json",
WifiSettings: "/admin/lib/wireless_display.json",
WifiSettingsJoin: "/admin/lib/wireless_display.json"
Simple JSON Parser for Visual Basic in Class
Example
Dim JSON As New json
JSON.Text = System.IO.File.ReadAllText("C:\installer.json").Replace(vbCr, "").Replace(vbLf, "")
Dim p() As String = New String() {"0", "devices", "0"}
Dim v As json_value = JSON.Value(p, True)
Console.WriteLine(JSON.Count.ToString
json_type in json_value
null = 0
bool, numeric, text in json_value.VALUE
array in json_value.VALUES
' Read all values
Dim v() as json_value = JSON.Value()
' Read specific value
' Path should be list of ID in level, array ID is 0 ~ nn
Dim v1 as json_value = JSON.Value(path() as string)
' Read specific value, ignore case of ID while compare
Dim v1 as json_value = JSON.Value(path() as string, True)
if can not find a data using IDs, it will return nothing.
if found a data, check json_value.type, and handle the data
This is a good article to read who want to make a remote access
https://thecomputerperson.wordpress.com/2016/08/28/reverse-engineering-the-enphase-installer-toolkit/
Thank to the app developer
Finally, I have made a simple software using Visual Basic (2015) to monitor Envoy Remotly.
I have attached a source code in this article.
Prepare Remote Access Method
(1) Router Port Forward If needed
* I am using 80 port for this web server, so, I have forward 180 to 80 to Envoy which has connected via WiFi
* It makes me to connect on Envoy Web interface remotely
(2) I am getting inverter informaiton
http://envoy:xxxxxx@forby.com:180/api/v1/production/inverters
* xxxxxx = last six digit of sserial number of your envoy
* forby.com = it is my home router domain, you can use IP address or your own domain
(3) I am getting meter information
http://forby.com:180/production.json
* forby.com = it is my home router domain, you can use IP address or your own domain
This software is not completed yet, I just upload back-born for testing, now
ToDo :
* configuration window
* data logging into DB
* create static web page for my web server, and upload