This mod will allow you to extract data right down to PV module level if you are using APS micro inverters and have an ECU.
The system works by broadcasting the inverter data over the powerline, which is then picked up by the ECU and is then accessed by local webserver or online via the EMA website.
What this script does is access the local webserver, pulls the table showing the current inverter information, formats it in the correct way and passes it to Emon.
There is two aspects to this task, 1. Python script that pulls and re-formats the data and 2. NodeRED controls the interval and publishes to EmonCMS.
- Download the attached ZIP file, edit getECUData.py to include your ECU IP address and then place the getECUData.py file into /home/pi/ directory.
- Import the following NodeRED flow…
[{"id":"842d890f.a37508","type":"inject","z":"a5ce04b2.5a31f8","name":"5 MIn Tick","topic":"","payload":"","payloadType":"date","repeat":"300","crontab":"","once":true,"x":204.88116455078125,"y":764.5237426757812,"wires":[["6c080e47.1e45f"]]},{"id":"6c080e47.1e45f","type":"exec","z":"a5ce04b2.5a31f8","command":"python3 /home/pi/getECUData.py","addpay":true,"append":"","useSpawn":"","timer":"","name":"APS Inverter Data","x":482.1427001953125,"y":766.428466796875,"wires":[["7a88f9b6.a998b8"],[],[]]},{"id":"7a88f9b6.a998b8","type":"emoncms","z":"a5ce04b2.5a31f8","name":"Post NodeRED > CMS","emonServer":"","nodegroup":"7","x":959.047607421875,"y":751.1904602050781,"wires":[]}]
- Log into the EmonPi via SSH and ensure the python script runs without errors, you may/will need to install python3 modules. “$ python3 /home/pi/getECUData.py”
- Setup the node ID and appropriate write API keys within the EmonCMS node.
- Press the tab on the inject node and the new node should appear in the inputs of your EmonCMS.
From there you can then create logs and design detailed dashboards.
NOTE: I can’t take the credit for this script, I have only modified it to change the format and implemented it within my system, I have to also thank the other users of this forum who spend hours of their time in helping other users.
getECUData.zip (842 Bytes)