Purpose of these files is a full integration of the Enphase EnvoyS-Metered multiphase in Emoncms.
This includes:
- configuration file for the EnvoyS and Emoncms settings
- python script to read the EnvoyS data and send them to Emoncms
- Emoncms device templates
It has been tested with:
- Python 3.7.3
- an Envoy-S-Metered-EU multiphase with firmware 5.0.34.
- emoncms v10.2.1 installed locally on a Debian 10.3 x64.
Please see Emoncms for details.
On Debian based system:
# Install python3
sudo apt-get install python3
sudo apt-get -y install python3-pip
# Update pip
sudo pip3 install --upgrade pip
Navigate to some location like your home directory or /var/tmp.
# Clone the repository
git clone -b master https://github.com/FredM67/EnvoyS2Emoncms.git
cd EnvoyS2Emoncms
sudo cp EnvoyS2Emoncms.py /usr/local/bin/EnvoyS2Emoncms.py
sudo chmod +x /usr/local/bin/EnvoyS2Emoncms.py
sudo cp EnvoyS2EmoncmsWatchdog.sh /usr/local/bin/EnvoyS2EmoncmsWatchdog.sh
sudo chmod +x /usr/local/bin/EnvoyS2EmoncmsWatchdog.sh
Install the configuration file, rename it and modify it accordingly to your system by setting the fields marked with < ... >.
sudo mkdir /etc/Enphase
sudo cp EnvoyS2Emoncms_default.cfg /etc/Enphase/EnvoyS2Emoncms.cfg
At this point, if you want to check if everything is working properly, you can run the script by hand like this (stop it with Ctrl-C
):
sudo /usr/local/bin/EnvoyS2Emoncms.py
You should see new inputs in your emoncms.
Configure log rotation:
sudo cp EnvoyS2Emoncms.logrotate /etc/logrotate.d/EnvoyS2Emoncms
Add a crontab for the watchdog:
sudo crontab -e
add
* * * * * /usr/local/bin/EnvoyS2EmoncmsWatchdog.sh
After that, the system will start automatically the python script within 1-2 minutes.
In your emoncms, you should see new inputs under the node id set in the config file.
For those with a local emoncms, you can add 2 templates. They help the user to create feeds, configure them, ... automatically. For further details about that, please see Emoncms Documentation and Emoncms Device module.
# deploy the template with general data
cp EnvoyS.json /var/www/emoncms/Modules/device/data/EnvoyS.json
# deploy the template with detailed data (general + each phase)
cp EnvoyS-3phase.json /var/www/emoncms/Modules/device/data/EnvoyS-3phase.json
After that, you've to update the template list, just call:
http://my_emoncms/device/template/reload.json
That's it! Have fun!