1. Home
  2. Scripting
  3. 3EM consumption on a Wall Display

Scripting

3EM consumption on a Wall Display

Put whole-house consumption on a Wall Display — the one number it cannot show alone.

Updated August 2026

The problem this solves

A Wall Display shows the devices it knows about. A virtual component on another device is not one of them — so the total consumption measured by a Pro 3EM in the panel cannot simply be dragged onto the screen.

This works around it from the other end. A script on the energy meter writes the value into a component that lives on the display itself, over the local network. The display shows its own component; it never has to know where the number came from.

That is the whole idea, and it is worth understanding because it explains the awkward parts: the components are created on the display, the script runs on the meter, and the two have to find each other.

Which script to use

Two versions. The choice is made by the display’s firmware, not by preference.

Display firmware Script How it looks
Beta 2.6 or newer on Wall Display XL or X2i 3em-walldisplay-number.js A virtual number — large, readable, formatted
Below 2.6, or a display without number support 3em-walldisplay-button.js A virtual button whose label is renamed to the value

The button version is a genuine workaround: older firmware offers virtual buttons but not virtual numbers, so the script rewrites the button’s label to read the current consumption. It updates just as often and carries the same information — it is simply smaller on screen.

Check the display’s firmware before choosing. Installing the number version on a display that cannot show one produces no error and no number.

Create the components

Components go on both devices, and they are not the same ones.

On the Wall Display, create the component the script will write to:

  • A Virtual Number for firmware 2.6+. Put it in a virtual group as well — a value shown as a group renders slightly larger
  • A Virtual Button for older firmware

On the 3EM, create two:

  • A Virtual Number — shows the same value locally, on the meter itself
  • A Virtual Button — resets the counter

All of them default to id 200, which is what the script’s CONFIG expects. If you create other components first, the ids shift, and the script has to be told.

How the two devices find each other

The script sends the value to an address. There are two ways to decide which.

Manual — a fixed IP address

Set remote_number_host_mode to "manual" and enter the display’s address. Straightforward, and it requires the address to be reserved in the router. If the display ever takes a new address, the number silently stops updating.

Automatic — the meter as a range extender

Set the mode to "auto", enable range extender on the 3EM, and connect the Wall Display to it instead of to the router.

The script then reads the meter’s own access point client list and finds the display by itself. No reserved address, nothing in the router, and nothing to break when the network changes.

The trade is that the display’s connection then depends on the meter staying powered — which, in a distribution board, it does.

Installing the script

The script runs on the 3EM, not on the display.

  1. Create a script on the meter and paste in the version you chose
  2. Adjust CONFIG — at minimum the connection mode and, if manual, the address
  3. Save and start it
  4. Enable run on startup

See how to add a script.

The value updates every 10 seconds by default. That is update_interval_s, and there is little reason to lower it — a house’s consumption does not change meaningfully faster than that, and each update is a network call.

The period counter

The script does not show the meter’s lifetime total. It shows consumption since the last reset — which is what makes it useful on a wall.

Press the virtual reset button on the 3EM and the counter starts from zero. The starting point is stored in KVS, so it survives a reboot, a power cut and a firmware update.

The obvious use is a monthly reading: reset on the first, and the display shows the month to date. It also works for a project, a tenancy, or anything else where the question is how much since then rather than how much ever.

Tips & best practices

  • Create the components before installing the script. It expects id 200 on both devices, and creating them afterwards means editing CONFIG.
  • Put the number in a group on the display. It renders larger, and on a wall that is the difference between glanceable and squinting.
  • Reset on a schedule you will remember. A period counter nobody resets is just a total with an arbitrary start.
  • Check the display’s firmware first. It decides which script you install, and the wrong one fails silently.
  • The meter still reports to the app. This adds a local display; it does not replace the energy dashboard.