emonhub warning: RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']

Hi,

I get following warnings in my emonhub.log:

2015-01-01 23:42:30,136 DEBUG 287 NEW FRAME : 1420152150.14  10 0 0 0 0 0 0 0 0 229 96 0 0
2015-01-01 23:42:30,144 WARNING 287 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:42:40,840 DEBUG 288 NEW FRAME : 1420152160.84  10 0 0 0 0 0 0 0 0 24 97 0 0
2015-01-01 23:42:40,844 WARNING 288 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:42:51,568 DEBUG 289 NEW FRAME : 1420152171.57  10 0 0 0 0 0 0 0 0 26 97 0 0
2015-01-01 23:42:51,576 WARNING 289 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:43:02,176 DEBUG 290 NEW FRAME : 1420152182.18  10 0 0 0 0 0 0 0 0 221 96 0 0
2015-01-01 23:43:02,181 WARNING 290 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:43:12,857 DEBUG 291 NEW FRAME : 1420152192.86  10 0 0 0 0 0 0 0 0 218 96 0 0
2015-01-01 23:43:12,862 WARNING 291 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:43:23,532 DEBUG 292 NEW FRAME : 1420152203.53  10 0 0 0 0 0 0 0 0 213 96 0 0
2015-01-01 23:43:23,536 WARNING 292 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']
2015-01-01 23:43:34,023 DEBUG 293 NEW FRAME : 1420152214.02  10 0 0 0 0 0 0 0 0 227 96 0 0
2015-01-01 23:43:34,027 WARNING 293 RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']

I think that my emonhub.conf is not completely correct.

...

#######################################################################
#######################          Nodes          #######################
#######################################################################
[nodes]

# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[10]]
        datacode = h
        datacodes = l, h, h, h,
(END)

Note that I am using emonTxV3 and RFM12Pi_433 RFM12Pi  (both bought a couple of weeks ago).

many thanks for feedback

jan.

PS it is normal that in above log output most data is 0 because I didn't connect the split core current transformers to any cable.  I just plugged it into the emonTx.

 

 

 

 

Robert Wall's picture

Re: emonhub warning: RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']

"l, h, h, h" means your emonHub is expecting a 4-byte long, followed by 3 2-byte integers. Which sketch are you using in your emonTx? If it is the default one, that sends 6 2-byte integers: power1, power2, power3, power4, Vrms, temp. (look at the PayloadTX structure in the sketch).

"229 96" decodes to 248.05 (= (96 x 256 + 229) / 100) so it looks to me as if that is the voltage, and therefore you want "h, h, h, h, h, h" - or better still, don't set it as the default is to accept an unlimited string of signed integers (h).

jvda's picture

Re: emonhub warning: RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']

Thanks Robert for the fast response.

It works now as you can see:

2015-01-02 00:39:52,115 DEBUG 1 NEW FRAME : 1420155592.11  10 0 0 0 0 0 0 0 0 238 96 0 0
2015-01-02 00:39:52,120 DEBUG 1 Timestamp : 1420155592.11
2015-01-02 00:39:52,126 DEBUG 1      Node : 10
2015-01-02 00:39:52,129 DEBUG 1    Values : [0, 0, 0, 0, 24814, 0]
2015-01-02 00:39:52,176 DEBUG 1 Append to 'emonCMS' buffer => time: 1420155592.11, data: [10, 0, 0, 0, 0, 24814, 0], ref: 1
2015-01-02 00:39:52,281 INFO emonCMS sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1420155592.11,10,0,0,0,0,24814,0]]&sentat=1420155592
2015-01-02 00:39:54,888 DEBUG emonCMS acknowledged receipt with 'ok' from http://emoncms.org
2015-01-02 00:40:02,748 DEBUG 2 NEW FRAME : 1420155602.75  10 0 0 0 0 0 0 0 0 249 96 0 0
2015-01-02 00:40:02,757 DEBUG 2 Timestamp : 1420155602.75
2015-01-02 00:40:02,759 DEBUG 2      Node : 10
2015-01-02 00:40:02,762 DEBUG 2    Values : [0, 0, 0, 0, 24825, 0]
2015-01-02 00:40:02,831 DEBUG 2 Append to 'emonCMS' buffer => time: 1420155602.75, data: [10, 0, 0, 0, 0, 24825, 0], ref: 2
2015-01-02 00:40:02,938 INFO emonCMS sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1420155602.75,10,0,0,0,0,24825,0]]&sentat=1420155602
2015-01-02 00:40:11,430 DEBUG emonCMS acknowledged receipt with 'ok' from http://emoncms.org

 

Like you suggested I have commented out the datacodes section.  Now my emonhub.conf looks like:

#######################################################################
#######################          Nodes          #######################
#######################################################################
[nodes]

# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[10]]
        datacode = h
#       datacodes = l, h, h, h,

(END)

many thanks
jan

pb66's picture

Re: emonhub warning: RX data length: 12 is not valid for datacodes ['l', 'h', 'h', 'h']

This "nodes" section in emonhub.conf was intended as just a example template, it isn't mandatory unless you are using variable types other than signed integers (the OEM standard datatype).

###############################################################
#######################         Nodes         #######################
###############################################################
[nodes]
# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[99]]
        datacode = h
        datacodes = l, h, h, h,

emonHub will assume all non-declared datatypes arriving via RFM to be "h" (signed ints), although it does no harm, specifying "datacode = h" for node 10 just overrides the "RFM2Pi interfacer" default value of "h" with a node specific value of "h" so is effectively redundant.

The original example using node 99 was chosen as node 99 is out of range and wouldn't cause unexpected results. unless doing something with "other" datatypes the nodes section in emonhub.conf can be ignored.

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.