Setup 3-phase emonTX with emonESP using

Tags: #<Tag:0x00007fc9299a0b88> #<Tag:0x00007fc9299a0a20>

Hello, my accountname ist peterneubauer

Hardware: emonTx with 3 CTs, 5V-DC and AC-AC-adapter, emonESP
Version: In my order I mentioned that i want to monitor 3-phase system. I don’t know if this was considered to the deployed versions of the emonTX or emonESP. so currently the versions are unknown to me.
As mentioned I want to monitor 3-phases. (according to the forum, using just one AC-AC adapter and one emonTX, I will need to use the 3-phase-voltage-estimation-firmware for the emonTX)

Assuming the correct firmwares preinstalled I followed the guide for 3phase usage. I disconnected power from the emonTX, then 1.) connected emonESP 2.) all 3 CTs 3.) connected 5V DC power via USB and 9V AC-AC adapter simultaneously.
(Here I have to mention, previously I sucessfully ran the HW-configuration with the EmonPi (as base) and the emonTX, means the emonESP was not attached to the Tx. The Tx sent the data via Emonpi to

Issue 1: Cannot connect emonTX to server
I followed the guide regarding the emonTX-web-configuration: “Emoncms Server*” with value:“”, “Emoncms Node Name*” value:“0”, and the “Write apikey*” copied from Account information (copy/paste). Still the emontx tells me “Saved - Connected: No”.
Information: Within the home-Wifi connected, the emontx/emonesp has a default route to the internet (Standard provider Wifi-Router/DHCP), however similar IP-clients autoconfig and have access to the internet via the network connected.

Issue 2: “Latest Data” on the emonESP seems wrong.
Section “Latest Data” on the emonTX-webinterface displayes (Key Value) T1: 3935, CT2: 325W, T0: 20.5C
I have to say, that running the previous hardware-configuration with the emonpi as base, the correct values for CT1,2 and 3 were collected sent to emonpi and further to
Reading through the openenergymonitor-forum, I think the current version of my emontx may not be recent enough. Capturing 3-phases with emontx and using emonesp as Wifi-connection needs recent firmware version for emontx and maybe some configuration like baudrate (max 9600) to both emonTX and emonESP. (But I don’t know how to archieve this currently)
current Version Information emontx (emonESP Menue: “7.System”) is v2.3.0. (is this the emontx firmware? or the emonESP’s?)

As you can see I need some help :slight_smile:
I would appreciate related instructions on my issues 1 and 2. Willing to provide any further necessary information!
Maybe I only need the right links into the openenerymontor-forum.

(I am willing to obtain an USB to UART adapter in order to upload the appropriate firmware for my scenario. I would appreciate a guide or some kind of checklist for that, maybe just the right links in the forum).

Thanks in advance
Best Regards

Welcome, Peter, to the OEM forum.

I do not have access to the records from the shop. I have asked the question for you.

It appears that you have the 3-phase sketch, but the standard software in your ESP. That will explain why it is not communicating.

That is correct. The 3-phase sketch will give a good estimate of real power (Wirkleistung), the standard sketch will give the incorrect values for real power, but it does calculate - but not show - apparent power (Scheinleistung) correctly.

I am sorry, but I cannot answer this. I do not have an ESP8266 module, therefore I have no experience of this.

Because the emonTx is very busy when running the 3-phase sketch, it is not possible for it to communicate with the ESP8266 module at the default baud rate. It therefore needs the baud rate in the ESP8266 to be reduced to 9600 baud.

It is always good to have this adapter (“programmer”). If you do obtain one, be warned that some do not work with our system. If you buy from the OEM shop, that one is guaranteed to work.

If you do buy the programmer, you can adjust and load the 3-phase sketch in your emonTx, and calibrate it for your system if necessary, and you can load the software for the ESP8266 that has the correct baud rate:(

If you download the 3-phase sketch Update to 3-Phase PLL sketch
then you must read the documentation that comes with it, and choose the options that are right or you. (I’m sorry it is in English only - your English is much better than my German.)

I wrote the sketch for a fellow countryman of yours, @Simsala. He uses the 3-phase sketch and emonESP and he might be able to help you.

Thanks lots for the reply Robert, with a little bit of additional research it solved my issue.
If someone got the same issue, i want to keep my documentation for this issue here:

use case: 3 phase, 4 wire, 230V, country:Austria, use of emonTX with emonESP and (without emonPi or emonBase)


  1. Download Firmware for emonTx V3.4.x
  2. Download emonTx V3 3-phase Firmware
  3. Download and install platformIO Atom (see “Firmware Modification”
    3.1 Install “platformio-ide” Package
    3.2 then I had to remove the c:\Users\Username.platformio\penv Directory and restart platformIO
    3.3 I also had to check and uncheck “Use built-in Platform IO Core” within the platformio-ide package settings in platformIO
  4. “Open Project” in platformIO, point to directory “firmware” of the previously downloaded Firmware for emonTx
    4.1 Remove files from src directory
  5. Move files from previously downloaded “emonTx V3 3-phase Firmware” to the empty “src” folder of the project created
  6. Edit file emonTx_3Phase_PLL.ino
    6.1 change “#define RFM69CW” to “#define EMONESP”
    6.2 consider my installation in Austria, one also changes “double vCal = 268.97” to value 260
    6.3 make sure occurence of “Serial.begin(” has value 9600 (necessary due to use of 3phase with emonESP)
  7. Build the project, connect the emonTX via “UART to USB programmer” and “Upload”


  1. Download firmware for emonESP
  2. Open Project in platformIO IDE, use folder EmonESP-master from previous download
  3. Edit file src.ino, change ocurrences of “Serial.begin(115200” to value 9600 - matching the setting from the emonTX
  4. Edit file platformio.ini, change -DWIFI_LED=0 to value 2 (0=rst!) (EmonESP keeps rebooting)
  5. Following the guide
    5.1 connect the emonESP via UART to USB progammer
    5.2 Upload src via command “pio run -t upload”
    5.3 Upload spiffs via command “pio run -t uploadfs”

I dont know if the following was really necessary in my case, since the recurring reboot problem of the emonESP was solved following 4.)(DWIFI_LED=2)
Anyhow, if reboots persist, try to erase all flash memory following the guide “ write_flash 0x000000 blank_1MB.bin 0x100000 blank_1MB.bin 0x200000 blank_1MB.bin 0x300000 blank_1MB.bin”. Use “esptool” (, satisfy depenence “pyserial”(

1 Like

I cannot recommend platformio. Although it appeared to work for you, when I installed it on my machine, it moved several directories and their contents, and thereby broke my system.
Consequently, I consider it malware and I am unable to support it.

I’ve said it before, I don’t think that an appropriate term to use. It might not have done what you expected or wanted, but that does not make it ‘malware’.

And I’ve said it before too: if an application moves pre-existing files and directories without asking or warning, and without explicit permission, that is the behaviour of malware.

Or, at the very minimum, a poorly designed app. I vaguely recall at least one other person
saying the same thing Robert did about PIO moving files on their machine.

It wouldn’t be quite so bad if one got a warning about any impending filesystem changes
and a chance to halt the install process.