Sorry for lack of engagement, I have been and still am travelling away. @TrystanLea created the emonESP emonTx example as a proof of concept. The use of continuous sampling code is still in testing. I will let Trystan comment on this.
I have just pushed an updated emonTx V3 discrete sampling firmware (V2.4) to the emontx-ds-emonesp
dev branch to provide a version of the standard emonTx V3 discrete firmware that serial outputs serial string pairs to work with emonESP e.g:
ct1:xxx,ct2:xxx
etc…
This includes vrms and all temperature readings:
+ if (debug==1) {
+
+ Serial.print("ct1:"); Serial.print(emontx.power1);
+ Serial.print(",ct2:"); Serial.print(emontx.power2);
+ Serial.print(",ct3:"); Serial.print(emontx.power3);
+ Serial.print(",ct4:"); Serial.print(emontx.power4);
+ Serial.print(",vrms:"); Serial.print(emontx.Vrms);
+ Serial.print(",pulse:"); Serial.print(emontx.pulseCount);
+ if (DS18B20_STATUS==1){
+ for(byte j=0;j<numSensors;j++){
+ Serial.print(",t"); Serial.print(j); Serial.print(":");
+ Serial.print(emontx.temp[j]);
+ }
+ }
+ delay(50);
+ }
I propose standardising on this serial output format for all units e.g. emonTH etc.