From before (topic is getting long!):
see:
emonTx3 direct serial ā OpenEnergyMonitor 0.0.1 documentation
From before (topic is getting long!):
see:
emonTx3 direct serial ā OpenEnergyMonitor 0.0.1 documentation
You will need to make sure that the serial connections and supply voltage on the serial to USB adapter match those of the emonTx3 otherwise āsparks may fly and the magic smoke may escapeā ā¦
I am assuming that you know what to do as you say that youāve done it before ā¦
I donāt want you to damage anything, including your self!
Thanks! I did it before via the Arduino IDE, I need to set up the environment again, and my old iMacs arenāt supported any more. Found the cable though
OK, emontx serial output:
emonTx V3.4 EmonLibCM Continuous Monitoring V0.10
OpenEnergyMonitor.org
Loaded EEPROM config
Settings:
Group 210, Node 16, Band 433 MHz
Calibration:
vCal = 262.60
i1Cal = 9090
i1Lead = 4.20
i2Cal = 91.60
i2Lead = 4.20
i3Cal = 91.80
i3Lead = 4.20
i4Cal = 16.80
i4Lead = 5.00
datalog = 9.95
pulses = 1
pulse period = 100
temp_enable = 1
Temperature Sensors found = 0 of 1
Temperature measurement is NOT enabled.
RF whitened
RFM69CW only Node: 16 Freq: 433MHz Group: 210
@Robert.Wall does this identify what library it is using?
Just to be sure, have you checked the serial output of an emonTx3 or emonTH to see if it says what the firmware is?
emonth2 serial output
OpenEnergyMonitor.org
emonTH FW: V324
No EEPROM config
Int RFM...
RFM Started
Node: 24 Freq: 433Mhz Network: 210
Int SI7021..
SI7021 Started, ID: 21
SI7021 t: 21.00
SI7021 h: 60.44
No DS18B20
Iām not sure what V324 means (perhaps 3.2.4?), the current options in Admin/Update/Firmware for emonth2 are both 4.1.5, but only for LPL or JeeLib Classic, not JeeLib Native.
Interestingly, I found this in the documentation:
New: Support for three different radio formats is available: JeeLib Classic, JeeLib Native and LowPowerLabs.
So whatās the deal with JeeLib Native? It was clearly offered as a choice at one time, but it seems to have been withdrawn.
I am trawling through GitHub trying to find old versions, but without much success so far.
Just to clarify things here and avoid confusion
emonLibCM release ~Aug 20
Robertās continuous measurement Arduino Library for the emonTX3.4
EmonLibCM is a Continuous Monitoring alternative to EmonLib. Whereas emonLib repeats, every 5 or 10 s, a sequence of voltage and current measurements in each of the input channels for a short period, normally 200 ms, and then reports the measurements back to the sketch for onwards transmission to (for example) emonCMS; emonLibCM continuously measures in the background the voltage and all the current input channels in turn, calculates a true average quantity for each and then informs the sketch tā¦
emonPiCM release ~Jul 21
Robertās work on emonPiCM and JeeLib Native RF format is at
Following the decision to use the LowPowerLabs Library for the emonTx V4, no further work will be done on the JeeLib āNativeā format, and users should consider migrating to LPL. The history of emonLib, and why we want Continuous Monitoring The original emonTx was designed as a small, battery-powered device for monitoring whole-house power, which transmitted its data to the emonGLCD ā a liquid crystal display. As such, it was essential that it operated at minimum power and the ādiscrete sampleāā¦
emonPi_CM release ~Feb 23
This is the updated emonPi CM measurement firmware using LPL format
@PeteF
For the Jeelib Native details, see:
Following the decision to use the LowPowerLabs Library for the emonTx V4, no further work will be done on the JeeLib āNativeā format, and users should consider migrating to LPL. The history of emonLib, and why we want Continuous Monitoring The original emonTx was designed as a small, battery-powered device for monitoring whole-house power, which transmitted its data to the emonGLCD ā a liquid crystal display. As such, it was essential that it operated at minimum power and the ādiscrete sampleāā¦
But Iād linked to all that way back up the thread!
emonTx V3.4 EmonLibCM Continuous Monitoring V0.10 signifies that it was indeed a development version, Iām reasonably sure that itās release successor will be this:
EmonTxV34CM_rfm69n.zip (71.4 KB)
emonTH V3.2.4 was a prior version of this:
EmonTH_V2_rfm69n.zip (54.8 KB)
(It is listed in the āChangesā)
So whatās the deal with JeeLib Native? It was clearly offered as a choice at one time, but it seems to have been withdrawn.
I think I tried to explain this above too. Does nobody read what Iām writing?
Looking at the emonTx3.4 code for JeeLib Native from Robert, the setup greeting is:
from
emonTx V3.4 single phase: EmonTxV34CM_rfm69n.ino
t#ifdef DEBUG
Serial.print(F("emonTx V3CM Continuous Monitoring V")); Serial.write(firmware_version);
Serial.println(F("OpenEnergyMonitor.org"));
#else
Serial.println(F("describe:EmonTX3CM"));
#endif
where firmware_version = 1.0.0 where this is the first release
.
.
.
Looking at the emonTx3.4 code for JeeLib Classic and discrete sampling, the setup greeting is:
from
/*
emonTxV3.4 Discrete Sampling
If AC-AC adapter is detected assume emonTx is also powered from adapter (jumper shorted) and take Real Power Readings and disable sleep mode to keep load on power supply constant
If AC-AC addapter is not detected assume powering from battereis / USB 5V AC sample is not present so take Apparent Power Readings and enable sleep mode
Transmitt values via RFM69CW radio
-----------------------------------------
Part of the openenergymonitor.org project
Authors: Glyn Hudson & Trystan Lea
Builds upon JCW JeeLabs RF12 library and Arduino
Licence: GNU GPL V3
*/
/*Recommended node ID allocation
This file has been truncated. show original
Serial.begin(115200);
Serial.print("emonTx V3.4 Discrete Sampling V"); Serial.println(version*0.1);
Serial.println("OpenEnergyMonitor.org");
Serial.println(" ");
where the current version is 3.4, although there were previous versions starting at 1.1
.
.
.
Looking at the emonTx3.4 code for continuous monitoring and a choice of JeeLib Classic, JeeLib Native or LPL (by a #define statement) the setup greeting is:
from
/*
emonTxV3.4 Continuous Sampling
using EmonLibCM https://github.com/openenergymonitor/EmonLibCM
Authors: Robin Emley, Robert Wall, Trystan Lea
-----------------------------------------
Part of the openenergymonitor.org project
Licence: GNU GPL V3
Change Log:
v1.0: First release of EmonTxV3 Continuous Monitoring Firmware.
v1.1: First stable release, Set default node to 15
v1.2: Enable RF startup test sequence (factory testing), Enable DEBUG by default to support EmonESP
v1.3: Inclusion of watchdog
v1.4: Error checking to EEPROM config
v1.5: Faster RFM factory test
v1.6: Removed reliance on full jeelib for RFM, minimal rfm_send function implemented instead, thanks to Robert Wall
v1.7: Check radio channel is clear before transmit
This file has been truncated. show original
#ifdef DEBUG
Serial.print(F("emonTx V3.4 Continuous Monitoring V")); Serial.write(firmware_version);
Serial.println(F("OpenEnergyMonitor.org"));
#else
Serial.println(F("describe:EmonTX3CM"));
#endif
where the current version is 2.4.0, although there were previous versions stating at 1.0.0
Hope I have this correct as itās a bit mind boggling!
@PeteF
For your emonTx3 greeting you have:
emonTx V3.4 EmonLibCM Continuous Monitoring V0.10
which doesnāt exactly match any of the above, especially the V0.10
So I donāt know if weāre any further forward!
@PeteF
Thanks Robert, for confirming that PeteFās emonTx3 and emonTh are running Jeelib Native firmware.
I think I tried to explain this above too. Does nobody read what Iām writing?
Sorry @Robert.Wall, I did read it and understood that no further development would be done on JeeLib native, which is entirely acceptable. What I find less so is that my (I think) āresponsiblyā doing updates to emonSD and emonsms leads one (me) into a non-working system and an apparent cul-de-sac .
The emontx3CM V0.10 would indeed have been a development version, which I willingly tested for you. It worked perfectly, without any significant dropouts for - well - ever. I canāt remember the last time I had to reboot a tx3. I am certain that the data format didnāt change for the production version, so I saw no need to update it. It just worked.
But surely itās not the emontx3 or emonth thatās the problem? The ONLY thing I have essentially changed to a system that has been happily and reliably working for several years is the emonpi firmware. All I would like to do is have the opportunity to get it back.
I understand your point, but itās not something of my making. All of a sudden, there was an announcement that LPL library would be used. There was no prior discussion with me, no warning that the powers that be would not proceed with RFM69nTxLib, which I thought was not exactly, shall we say, āconsiderateā. Thatās why there wonāt be any further work on it, because apart from yourself and maybe one or two others (I have no means of getting numbers), several weeks of work in proving sketches for all the ālegacyā devices and writing it up was completely wasted. This doesnāt mean it wonāt work again in your emonPi.
In case you missed this too, hereās the write-up that accompanied the release of the emonPiCM sketch.
Write-up.pdf (99.2 KB)
The link for installing the sketch still āworksā, but itās a new version, not the original document, so I canāt vouch for itās usefulness or its accuracy.
You can possibly still find the sketch at the address in this write-up, or here:
emonPiFrontEndCM.zip (55.6 KB)
Incidentally, it would be almost trivial to convert RFM69nTxLib to have an option to use the LPL format in its transmitted messages, but it would not receive acknowledgements and therefore not re-transmit the message on failure to receive an acknowledgement.
This could be an option for you if you decide to go with LPL but not risk the penalty of reduced battery life when the RFM needs to go into receive mode and wait for the ACK message.
Ideally, the CM JeeLib Native update choice would be available in the setup/admin/upgrade section of emonCMS, but it isnāt.
And the Docs are missing a section on how to do it manually for the emonPi
An alternative might be to:
Install the Arduino Development System on a computer (I would go for the 1.x legacy version rather than the new 2.x version.
Install Robertsās source code from the zip file plus any library files that are needed.
Compile the source to make the hex file. Then
log in to the emonPi using SSH, transfer the compiled CM Jeelib Native firmware hex file onto the emonPi using scp (Linux), you can then use avrdude to program the atmega328 via ttyAMA0. This is a bit like how Setup/Admin/Firmware does it.
Although there are no detailed instructions how to do this for the emonPi in the Docs, there are some instructions that might be useful on github for the RFM2Pi (the old emonBase module).
# RFM69Pi V3
![](img/v3/RFM69Pi_RasPi.JPG)
Development of the RFM69Pi has been a team effort between Martin Harizanov, Glyn Hudson and Ken Boak.
The RFM69Pi enables the Raspberry Pi to receive data from other RFM69CW or RFM12B (backward compatible) wireless modules
The RFM69Pi V3 consists of an [RFM69CW wireless module](http://openenergymonitor.org/emon/buildingblocks/rfm69cw) and an ATmega328 microprocessor running the OptiBoot serial bootloader (modified for 8MHz internal oscillator) which is Arduino compatible. See [our blog post](http://openenergymonitor.blogspot.com/2014/12/introducing-rfm69cw.html) introducing the new RFM69CW module.
The ATmega328 runs a [modified](https://github.com/openenergymonitor/RFM2Pi/blob/master/firmware/RFM69CW_RF_Demo_ATmega328/RFM69CW_RF12_Demo_ATmega328/RFM69CW_RF12_Demo_ATmega328.ino) version of [JeeLabs's RF12Demo](https://github.com/jcw/jeelib/tree/master/examples/RF12/RF12demo).
Raw wireless packets are passed to the Pi via the Pi's internal serial port.
## Technical Overview
- ATmega328 based, has more memory and hardware serial support
- Runs on the internal 8Mhz oscillator (to save unnecessary components)
- SMT components.
- Lower profile to fit inside most Raspberry Pi enclosures
- The new RFM2Pi with ATmega328 allows programming directly from Raspberry Pi using avrdude (..and OptiBoot)
This file has been truncated. show original
The RFM2Pi is just an atmega328 processor plus a RFM69 RF module. This is similar to the atmega328 measurement board in an emonPi, but without the power measurement circuitry. The github section āUpgrading RFM69Pi Firmware Direct from the Piā gives a set of commands which you might be able to adapt for the emonPi:
# Install avrdude, and GPIO auto reset
sudo apt-get update
git clone https://github.com/openenergymonitor/avrdude-rpi.git ~/avrdude-rpi && ~/avrdude-rpi/install
# Grab latest firmware for RFM69Pi and perform the upload via serial
git clone https://github.com/openenergymonitor/RFM2Pi.git
cd RFM2Pi/firmware/RFM69CW_RF_Demo_ATmega328/
sudo service emonhub stop
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400 -U flash:w:RFM69CW_RF12_Demo_ATmega328.cpp.hex
sudo service emonhub start
The avrdude stuff may already be installed. Youād have to ignore the git clone part, put your hex file in a directory on the emonPi, and point the avrdude command to it instead of RFM69CW_RF12_Demo_ATmega328.cpp.hex
Ignore the parts about flashing the bootloader, as the atmega328 in your emonPi will already have one installed.
Iāve never tried this and I donāt know if it would work - no warranty!
Is this likely to work @TrystanLea ?
Ideally, the CM JeeLib Native update choice would be available in the setup/admin/upgrade section of emonCMS, but it isnāt.
And the Docs are missing a section on how to do it manually for the emonPi
Iāve already given my view on this.
(I would go for the 1.x legacy version rather than the new 2.x version.
I did all of emonLibDB on the Arduino IDE V2.2.1, I donāt know of a problem with it (but I always use my Notepad++ editor).
Compile the source to make the hex file. Then
Iāve sent all this privately to @PeteF, including my BASH script to do the transfers.
Many thanks to you both, Robert and Rupert for your help with this. Much appreciated.