Need help to get EmonTx to talk thru hub to emoncms.org

I have purchased the following

Raspberry Pi B+ - I have installed the ready to go image "emonSD-13-08-14.img" and made the recommended changes to the config file for /boot/emonhub.conf

RFM12Pi - installed onto the Pi

EmonTx V3 + sensors - installed with 4 sensors & connected an AC supply as well as DC power and I have removed the jumper J2 - there are no batteries installed on the board

I have read as many parts of the forum that I can understand and have been able to find the following error in my emonhub log

2014-11-29 01:55:05,892 WARNING 4053 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2014-11-29 01:55:16,884 DEBUG 4054 NEW FRAME : 1417226116.88  10 233 249 35 253 34 3 0 0 197 100 0 0

In summary the problem is that the system does not talk to emoncms.org and display data

Appreciate an help that people can give to point me in the right direction - I only have very limited knowledge in linux

Thanks John

pb66's picture

Re: Need help to get EmonTx to talk thru hub to emoncms.org

Hi John,

The error messages is indicating a payload containing 12 bytes of data was received from node 10, which emonHub didn't know what to do with as it was told to expect a payload in the form of L, h, h, h, h,  l, l, l, l  which requires 28 bytes, so it discards it.

You haven't mentioned changing the sketch on the emonTx so I assume its using the pre-loaded default sketch which has a payload of 6 integers, this would tie in with the 12 bytes of "data" received (excluding node id).

The expected data format is "pairs of bytes as integers" by default and would decode the default sketch without specifically declaring the nodes payload format in the conf, it is only necessary to declare the "datacodes" if straying from the default. If you were to specifically declare the default sketches "datacodes" it would be h, h, h, h, h, h which would specifically define a 12 byte payload rather than the default "any even number"  to accept a undeclared number of "pairs of bytes as integers".

I short you need to either remove or correct the "datacodes" setting in emonhub.conf's [nodes] [[10]] section unless you change the sketch on the emonTx if you want specifically that data payload.

Paul

 

johnkwhite's picture

Re: Need help to get EmonTx to talk thru hub to emoncms.org

Hi Paul

Thanks for your help. Apologies for delay, I have never asked used a forum before and expected it was going to email me when I received a reply. It was lucky I checked just in case today living in hope.

I have changed the datacodes as suggested and instantly it started feeding info to the emoncms.org. the reason I had used the other format was that it was in some setup instructions to do so.

Are you able to tell me what "L"and "l" and "h" stand for ? And what the other datacode set was trying to achieve ?

If you have time, a couple of Qs would be

1.  how do I control the feed sensor info as some are reading negative and some positive yet all circuits being monitored are both using power ?? 

2. I purchased a USB to UART device that plugs into the emonTx - I have tried using Ardino but I have been unable to see how to connect to the config file on the device to make any changes or for that matter how to upload a new config file - Can you direct me to a blog or forum to learn how to do this pls ?

Thanks again for your help

John

Robert Wall's picture

Re: Need help to get EmonTx to talk thru hub to emoncms.org

First, the forum doesn't email you. It's a long-standing problem that so far Trystan has been unable to rectify.

Second, what is your "feed sensor" - the emonTx that you mention? If you're using the ac adapter, then you will be calculating real power and the relative phase of current and voltage determines whether the power is positive (conventionally import) or negative. The easiest cure is to flip the CT on its cable.

Third, you can't "connect to the config file on the device". All you can do is load a new sketch into it. You need to get the default sketch (which was loaded before it was despatched to you) from GitHub (the Wiki has a link), edit that and load it, automatically overwriting the one that's in the emonTx. The instructions for getting started are here: http://openenergymonitor.org/emon/buildingblocks/setting-up-the-arduino-...

I think this is current info for the data codes: http://openenergymonitor.org/emon/node/5289

johnkwhite's picture

Re: Need help to get EmonTx to talk thru hub to emoncms.org

Hi Robert

Thanks, I will try flipping the CT Sensor around and try to figure that out the links you have sent

John

Comment viewing options

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