Brian, just take a step back and take in the overall view. We have a man who has been struggling with following your advice, now you’re suggesting that he gets confused again by doing something he knows was successful once a different way.
I shall repeat myself: I advise him to exactly repeat what he did the first time. We all know it worked.
The Inputs are coming through as P1, P2, P3, P4 and E1, E2, E3, E4, along with T1, T2 etc. All good so far, and the values “look about right”.
Previously I used to have processes such as Log to feed, followed by Publish to MQTT, followed by Power to kWh on each ct#. Am I right to think that I would just add a Log to feed on the P1 and add a Power to kWh the on E1 instead of both on each ct# (as above)?
How do I prevent loosing cumulative data if the emonTx gets powered down for any reason?
And one more; and I know this is a bit back to front, but “why” does one need emonSD loaded & running on the Pi Zero at all? I always understood that the ESP8266 was just a “wifi dongle” and that it passed the EmonTx’s messages through effectively unaltered. So in that regard, what does the Pi bring other than comms?
Well almost; I now have four EmonTx communicating to my emonPi via Raspberry Pi Zeros; I have recreated the Inputs & Feeds etc, just need to re-build my Dashboards and Apps now.
For future reference, I have attached a “How-To for Dummies” that I have cobbled together, in case it help others if they struggle as much as I do.
In hindsight, I found the process as fascinating as it was frustrating, but I have learnt a lot in the process. Words like sketch, Arduino, avrdude and miniterm are now familiar, even if what they do isn’t always …
Looks good. I have just noticed on one of the photos, the internal serial breakout (JP3). You could have put a header on that and connected up so no external cable!
The UART connector is specifically for the programmer, the screw terminals are specifically for I/O, such as the temperature sensor and pulse input.
If you want the nitty-gritty details, take a look at the circuit diagram (ideally, you need to download and install Eagle CAD (free for personal use with the size of PCB we use) then you can see the same track highlighted on the pcb and on the circuit diagram.
@haffle, @Robert.Wall, I think I have worked out why the writing of the firmware from the RPi directly didn’t work. The utility is using Python not Python3.
Thanks @borpin ; pressing the Reset button didn’t kick the Inputs in to life, so I powered the Pi Zero down through the EmonCMS / Admin page, waited a bit then powered both bits down and back on again. But that too has not cleared it.
There is always a chance that it is a physical issue - jumper lead coming dislodged etc, but that seems unlikely as the unit is screwed on to a purlin high up in a rodent / bird / cat free barn in close proximity to an Apple Airport Express.
As far as I can tell, the emonTx sends to the serial port nothing outside the range [0x0a, 0x0d, 0x20-0x7f] and I think those characters lie wholly within the utf-8 character set.
If the baud rate has become wrong for an unknown reason, then I cannot predict how characters within the utf-8 set will be interpreted, but it’s feasible that the result of a wrongly interpreted character could well fall outside the utf-8 character set.