Updated emonhub and now have 33 inputs from a sketch sending 21

I’ve just setup a new rpi3b with the emonSD-30Oct18.img and am having trouble with the data emonhub is sending.
My setup until last weekend had the same sketch on an emontxv3 with a rpi2b running emonhub v1.0 or 1.2 running on a 2015 SD image posting 21 inputs to emoncms.org reliably since 2014/15.
The new setup is adding in an extra 12 inputs to the node making the process list out of step with the data.
In the screenshot below data for inputs 32 and 33 should be at input 20 and 21 positions.

Any pointers on how to fix this would be much appreciated!!

It looks like node 10 is no longer being decoded as defined in the emonhub.conf you are showing us. The extra 12 values is the 12 4byte longs now being seen as 24 2byte ints.

Is there more than one node 10 defined in the conf or more than one copy of the emonhub.conf?

There is only one emonhub.conf in home/pi/data and it only has one node 10.

emonhub.conf.txt (3.7 KB)

I remember being told back in 2014 that I had too many inputs on node 10 but as it worked ok I didn’t try to reduce the number.

That’s unrelated, possibly something to do with potential rf transmission issues?

Can you ssh into the RPi and run this command ps -ef | grep emonhub, it will confirm what emonhub.conf is being used by the service, eg below we see emonhub was started with --config-file /etc/emonhub/emonhub.conf.

pi@energyPi ~ $ ps -ef | grep emonhub
pi         571   550  0 22:40 pts/1    00:00:00 grep --color=auto emonhub
emonhub   5939     1 15 Jan18 ?        2-18:56:06 python /opt/emonhub/src/emonhub.py --logfile /var/log/emonhub/emonhub.log --config-file /etc/emonhub/emonhub.conf
pi@energyPi ~ $

could you also post some emonhub.log? show a period of time that includes a few node 10 payloads being processed.

ps -ef | grep emonhub shows the following:

and the emonhub.log is as follows:

emonhub.log.txt (12.3 KB)

So it is using the right conf, the conf appears to have the correct datacodes and the log shows it processing the 66byte payload. That “66bytes” is why the comments were made, 66bytes is the absolute maximum you can send with JeeLib, I thought it was less for RFM69CW’s but it appears all 66bytes are landing at emonhub so it’s not that AFAICT.

So something is stopping emonhub from correctly decoding the 66yte payload using the datacodes defined in the conf. The only thing I see as “odd” is the trailing comma on the datacodes.

[[10]]
#	datacode = h
	datacodes = h, h, h, h, l, l, l, l, l, l, l, l, l, h, h, l, l, h, l, h, h,

it’s a bit of a long shot but could that be fudging the template? could you try losing that trailing comma like so

[[10]]
#	datacode = h
	datacodes = h, h, h, h, l, l, l, l, l, l, l, l, l, h, h, l, l, h, l, h, h

I removed the trailing comma but it made no difference.
I still have the working 2015 SD card at home so will check it out at the weekend when I get home and see what differences if any there are in the conf files.

Aha! The penny just dropped!

it should have another sub-section [[[rx]]] like so

[[10]]
    [[[rx]]]
        datacodes = h, h, h, h, l, l, l, l, l, l, l, l, l, h, h, l, l, h, l, h, h

see emonhub/emonhub.conf at emon-pi · openenergymonitor/emonhub · GitHub for an example.

Yeeah that sorted it thanks Paul.

I had cut and pasted the [[10]] datacodes =… from the old emonhub.conf which didn’t have the [[[rx]]] in it.