Newbie problem: Couldn't found my note on Emoncms

I orderd the RaspberryPI (Model B+) with preloaded SD card and and the emonTx V3 with 433Mhz and default settings. I made all steps below "Setting up the RaspberryPI" from that link but I cannot find my note on Emoncms.
There are some settings not clear:
1. On Emoncms I got two API-Keys (read and write), which one must I use?
2. On the Node configuration I can  selected the EmonTx V3 (Continuous sampling with Wh totals) and also the  EmonTx V3 RFM12B DiscreteSampling, but which one is more stabil?
Are there more modifications what I must adjust?

Regards

Christian

 

 

 

 

 

 

Robert Wall's picture

Re: Newbie problem: Couldn't found my note on Emoncms

1. The two keys are "read only" and "read & write". If you are reading from emonCMS, you only need the read only key. If you are sending data to emonCMS from the emonTx, as you are, you need the "read & write" key.
2. Both sketches are stable. You use whichever one suits your purpose best. If you have a rapidly switching load - for example an induction hob (cooker) - then I advise the "continuous" sketch.
Note your emonTx comes with the "discrete sampling" sketch loaded. You need a programmer to change it.

For best accuracy, you should calibrate the sensors to remove the inaccuracy created by manufacturing tolerances. You need the programmer for that too (ideally), though you can insert a correction factor in the maths in emonCMS, if you prefer.

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

So I have used the write  API key and I have selected the discrete sampling, but on Emoncms the note is always inactive. Are there some other modification what I must make?

pb66's picture

Re: Newbie problem: Couldn't found my note on Emoncms

What info can you can get from the emonhub.log?

 tail -f /var/log/emonhub/emonhub.log

to display log entries as they happen or

cat /var/log/emonhub/emonhub.log

to view the complete logfile. You will get more info if you set loglevel = DEBUG in emonhub.conf.

Paul

 

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

Now I set the debuging mode, see here:

pi@raspberrypi ~ $ cat /var/log/emonhub/emonhub.log
1970-01-01 00:00:23,177 INFO EmonHub Pre-Release Development Version (rc1.0)
1970-01-01 00:00:23,190 INFO Opening hub...
1970-01-01 00:00:23,193 INFO Logging level set to DEBUG
1970-01-01 00:00:23,195 INFO Creating EmonHubEmoncmsReporter 'emonCMS'
1970-01-01 00:00:23,206 INFO Set up reporter 'emonCMS' (buffer: memory | size: 1                                        000)
1970-01-01 00:00:23,222 INFO Creating EmonHubJeeInterfacer 'RFM2Pi'
1970-01-01 00:00:23,225 DEBUG Opening serial port: /dev/ttyAMA0
1970-01-01 00:00:23,228 INFO Opened serial port: /dev/ttyAMA0 9600 bits/s
1970-01-01 00:00:23,236 DEBUG Setting RFM2Pi frequency: 433 (4b)
1970-01-01 00:00:24,246 DEBUG Setting RFM2Pi group: 210 (210g)
1970-01-01 00:00:25,250 DEBUG Setting RFM2Pi baseid: 15 (15i)
1970-01-01 00:00:26,272 DEBUG 1 NEW FRAME : 26.27 > 4b
1970-01-01 00:00:26,274 WARNING 1 Discarded RX frame 'non-numerical content' : [                                        '>\x00', '4b']
1970-01-01 00:00:26,478 DEBUG 2 NEW FRAME : 26.48
1970-01-01 00:00:26,480 INFO 2 Ignoring frame consisting of SOH character
1970-01-01 00:00:26,684 DEBUG 3 NEW FRAME : 26.68 > 210g
1970-01-01 00:00:26,687 WARNING 3 Discard RX frame 'information' : ['>', '210g']
1970-01-01 00:00:26,890 DEBUG 4 NEW FRAME : 26.89
1970-01-01 00:00:26,893 INFO 4 Ignoring frame consisting of SOH character
1970-01-01 00:00:27,102 DEBUG 5 NEW FRAME : 27.1  10 0 0 0 0 0 0 0 0 167 94 0 0
1970-01-01 00:00:27,106 WARNING 5 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
1970-01-01 00:00:27,323 DEBUG 6 NEW FRAME : 27.32 > 15i
1970-01-01 00:00:27,325 WARNING 6 Discard RX frame 'information' : ['>', '15i']
1970-01-01 00:00:27,529 DEBUG 7 NEW FRAME : 27.53
1970-01-01 00:00:27,531 INFO 7 Ignoring frame consisting of SOH character
2015-02-13 08:56:43,798 DEBUG 8 NEW FRAME : 1423817803.8  10 0 0 0 0 0 0 0 0 133                                         94 0 0
2015-02-13 08:56:43,802 WARNING 8 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:56:54,400 DEBUG 9 NEW FRAME : 1423817814.4  10 0 0 0 0 0 0 0 0 142                                         94 0 0
2015-02-13 08:56:54,404 WARNING 9 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:05,178 DEBUG 10 NEW FRAME : 1423817825.18  10 0 0 0 0 0 0 0 0 1                                        60 94 0 0
2015-02-13 08:57:05,192 WARNING 10 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:15,787 DEBUG 11 NEW FRAME : 1423817835.79  10 0 0 0 0 0 0 0 0 1                                        42 94 0 0
2015-02-13 08:57:15,791 WARNING 11 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:26,381 DEBUG 12 NEW FRAME : 1423817846.38  10 0 0 0 0 0 0 0 0 1                                        31 94 0 0
2015-02-13 08:57:26,385 WARNING 12 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:36,956 DEBUG 13 NEW FRAME : 1423817856.96  10 0 0 0 0 0 0 0 0 1                                        32 94 0 0
2015-02-13 08:57:36,960 WARNING 13 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:47,746 DEBUG 14 NEW FRAME : 1423817867.75  10 0 0 0 0 0 0 0 0 1                                        23 94 0 0
2015-02-13 08:57:47,750 WARNING 14 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
2015-02-13 08:57:58,321 DEBUG 15 NEW FRAME : 1423817878.32  10 0 0 0 0 0 0 0 0 1                                        23 94 0 0
2015-02-13 08:57:58,325 WARNING 15 RX data length: 12 is not valid for datacodes                                         ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
pi@raspberrypi ~ $

 

 

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

