[SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Hi

I have a monitoring & multizone control system running on RPi (emoncms, emonhub, scheduler) which is all working fine but as it is now in full control of our heating system I would like to leave it alone for a bit!

I am trying to set up a system on my laptop, using a Jeelink as a radio, for  experimentation but I am having difficulty getting emonhub to talk to the jeelink.

The Laptop has Ubuntu 14.04 with emoncms 8.3.6 installed (Rpi Module removed) & Emonhub

The Jeelink has RF12_demo sketch (https://github.com/jcw/jeelib/tree/master/examples/RF12/RF12demo) set to 9600 baud, it sits on /dev/ttyUSB0 which has been set in emonhub.conf

Packetgen in emoncms on the laptop has been configured to mimic the one running on the Pi but the node in emonhub.conf has been set to 16 to avoid conflict

Emonhub seems to run OK on the laptop and packetgen is successfully broadcast but I cannot get it to receive properly:

richard@richard-Aspire-ES1-512:/var/www/html/emoncms/Modules/scheduler$ sudo service emonhub restart
[sudo] password for richard:
 * Restarting OpenEnergyMonitor emonHub emonhub                                                                                          [ OK ]
richard@richard-Aspire-ES1-512:/var/www/html/emoncms/Modules/scheduler$ tail -f /var/log/emonhub/emonhub.log
2015-01-12 16:25:37,143 DEBUG 4 NEW FRAME : 1421079937.14  P i16 g210 @ 433 MHz q1
2015-01-12 16:25:37,144 WARNING 4 Discarded RX frame 'non-numerical content' : ['P', 'i16', 'g210', '@', '433', 'MHz', 'q1']
2015-01-12 16:25:37,346 DEBUG 5 NEW FRAME : 1421079937.35 > 16i
2015-01-12 16:25:37,346 WARNING 5 Discard RX frame 'information' : ['>', '16i']
2015-01-12 16:25:37,549 DEBUG 6 NEW FRAME : 1421079937.55  P i16 g210 @ 433 MHz q1
2015-01-12 16:25:37,549 WARNING 6 Discarded RX frame 'non-numerical content' : ['P', 'i16', 'g210', '@', '433', 'MHz', 'q1']
2015-01-12 16:25:37,756 DEBUG 7 NEW FRAME : 1421079937.76 OK 1 0 0 0 0 0 0 0 0 0 0 244 1 8 7 114 7 8 7 235 17 172 15 2 8 4 17 22 14 103 15
2015-01-12 16:25:37,757 WARNING 7 Discarded RX frame 'non-numerical content' : ['OK', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '244', '1', '8', '7', '114', '7', '8', '7', '235', '17', '172', '15', '2', '8', '4', '17', '22', '14', '103', '15']
2015-01-12 16:25:37,966 DEBUG 8 NEW FRAME : 1421079937.97 OK 15 0 16 25 33 1 0 1 1 0 0 1 0 0 0 144 1 20 0 1 7 7 50 6 150 6 108 7 1 244 1 0 244 1 0 244 1 0 244 1 0 108 7 1 244 1 0 244 1 0 169 6
2015-01-12 16:25:37,966 WARNING 8 Discarded RX frame 'non-numerical content' : ['OK', '15', '0', '16', '25', '33', '1', '0', '1', '1', '0', '0', '1', '0', '0', '0', '144', '1', '20', '0', '1', '7', '7', '50', '6', '150', '6', '108', '7', '1', '244', '1', '0', '244', '1', '0', '244', '1', '0', '244', '1', '0', '108', '7', '1', '244', '1', '0', '244', '1', '0', '169', '6']
2015-01-12 16:25:40,993 DEBUG 9 NEW FRAME : 1421079940.99 OK 15 0 16 25 39 1 0 1 1 0 0 1 0 0 0 144 1 20 0 1 7 7 50 6 150 6 108 7 1 244 1 0 244 1 0 244 1 0 244 1 0 108 7 1 244 1 0 244 1 0 175 6
2015-01-12 16:25:40,994 WARNING 9 Discarded RX frame 'non-numerical content' : ['OK', '15', '0', '16', '25', '39', '1', '0', '1', '1', '0', '0', '1', '0', '0', '0', '144', '1', '20', '0', '1', '7', '7', '50', '6', '150', '6', '108', '7', '1', '244', '1', '0', '244', '1', '0', '244', '1', '0', '244', '1', '0', '108', '7', '1', '244', '1', '0', '244', '1', '0', '175', '6']

...

2015-01-12 16:29:19,235 DEBUG RFM2Pi broadcasting control packet 0,16,29,19,0,0,0,0,0,0,0,0,0,0,144,1,20,0,1,0,0,0,0,0,0,244,1,0,244,1,0,244,1,0,244,1,0,244,1,0,244,1,0,244,1,0,244,1,0,0,0,s

The packetgen packet is correctly broadcast on node 16 (received and decoded on an emontx)

I suspect that the problem is either in RF12demo or emonhub but I can't find it!

I would greatly appreciate some help !

Richard

pb66's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Hi Richard, can you confirm which emonHub version you are using? I suspect it may be rc1.0 which wasn't too happy with the "OK" prefix used in jeelib but not in rfm12 rfm2pi firmware.

v1.1 onwards is more Jeelink friendly. The warnings at start up are more precise in the later versions too. 

You can update emonHub using a git pull in the emonhub folder. although this may not be straight forward if you have made the packetgen mods to emonHub, you will need to redo those after the update.

Paul

hatfieldr's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Hi Paul

Many thanks! - Emonhub now woks on the laptop & pulls in Inputs!

I am a little puzzled though... when I start emonhub the expected  directory for emonhub python scripts was /home/USER/emonhub/scr  not /home/USER/emonhub/src (as per the Git pull)

Also the git pull didn't bring in emonhub_buffer.py or emonhub_coder.py?

I renamed the directory /scr & copied across the old versions of the above files (as well as the packetgen changes) And it seems to work fine!

 

Also is 'service feedwriter' part of the emonhub setup?  this seems to be running on my Pi  but not on the laptop?

 

Thanks for your help

Richard

pb66's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

I am a little puzzled though... when I start emonhub the expected  directory for emonhub python scripts was /home/USER/emonhub/scr  not /home/USER/emonhub/src (as per the Git pull)

I'm a little confused by that too, where did the "scr" expectation come from? It is supposed to be "src" and I have just searched the repo's for "scr" expecting to find a typo which didn't find any occurrences 

Also the git pull didn't bring in emonhub_buffer.py or emonhub_coder.py?

This too is odd, but git and I have never seen eye-to-eye so I won't even try to explain or even understand why :-)

Also is 'service feedwriter' part of the emonhub setup? 

No that belongs to low-write emoncms

​Paul

hatfieldr's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Many thanks!

Just had a look at my copy of  /home/USER/emonhub/conf/default/emonhub :

## emonHub settings

# Edit this to configure the parameters used in
# the /etc/init.d/emonhub script.

# This file should be deployed to /etc/default/emonhub
# unless you have edited the init.d file to give an
# alternate SYSCONF_PATH

# Specify the directory in which emonhub.py is found:
EMONHUB_PATH=/home/richard/emonhub/scr/

# Specify the full config file path:
EMONHUB_CONFIG=/home/richard/emonhub/conf/emonhub.conf

# Specify the full log file path:
EMONHUB_LOG=/var/log/emonhub/emonhub.log

 

Emonhub path seems to have scr? (I don't think I changed that??) memory isn't too good though........

Regards

Richard

pb66's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Ahh ok, the default locations are

# Specify the directory in which emonhub.py is found:
EMONHUB_PATH=/usr/share/emonhub/
# Specify the full config file path:
EMONHUB_CONFIG=/etc/emonhub/emonhub.conf

This is where the files will (eventually) be installed to, during the development it has been easier to install the repo to the user's homedir and "symlink" all the files to their intended locations, which is what the "dev-emonhub" install script does.

The main thing is you got it working :-)

Paul

hatfieldr's picture

Re: [SOLVED] Running Emonhub, emoncms on Laptop with Jeelink

Many Thanks Paul!

Now works great on the Pi & the laptop!

Richard

 

Comment viewing options

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