PHP Class to open and to access the Omnik Inverter and return 'readable' data in different ways.
Whenever you read from the wifi module you might run into time-out conditions when also data is sent to the portal website, especially when the portal is performing poor causing long response times.
- Bug fixes (changed trigger definition)
- Update inverter.sql (added create database)
- Documentation update
- BEFORE IMPLEMENTING THE NEW CLASS PLEASE UPDATE THE DATABASE TABLE, SEE inverter.sql
- Implemented totalHours (changed from htotalkWh), totalHours is hours the inverter is running since last reset
- database table solar_power extended and changed from INNODB to MEMORY (to speed up access)
- trigger on solar_daily_direct changed to update solar_power table
- BEFORE IMPLEMENTING THE NEW CLASS PLEASE UPDATE THE DATABASE TABLE, SEE inverter.sql
- Corrected a problem with pac1,pac2,pac3,fac1,fac2,fac3; pac1 & fac1 (was fac) were correct, pac2,fac2,pac3 & fac3 are now correct too
- inverter_layout.html modified due to reflect correct data pac and fac
- htotalkWh added (will be implemented in next version)
- database layout changed, fac changed to fac1, fac2 and fac3 added, see inverter.sql
- class updated to reflect pac and fac changes
- working on undetermined part in layout
This class is the engine
- to identify your inverter using the WIFI ip-address, WIFI tcpport (8899) and the WIFI serialnumber
- to connect to and read from the inverter
- to process the data received from the inverter
- to (optionally) insert data into a mysql database
- to display the databuffer
- to the read the current power generated
The class is fully documented inline
Sample php script to access and read data from the inverter
The script is self-explaining, comment out some lines to test different parts
description of databuffer returned from inverter
Contains MySQL DB parameters to make a DB connection
Change the parameters according to your MySQL environment
Do not change the filename
Contains the database, table(s) and trigger definitions
Add this definition to an existing database or create your database using "create database db-name;" statement
Check the inline documentation before defining the tables