Configuration

Note

The emonPi3 and emonTx6, by default, use 433.92 MHz for RF communication, rather than 433.00 MHz, to stay within the ISM regulated band. If you are using OpenEnergyMonitor emonTH2, emonPi2, emonTx4, or emonTx5 units you should update their firmware to support 433.92 MHz, or enable 433.00 MHz compatibility mode in the emonPi3/Tx6.

Through EmonCMS

The emonPi3 is usually pre-configured in the shop as part of the order process but can be re-configured at any point using the Serial Config tool available from the emonPi3 local EmonCMS interface.

  • Navigate to Setup > Admin > Serial Config

  • Click on Stop EmonHub to temporarily stop the EmonHub service while we perform calibration.

  • Select serial port /dev/ttyAMA0 and click Connect.

  • After a couple of seconds the emonPi3 will print out its current configuration which will populate the interface (if it does not do this type l and click Send to reload the calibration details from the emonPi3 measurement board).

  • Adjust any settings you need to change.

  • Click on Save Changes to ensure that the new configuration is recorded such that it persists when you power cycle the board.

  • When finished, click on Stop Serial to disconnect the serial configuration tool and then Start EmonHub to restart the EmonHub service.

emonPi3_serial_config.png

Directly via serial

It is possible to configure the emonPi3/Tx6 directly through the USB serial port or UART using minicom or other similar tool. When using a UART, the settings are 115200, 8N1, \r\n line ending.

The following table details the available commands and their function.

Command

Description

?

Show help text

emonlock

Lock the configuration interface

emonunlock

Unlock the configuration interface

a<n>

Set the assumed RMS voltage as integer (when no AC voltage detected)
Example: a230 sets assumed voltage to 230V

b

Backup configuration to serial

c<n>

Log to serial output
- c0: Disable serial logging
- c1: Enable serial logging
- c2: Enable verbose serial logging

d<x.x>

Set data log period in seconds
Example: d10.0 sets logging period to 10 seconds

e

Enter bootloader mode for firmware updates

f<n>

Set line frequency in Hz
- f50: 50 Hz (Europe, UK, etc.)
- f60: 60 Hz (US, Canada, etc.)

g<n>

Set network group for RF communication (default = 210)
Example: g210

h

Safe Raspberry Pi power off countdown (will not remove power)

i<x> <y> <i.i>

Auto calibration
Parameters:
- x: Channel number (1-3 = Voltage; 4+ = CT)
- y: Mode select
  - a: amplitude
  - p: phase
- i.i: measured RMS amplitude
Example: i4 a 45

j<n>

JSON serial format
- j0: Disable JSON format
- j1: Enable JSON format

k<x> <a> <y.y> <z.z> <v1> <v2>

Configure an analog input (voltage or current)
Parameters:
- x: Channel number (1-3 = Voltage; 4+ = CT)
- a: Active status (0 = DISABLED, 1 = ENABLED)
- y.y: V/CT calibration constant
- z.z: CT phase calibration value (degrees)
- v1: CT voltage channel 1 (reference)
- v2: CT voltage channel 2 (for L-L loads)
Example: k4 1 90.0 1.5 1 1

l

List current settings (displays all configuration)

ls

List saved settings (displays all configuration)

lh

List current settings (displays all configuration), human readable

lhs

List saved settings (displays all configuration), human readable

m<v> <w> <x> <y> <z>

Configure a OneWire/pulse input
Parameters:
- v: Channel index
- w: Active status (0 = DISABLED, 1 = ENABLED)
- x: Function select
  - a: analog
  - b: Both edges (pulse)
  - f: Falling edge (pulse)
  - r: Rising edge (pulse)
  - o: OneWire (temperature sensor)
- y: Pull-up resistor (0 = OFF, 1 = ON)
- z: Minimum time, in milliseconds, between pulses
Example: m1 1 r 1 50

n<n>

Set node ID [1..60]
Example: n5 sets node ID to 5

o

OneWire configuration
Options:
- x = ca: clear all saved OneWire addresses
- x = c<n>: clear saved OneWire address for channel n
- x = f: reset and find OneWire devices
- x = h: hold the found OneWire addresses (overrides any manually configured addresses)
- x = l: list OneWire devices
- x = n: list all saved OneWire addresses
- x = integer, n: move supplied address to position n (see Examples)
- x = r <a> <b>, remap found sensor <a> to index <b>

