RFM12B with emonTH - no input appearing in emoncms

Hi all,

I’m another one of those people revisiting a project I started a few years ago…

I have a Pi B with a RFM12B connected to it and I also have a emonTH v2. When I look in the inputs page on emoncms I do not see anything.

Using minicom it appears that the RMF12B and emonTH are being seen ok (could someone confirm?):

Available commands:
  123 x      - Toggle configuration change protection, 1=Unlocked
  <nn> i     - set node ID (standard node ids are 1..26)
  <n> b      - set MHz band (4 = 433, 8 = 868, 9 = 915)
  <nnn> g    - set network group (RFM12 only allows 212, 0 = any)
  <n> c      - set collect mode (advanced, normally 0)
  ...,<nn> a - send data packet to node <nn>, with  ...,<nn> s - send data packk
  <n> l      - turn activity LED on DIG8 on or off
Current configuration:
79 i15 g0 @ 433 MHz  Lock: 1
G 210 23 135 0 0 0 57 1 31 0 1 0 0 0
G 210 23 128 0 0 0 61 1 31 0 1 0 0 0
G 210 23 126 0 0 0 62 1 31 0 1 0 0 0                                            
G 210 23 124 0 0 0 63 1 31 0 1 0 0 0                                            
G 210 23 120 0 0 0 65 1 31 0 1 0 0 0                                            
G 210 23 119 0 0 0 65 1 31 0 1 0 0 0                                   

Does anyone have any pointers on how to troubleshoot this setup?

Many thanks

,Mark

The output from the RFM2Pi looks fine except the group is set to 0 (all groups) the packets tell us it should be set to group 210 using command 210g. The node id is 23 and there are 12 bytes of data.

What lies between the RFM2Pi and emoncms?

Are you using a pre-built image? using emonHub? Local emoncms or remote? etc etc

The best source of info is the emonhub.log. can you attach some emonhub.log?

Hi Paul,

I’m using the latest emonSD image and running emoncms locally on the pi.

From the emonhub.log it appears it has trouble connecting to the MQTT server but is finally successful:

2017-02-16 19:23:45,686 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2017-02-16 19:23:46,690 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2017-02-16 19:23:47,695 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2017-02-16 19:23:48,700 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2017-02-16 19:23:49,704 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2017-02-16 19:23:49,708 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-02-16 19:23:49,711 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2017-02-16 19:23:49,784 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-02-16 19:23:49,855 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2017-02-16 19:23:49,921 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2017-02-16 19:23:49,998 DEBUG    MainThread MQTT Subscribed to channel' : ToEmonCMS
2017-02-16 19:23:50,070 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2017-02-16 19:23:50,106 DEBUG    MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2017-02-16 19:23:50,224 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:23:50,344 INFO     MQTT       Could not connect...
2017-02-16 19:23:51,488 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:23:51,578 INFO     MQTT       Could not connect...
2017-02-16 19:23:52,721 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:23:52,828 INFO     MQTT       Could not connect...
2017-02-16 19:23:53,960 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:23:54,031 INFO     MQTT       Could not connect...
2017-02-16 19:23:55,170 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:23:55,245 INFO     MQTT       Could not connect...
2017-02-16 19:23:56,404 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:05,936 INFO     MQTT       Could not connect...
2017-02-16 19:24:07,047 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:07,058 INFO     MQTT       Could not connect...
2017-02-16 19:24:08,162 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:08,175 INFO     MQTT       Could not connect...
2017-02-16 19:24:09,291 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:09,300 INFO     MQTT       Could not connect...
2017-02-16 19:24:10,404 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:10,413 INFO     MQTT       Could not connect...
2017-02-16 19:24:11,517 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:11,537 INFO     MQTT       Could not connect...
2017-02-16 19:24:12,642 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:12,668 INFO     MQTT       Could not connect...
2017-02-16 19:24:13,787 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:13,801 INFO     MQTT       Could not connect...
2017-02-16 19:24:14,905 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:14,915 INFO     MQTT       Could not connect...
2017-02-16 19:24:16,048 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:16,060 INFO     MQTT       Could not connect...
2017-02-16 19:24:17,164 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:17,183 INFO     MQTT       Could not connect...
2017-02-16 19:24:18,301 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:18,322 INFO     MQTT       Could not connect...
2017-02-16 19:24:19,427 INFO     MQTT       Connecting to MQTT Server
2017-02-16 19:24:19,454 INFO     MQTT       connection status: Connection successful
2017-02-16 19:24:19,491 DEBUG    MQTT       CONACK => Return code: 0
2017-02-16 19:24:19,609 INFO     MQTT       on_subscribe

Thanks for the help.

Still not had any luck getting this to work. It seems clear that the Pi can see the RMF12B and the data from the emonTH is getting through to that, but nothing being sent to emoncms? Is the firmware of the RMF12B likely to have much influence? emonSD is the latest build and the emonTH is new, just the RMF12B which is a few years old…

Mark

The log you provide actually starts just after the RFM2Pi interfacer is created so we cannot see A) what baud it is trying to use and B) whether connection was successful.

If you are using an emonSD image the serail baud will be set to 115200 for the emonPi baud, if you are using a rfm12b based RFM2Pi the baud is most likely 9600 (you will have confirmed that when using minicom), so unles you have already, you will need to edit emonhub.conf and change the `com_baud=" setting in the [[RFM2Pi]] settings.

If the baud is correct check the com-port=/dev/xxxx address is the same as you used for minicom too.

Paul, thank you very much!!

You were absolutely right, the baud rate was set to 38400. There’s even a comment there which says it should be 9600! Should have had a closer look. Thanks again.

Mark

A post was split to a new topic: RFM12B not working on new SD build