Here is the logfile, I hope it will help us to find the failure:

cat /var/log/emonhub/emonhub.log

1970-01-01 00:00:22,526 INFO EmonHub Pre-Release Development Version (rc1.0)
1970-01-01 00:00:22,529 INFO Opening hub...
1970-01-01 00:00:22,532 INFO Logging level set to DEBUG
1970-01-01 00:00:22,534 INFO Creating EmonHubEmoncmsReporter 'emonCMS'
1970-01-01 00:00:22,540 INFO Set up reporter 'emonCMS' (buffer: memory | size: 1000)
1970-01-01 00:00:22,544 INFO Creating EmonHubJeeInterfacer 'RFM2Pi'
1970-01-01 00:00:22,547 DEBUG Opening serial port: /dev/ttyAMA0
1970-01-01 00:00:22,552 INFO Opened serial port: /dev/ttyAMA0 9600 bits/s
1970-01-01 00:00:22,554 DEBUG Setting RFM2Pi frequency: 433 (4b)
1970-01-01 00:00:23,558 DEBUG Setting RFM2Pi group: 210 (210g)
1970-01-01 00:00:24,562 DEBUG Setting RFM2Pi baseid: 15 (15i)
1970-01-01 00:00:25,582 DEBUG 1 NEW FRAME : 25.58 > 84b
1970-01-01 00:00:25,585 WARNING 1 Discarded RX frame 'non-numerical content' : ['>\x00', '84b']
1970-01-01 00:00:25,789 DEBUG 2 NEW FRAME : 25.79
1970-01-01 00:00:25,791 INFO 2 Ignoring frame consisting of SOH character
1970-01-01 00:00:25,995 DEBUG 3 NEW FRAME : 26.0 > 210g
1970-01-01 00:00:25,998 WARNING 3 Discard RX frame 'information' : ['>', '210g']
1970-01-01 00:00:26,201 DEBUG 4 NEW FRAME : 26.2
1970-01-01 00:00:26,204 INFO 4 Ignoring frame consisting of SOH character
1970-01-01 00:00:26,408 DEBUG 5 NEW FRAME : 26.41 > 15i
1970-01-01 00:00:26,410 WARNING 5 Discard RX frame 'information' : ['>', '15i']
1970-01-01 00:00:26,626 DEBUG 6 NEW FRAME : 26.63
1970-01-01 00:00:26,628 INFO 6 Ignoring frame consisting of SOH character
1970-01-01 00:00:26,839 DEBUG 7 NEW FRAME : 26.84  10 0 0 0 0 0 0 0 0 19 95 0 0
1970-01-01 00:00:26,845 WARNING 7 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
1970-01-01 00:00:36,034 DEBUG 8 NEW FRAME : 36.03  10 0 0 0 0 0 0 0 0 21 95 0 0
1970-01-01 00:00:36,038 WARNING 8 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
1970-01-01 00:00:46,646 DEBUG 9 NEW FRAME : 46.65  10 0 0 0 0 0 0 0 0 20 95 0 0
1970-01-01 00:00:46,651 WARNING 9 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
1970-01-01 00:00:57,449 DEBUG 10 NEW FRAME : 57.45  10 0 0 0 0 0 0 0 0 38 95 0 0
1970-01-01 00:00:57,453 WARNING 10 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']
....
2015-02-13 13:27:23,808 DEBUG 41 NEW FRAME : 1423834043.81  10 0 0 0 0 0 0 0 0 247 94 0 0
2015-02-13 13:27:23,812 WARNING 41 RX data length: 12 is not valid for datacodes ['L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l']