p<n>

Set the RF power level (0-31). Transmitter may be damaged for values greater than 25 when no antenna is installed.
Example: p7

q

Reset the system (confirmation required)

r

Restore default settings (unsaved changes will be lost)

rs

Restore saved settings (unsaved changes will be lost)

s

Save settings to NVM (non-volatile memory)
Must be used after making configuration changes

t

Trigger report on next cycle (force immediate data transmission)

u

Save accumulator values to NVM

v

Show firmware and board information

w<n>

RF module active
- w0: Disable RF
- w1: Enable RF

x<n>

433 MHz RF frequency compatibility
- x0: 433.92 MHz (standard)
- x1: 433.00 MHz (legacy compatibility)

ye

Set energy accumulator n to m Wh

yp

Set pulse accumulator n to m pulses

z

Zero energy/pulse accumulators (reset Wh/pulse counters)
- z: Zero all accumulators (E1-E12, pulse1-3) with confirmation
- ze1 to ze12: Zero individual energy accumulator (e.g., ze3 zeros E3 only)
- zp1 to zp3: Zero individual pulse accumulator (e.g., zp1 zeros pulse1 only)
All commands require ‘y’ confirmation

Locking and unlocking the configuration

To protect against accidental changes, the configuration interface can be locked against changes. Read only commands are still available when locked.

EmonHub Node Decoder Configuration

The emonTx6 transmits data via RF that needs to be decoded by EmonHub. The node decoder configuration defines how the raw data packets are interpreted. Configuration depends on whether the emonTx6 is operating in single-phase or three-phase mode.

Single-Phase Mode

The decoder configuration for node 20 (main CT1-6 channels) in single-phase mode is:

[[20]]
nodename = emonTx6_20
[[[rx]]]
names =     MSG, Vrms1, Vrms2, Vrms3, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6
datacodes = L, h, h, h, h, h, h, h, h, h, l, l, l, l, l, l
scales =    1.0, 0.01, 0.01, 0.01, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
units =     n, V, V, V, W, W, W, W, W, W, Wh, Wh, Wh, Wh, Wh, Wh

Data fields:

  • MSG: Message counter

  • Vrms1: Single RMS voltage (scaled by 0.01)

  • Vrms2: Always 0

  • Vrms3: Always 0

  • P1-P6: Real power for CT channels 1-6 (watts)

  • E1-E6: Energy accumulator for CT channels 1-6 (watt-hours)

In single-phase mode, Vrms2 and Vrms3 will always read as 0.

Three-Phase Mode

When all three voltage channels (V1, V2, V3) are active on the emonTx6, it operates in three-phase mode and transmits three-phase voltage readings along with power and energy data.

The decoder configuration for node 20 (main CT1-6 channels) in three-phase mode is:

[[20]]
nodename = emonTx6_20
[[[rx]]]
names =     MSG, Vrms1, Vrms2, Vrms3, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6
datacodes = L, h, h, h, h, h, h, h, h, h, l, l, l, l, l, l
scales =    1.0, 0.01, 0.01, 0.01, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
units =     n, V, V, V, W, W, W, W, W, W, Wh, Wh, Wh, Wh, Wh, Wh

Data fields:

  • MSG: Message counter

  • Vrms1, Vrms2, Vrms3: Three-phase RMS voltages (scaled by 0.01)

  • P1-P6: Real power for CT channels 1-6 (watts)

  • E1-E6: Energy accumulator for CT channels 1-6 (watt-hours)

Additional Nodes

Both single-phase and three-phase modes use additional nodes for supplementary data:

  • Node N+1: Temperature, pulse, and analog data (node 21 if N=20)

  • Node N+2: Extended CT channels 7-12 (node 22 if N=20)

Configuration Steps

  1. Determine your emonTx6’s operating mode by checking which voltage channels are active (use the l command in serial configuration).

  2. Select the appropriate decoder configuration above (single-phase or three-phase).

  3. Adjust the node number [[20]] to match your emonTx6’s configured node ID.

  4. Add the configuration to your emonhub.conf file in the appropriate section.