New Nodes module / what do I do wrong

In emonhub.conf:

[[5]]
    nodename = emonTx_3.2_1
    firmware = V2_3_emonTxV3_4_DiscreteSampling / niet zeker
    hardware = emonTx_(NodeID_DIP_Switch1:OFF)
    [[[rx]]]
       names = power1,power2,power3,power4,Vrms,temp1,temp2,temp3,temp4,temp5,temp6,pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
       units = W,W,W,W,V,C,C,C,C,C,C,p

In emonhub's log file (node is not getting updated with this config):

2015-12-23 21:03:25,102 DEBUG    RFM2Pi     512 NEW FRAME : OK 5 0 0 0 0 0 0 0 0 0 0 190 0 190 0 0 0 0 0 0 0 0 0 0 0
2015-12-23 21:03:25,109 WARNING  RFM2Pi     512 RX data length: 24 is not valid for datacodes ['h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'L']

2015-12-23 21:08:44,366 DEBUG    RFM2Pi     594 NEW FRAME : OK 5 0 0 0 0 0 0 0 0 0 0 190 0 190 0 0 0 0 0 0 0 0 0 0 0
2015-12-23 21:08:44,374 WARNING  RFM2Pi     594 RX data length: 24 is not valid for datacodes ['h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'h', 'L']

When removing this from emonhub.conf the data gets forwarded to my emonCMS account, see attachment.

Any ideas?

pb66's picture

Re: New Nodes module / what do I do wrong

The logs highlight a difference between the expected and actual payload being received.

Your node is defined as 12 values, the first 11 are signed 2 byte ints and the 12th a unsigned 4 byte long (=26 bytes).

the received payload is only 24 bytes, so emonhub cannot map the data. the payload needs to be increased by 2 bytes in the sketch, or the definition adjusted in emonhub.conf. 

The reason it passes the data when the definition is removed is it is not mandatory to define the nodes and the default datacode is h (signed ints)  so it will assume the 24bytes received to be 12 signed ints unless it is told otherwise.

Things to check are that the 12th (pulse) value is defined as a long in the sketch and possibly if the number of temp sensors is calculated is there 6 or only 5?

Paul

PS just seen the title again "nodes module" did you mean "nodes section" in emonhub.conf? your image is of the inputs page and the "nodes module" would not of displayed the data without a "nodes section" entry in emonhub.conf as it insists on full details of every node, just checking in case I got the wrong idea.

fluppie007's picture

Re: New Nodes module / what do I do wrong

I wanted the nodes section of emoncms to be filled by default with the right parsing 0.01 or 0.1 etc. So I tried to modify the supplied node configuration in emonhub.conf to suit my needs. After saving the mods, emoncms stopped transferring the data to emoncms.org and was also not putting the data on the MQTT bus.

I attached the previous screenshot to show how my unparsed/unconfigured data gets sent to emoncms.org

Because maybe it's a stupid typo or misinterpretation of the predefined node configs in emonhub.conf

fluppie007's picture

Re: New Nodes module / what do I do wrong

Changing the L to h does the trick... Didn't know what it really meant...

pb66's picture

Re: New Nodes module / what do I do wrong

As long as the datacodes in emonhub.conf match the sketches payload definition precisely you should be ok.

Paul

Comment viewing options

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