emonHub is used in the OpenEnergyMonitor system to read data received over serial from either the EmonPi board or the RFM12/69Pi adapter board then forward the data to emonCMS in a decoded ready-to-use form - based on the configuration in emonhub.conf
More generally: Emonhub consists of a series of interfacers that can read/subscribe or send/publish data to and from a multitude of services. EmonHub supports decoding data from:
Emonhub is included on the emonsD pre-built SD card used by both the EmonPi and Emonbase. The documentation below covers installing the emon-pi variant of emonhub on linux for self build setups.
This version of emonhub is based on @pb66 Paul Burnell's original adding:
- Internal pub/sub message bus based on pydispatcher
- Publish to MQTT
- Https Emoncms interface
- A multi-file implementation of interfacers.
- Rx and tx modes for node decoding/encoding provides improved control support.
- json based config file option so that emonhub.conf can be loaded by emoncms
EmonHubJeeInterfacer
: Decode data received from RFM69Pi & emonPi in JeeLabs data packet structure e.g. emonTx, emonTH, JeeNode RFM12 demo etc.EmonHubMqttInterfacer
: Publish decoded data to MQTT in a format compatible with emonCMS.
See interfacer specific readmes in /conf/interfacer_examples
- Socket Interfacer
- Space separated serial interfacer
- EmonTX V3 Interfacer (key:value pairs, added by @owenduffy)
- SDS011 Air Quality Sensor Interfacer (added by @danbates)
- Tesla Power Wall Interfacer
- BMW Connected Drive Interface (added by @stuartpittaway)
- Graphite interfacer (added by @hmm01i)
- TCP Modbus interfacer e.g Fronius Inverters (added by @cjthuys)
- Renogy Interfacer
- SMA Solar Interfacer (added by @stuartpittaway)
- Smilics energy monitors interfacer (added by @K0den)
- Victron VE.Direct Protocol Interfacer (added by @jlark)
- Pulse counting interfacer (added by @borpin)
- DS18B20 temperature sensing interfacer
- SDM120-Modbus Interfacer
- MBUS Interfacer
- Redis Interfacer
- Influx Interfacer
It can be installed by making suitable modifications to the emonScripts script.
Emonhub requires Mosquitto
sudo apt-get update
sudo apt-get install -y mosquitto
It is recommended to turn off mosquitto persistence
sudo nano /etc/mosquitto/mosquitto.conf
Set
persistence false
Install emonhub:
git clone https://github.com/openenergymonitor/emonhub.git
cd emonhub
git checkout stable
sudo ./install.sh
To view the emonhub log via terminal on the emonpi or emonbase:
journalctl -f -u emonhub
The emonhub configuration guide can be found here:
The emonhub config module is now included on the standard emoncms build. If you're using Emoncms on the same Raspberry Pi as emonhub, the emoncms config module provides in-browser access to emonhub.conf
and emonhub.log