I’ve just spent a few hours playing with my new emonTx v3.4 in preparation for monitoring my 3 phase power. As required for this, I downloaded the 3phase firmware and started editing my way to a calibrated setup.
I noticed the following sections already existed in the default emonhub.conf file that came with the emonSD image:
[] nodename = 3phase [[[rx]]] names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse datacode = h scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1 units =W,W,W,W,V,C,C,C,C,C,C,p [] nodename = 3phase2 [[[rx]]] names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse datacode = h,h,h,h,h,h,h,h,h,h,h,L scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1 units =W,W,W,W,V,C,C,C,C,C,C,p
So I fired it all up and was getting data - happy days!
Then I noticed in my Inputs that I had two unnamed values against 3phase (numbered 12 and 13). Looking at the 3phase firmware I see that it is set to node 11, so that’s where I went looking in the emonhub.conf.
Ok, I thought “I just need to copy the decoder section from the script comments”, so I copied and pasted those in over node 11 in my emonhub.conf and rebooted.
I headed downstairs to continue my calibration efforts where I had access to measure current, expecting to come back upstairs to see correct data in my inputs when I came back.
What I came back to was a log file full of “MainThread RFM2Pi thread is dead”.
After a few hours of searching through the forums and numerous reboots, I went back through all of the changes I’d made since it had worked, and the fix was to put the old (default) copy of my emonhub.conf back.
Another half hour of searching through logs and playing with different options, the problem turned out to be a missing “s”.
The default emonhub.conf has this for node 11:
datacode = h
The 3phase script comments have this:
datacode = h,h,h,h,h,h,h,h,h,h,h,L
The correct line should be:
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
I’ve logged an Issue in GitHub against the 3phase firmware, but I’m not sure that a syntax error in the emonhub.conf should cause a thread to die either, so I think that’s another bug somewhere else.
Looking at the other 3phase nodes in the default emonhub.conf file, I see that node 12, 13 and 14 are also all incorrect.