-
Notifications
You must be signed in to change notification settings - Fork 4
Web data interface
TSalwach edited this page Jan 16, 2016
·
2 revisions
Current data is stored in three files:
- /icpa/tmp/data - as received from MCU
- /icpa/tmp/data_live - parsed by PHP, added tariff data and kWh, removed waveforms
- /ipca/tmp/pwr-2015-xxx - SQLite database consisting table 'edata' in each row there is same data as in data_live + current time (epoch)
Data is polled by web application:
- POWER tab poll:
in 5 seconds intervals from `/var/www/html/data/data.php' with parameter ?live=1
initially from `/var/www/html/data/data_5min.php' to fill power chart with current data
-
PLOTS tab poll from `/var/www/html/data/data.php'
-
PWR Today tab poll from `/var/www/html/data/data_pwr.php'
-
Energy tab poll from `/var/www/html/data/data_ene.php'
-
FREQ tab poll from `/var/www/html/data/data_freq.php'
files:
`/var/www/html/data/data_sqlite.php'
`/var/www/html/data/json_out.php'
are shared code.
One to access SQLite database created by `/icpa/bin/data_sqlite.php'. Other to output data to the browser.