Takes real time stream from Enphase Envoy and publishes to mqtt broker

A Python script that takes a real time stream from Enphase Envoy and publishes to a mqtt broker. This can then be used within Home Assistant or for other applications. The data updates at least once per second with negligible load on the Envoy.
Requirements
- An Enphase Envoy. Note – Tested with Envoy-S-Metered-EU
- A system running python3 with the
paho.mqtt
python library - The normal way to install
paho.mqtt
is
pip install paho-mqtt
- If that doesn’t work, try
git clone https://github.com/eclipse/paho.mqtt.python
cd paho.mqtt.python
python setup.py install
- The serial number of your Envoy. Can be obtained by browsing to “http://envoy.local“
- The installer password for your envoy. To obtain, run the
passwordCalc.py
script using the Envoys serial number after first editing the file and inserting your serial number. Don’t change theuserName
– it must be