Technical Overview

emonPi Architecture Overview
Fig.1 - emonPi Architecture Overview

The emonPi is based on a RaspberryPi + emonPi Shield PCB. The emonPi features a ATmega328p 8-bit microcontroller which is Arduino compatible.

emonPi RaspberryPi Shield PCB
emonPi Raspberry Pi Shield PCB

An emonBase functions in much the same way as an emonPi but instead of an emonPi shield PCB it uses an RFM69Pi PCB and has no local energy monitoring capability. The Raspberry Pi on the emonBase runs the same emonSD software as the emonPi.

emonBase: Raspberry Pi + RFM69Pi
emonBase: Raspberry Pi + RFM69Pi

Hardware Overview

As the diagram (fig.1) shows the Atmega328 microprocessor communicates with the Raspberry Pi via the internal UART (/dev/ttyAMA0 serial port. Data is transmitted over serial using the JeeLib packet format. The ATmega328 on the emonPi / RFM69Pi run a modified version of JeeLabs RFM12Demo Sketch.

Inside the emonPi

More technical info See emonPi Resources


The emonPi / RFM69Pi uses the HopeRF RFM69CW RF module to receive data from other wireless nodes (emonTx, emonTH etc) using 433Mhz. Each RF node is required to be on the same network group (default 210) and have an unique node ID. Data is transmitted over serial using the JeeLib packet format. EmonHub python service on the Raspberry Pi requires a corresponding node decoder entry in emonhub config for each RF node. See emonHub in section below.

See Fundamental Building block Resources

Energy Monitoring

Energy monitoring on the emonPi and emonTx is achieved using emonLib discrete sampling and the ATmega328’s 10-bit ADC. By default samples are taken once every 5 seconds.

See Fundamental Building block Resources

Pulse Counting

Pulse counting on the emonPi and emonTx uses ATmega328’s second hardware interrupt IRQ1. The first hardware interrupt IRQ0 is used by the RFM69CW. Only one pulse counter input is possible per emonTx/emonPi.

See Optical Pulse Sensor Resources

Software Overview

By default the Raspberry Pi runs a modified version of Debian Raspbian Jessie Lite. A pre-build SD card image (emonSD) is available to purchase or download) which has everything already set up.

emonSD features

  • Read-only root file-system for long SD card lifespan
  • emonPi LCD & Update service
  • Emoncms with low-write optimisations
  • Mosquitto MQTT server
  • emonHub service
  • Node-RED
  • OpenHAB
  • LightWave RF MQTT OOK

See emonSD Resources


emonHub (emonpi variant) is pre-installed on emonSD. EmonHub is a python service which receives the data from the emonPi via serial (in JeeLabs packet) format. emonHub decodes the data and publishes it to the emonPi’s localhost Mosquitto MQTT server and (if configured) remotely to

Corresponding EmonHub node-decoder entries must be present in emonhub config for each wireless RF node e.g. emonTx, emonTH. See configuring emonhub in the resources:

See emonHub Resources

See Technical > Resources for further info and support >