pb66's picture

Re: Newbie problem: Couldn't found my note on Emoncms

Firstly you have fallen prey to the "1970" bug, you can install ntp-backup to avoid any future occurrences with 

    rpi-rw
    git clone https://github.com/emonhub/ntp-backup.git ~/ntp-backup && ~/ntp-backup/install

The ​last couple of lines tells us the time had corrected by then but the size of your received payload doesn't match the "datacodes" declared in the nodes section of emonhub.conf. The payload is 12bytes and the declared 'L', 'h', 'h', 'h', 'h', 'l', 'l', 'l', 'l' would need 28 bytes (4 x 2byte-ints and 5 x 4byte-longs)

Which sketch do you have installed ?

if you are using the pre-loaded sketch the payload is just 6 ints (12 bytes), If a Payload consists of just byte-pair ints (2 bytes each, so any even number of bytes) you do not need to declare the nodes structure, only if you change the sketch and use other datatypes do you need to inform emonhub you have done so by declaring the datacodes in the nodes section of the conf.

Paul
 

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

Yes I am using the preinstalled configuration and I made only small modifications, see here:
Now I made the update and changed the datalenght to "datacodes = h, h, h, h, h, h" but the node is also invisible on emoncms.

Please have a look at the attached log file.

Christian

 

 

[Multiple copies of several posts have been deleted. Please observe the message when your post is held for moderation and be patient. Moderator (RW)]

pb66's picture

Re: Newbie problem: Couldn't found my note on Emoncms

Looking at the log everything seems in order, the date is correct, the payloads are being received correctly, the data is being forwarded to emoncms and emoncms is confirming successful receipt.

The ct values however are all zero, exactly 0 so I suspect either you don't have any cts connected (or at least ct1 is empty) or you have not restarted emonTx since connecting the cts.

Is the voltage value varying at all in emonCMS? 24212 is 242.12vac and we can see it varies in emonHub.

​What can you see as the last update time in emonCMS ? if data wasn't being recieved you would see "inactive" beside each value instead of a time interval.

Paul

PS can you also confirm what rfm2pi you are running and what firmware is installed (or when you obtained it)? there is a couple of odd "config failed" error messages from the rfm2pi in the emonhub log, but they may just be an odd one of anomaly as the rfm2pi must be configured to be receiving data

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

With the new datacode settings I can see data on Emoncms and on my first tests there was not current sensor connected.

On the folder inputs the last update value is now 3 up to 12 sec , so the data transfer is working :)
But if I look on the folder nodes it shows always inactive?

To the question what rfm2pi is running and what firmware, sorry I don't know exacly. Please tell me the command, then I can have a look.

pb66's picture

Re: Newbie problem: Couldn't found my note on Emoncms

That's good news !

3 to 12 secs is fine so the inputs are updating ok, The "nodes" inputs are an alternative to the standard input module, currently, from emonHub you will only see the inputs in "inputs" so that is not a fault.

The details on thr RFM2Pi are not so important now if you are up and running,

Paul

 

ChristianB's picture

Re: Newbie problem: Couldn't found my note on Emoncms

The Emoncms is working fine, thanks for your help :)

Comment viewing options

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