Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Python module to open PHPFina feeds

Hello

The PHPFina engine is coded in PHP.

Anyway, there is a lot of tools in python (numpy, scipy) to work with feeds. It is a different approach to the one using another grapher such as grafana for example. After opening some feeds on python, you can use all the scientific tools available in python, which gives you about the power of Matlab…and there is no need to reinvent the wheel like when coding a new process in PHP :slight_smile:

If you don’t have an emoncms server at hand, if you want to work on old feeds coming from a deprecated emoncms installation, you can use this PyFina module to visualize your feeds

A module is available through pip to open your feeds with python as numpy feeds

python3 -m pip install --upgrade PyFina

or if you use windows

py -m pip install --upgrade PyFina

to get started, opening feed number 1 stored in the same folder, with an interval of 3600s and for 8 days :

from PyFina import getMeta, PyFina
dir = "."
meta = getMeta(1,dir)
Text = PyFina(1,dir,meta["start_time"],3600,24*8)

Some examples :

if some of you are interested in testing, I am interested in feedback

Best

Alex

1 Like

This is really nice, thanks for sharing @alexandrecuer

Ran the code documented in your readme and it works really well :slight_smile: