emonTX serial connection pulse value

I have got a standard Shop emonTX connected to a PiZW via serial.

I am seeing a ‘pulse’ value on every cycle. No pulse sensor is connected. Is this correct?

2020-05-03 11:08:27,170 DEBUG    SerialTx   9 NEW FRAME : MSG:12,Vrms:245.55,P1:88,E1:3,pulse:1
2020-05-03 11:08:27,174 DEBUG    SerialTx   9 Timestamp : 1588500507.169939
2020-05-03 11:08:27,176 DEBUG    SerialTx   9 From Node : 0
2020-05-03 11:08:27,180 DEBUG    SerialTx   9    Values : [12, 245.55, 88, 3, 1]
2020-05-03 11:08:27,186 DEBUG    SerialTx   9 Sent to channel(start)' : ToEmonCMS
2020-05-03 11:08:27,189 DEBUG    SerialTx   9 Sent to channel(end)' : ToEmonCMS
2020-05-03 11:08:27,470 DEBUG    MQTT       Publishing: emon/0/MSG 12
2020-05-03 11:08:27,477 DEBUG    MQTT       Publishing: emon/0/Vrms 245.55
2020-05-03 11:08:27,482 DEBUG    MQTT       Publishing: emon/0/P1 88
2020-05-03 11:08:27,487 DEBUG    MQTT       Publishing: emon/0/E1 3
2020-05-03 11:08:27,493 DEBUG    MQTT       Publishing: emon/0/pulse 1
2020-05-03 11:08:27,499 INFO     MQTT       Publishing: emonhub/rx/0/values 12,245.55,88,3,1

Which sketch is in your emonTx? Is it the default, if so when did you get it?

If it’s using emonLibCM, then the pulse count is as documented:

unsigned long EmonLibCM_getPulseCount( )

Returns the accumulated count of pulses since the library was initialised, provided that
pulse counting has been enabled.

The earlier DS sketch worked similarly (but you’d only know by looking at the source code - this is done just prior to reporting the values every 10 s or so. pulseCount is the count since the last report):

  if (pulseCount)                                                       // if the ISR has counted some pulses, update the total count
  {
	cli();
	emontx.pulseCount += pulseCount;
	pulseCount = 0;
	sei();
  }

(If you’ve picked up the “debug” print statements, it’s done after those, so it’s one report late.)

Couple of months ago.

so if no pulse, it should be 0?

It looks as if it picked up a spurious one somewhere - if it’s not incrementing. If it is, you have a pick-up/interference problem.
If you’re not using the pulse input, disable it in the sketch.
I’ve just fired up the “max” demo sketch and that reports 0 pulses, as does Trystan’s “src.ino” (aka ‘emonTxV3.4 Continuous Sampling’) sketch.

emontx.pulseCount is the “all-time” accumulated count. That should be the value you’re sending to your PiZW.

Solved it. I was being lazy and not powering down the TX but just plugging the Pi in. If I power down the TX and restart it (and therefore the Pi), Pulse is zero.