No inputs to emoncms

I have just installed the emonSD-07Nov16 image on a system that had previously worked some time ago. I have rebooted the Arduino in the garage with the sensors attached, I have rebooted the pi several times.However no inputs are showing in http://……/emoncms/input/view page.

I am somewhat defeated by the complexity of this new software. Are there instructions somewhere to test that the Pi is receiving data? How can I proceed to identify and fix the problem? The lights on the Arduino box and the pi seem to be flashing every 10 seconds or so: does this mean successful communication between the two?
Here is the output from …/emoncms/config/view

2017-05-20 08:32:49,419 INFO MQTT connection status: Connection successful
2017-05-20 08:32:49,450 DEBUG MQTT CONACK => Return code: 0
2017-05-20 08:32:49,596 INFO MQTT on_subscribe
2017-05-20 08:47:22,390 DEBUG MainThread SIGINT received.
2017-05-20 08:47:22,393 INFO MainThread Exiting hub...
2017-05-20 08:47:22,480 INFO MainThread Exit completed
2017-05-20 08:47:26,038 INFO MainThread EmonHub emonHub 'emon-pi' variant v1.2
2017-05-20 08:47:26,041 INFO MainThread Opening hub...
2017-05-20 08:47:26,044 INFO MainThread Logging level set to DEBUG
2017-05-20 08:47:26,047 INFO MainThread Creating EmonHubJeeInterfacer 'RFM2Pi'
2017-05-20 08:47:26,057 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2017-05-20 08:47:28,091 WARNING MainThread Device communication error - check settings
2017-05-20 08:47:28,094 INFO MainThread Setting RFM2Pi frequency: 433 (4b)
2017-05-20 08:47:29,099 INFO MainThread Setting RFM2Pi group: 210 (210g)
2017-05-20 08:47:30,103 INFO MainThread Setting RFM2Pi quiet: 0 (0q)
2017-05-20 08:47:31,107 INFO MainThread Setting RFM2Pi baseid: 5 (5i)
2017-05-20 08:47:32,112 INFO MainThread Setting RFM2Pi calibration: 230V (1p)
2017-05-20 08:47:33,116 DEBUG MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2017-05-20 08:47:33,120 DEBUG MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-05-20 08:47:33,123 DEBUG MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2017-05-20 08:47:33,126 DEBUG MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-05-20 08:47:33,131 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT'
2017-05-20 08:47:33,136 INFO MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2017-05-20 08:47:33,146 DEBUG MainThread MQTT Subscribed to channel' : ToEmonCMS
2017-05-20 08:47:33,150 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2017-05-20 08:47:33,156 DEBUG MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2017-05-20 08:47:33,259 INFO MQTT Connecting to MQTT Server
2017-05-20 08:47:33,278 INFO MQTT connection status: Connection successful
2017-05-20 08:47:33,292 DEBUG MQTT CONACK => Return code: 0
2017-05-20 08:47:33,398 INFO MQTT on_subscribe

The only thing that stands out to me is
2017-05-20 08:47:28,091 WARNING MainThread Device communication error - check settings
but how do I check the settings? Which settings?

I’m sure I am missing a key piece of information about how to proceed under circumstances like this but I can’t find any relevant documentation.

The settings it refers to are also printed to the logfile in the line immediately before it. Those settings in this case are a serial port address of /dev/ttyAMA0 and serial baud of 38400. Both sound correct unless you have an earlier model RFM2Pi, these settings are set in the emonhub.conf, with can also be accessed via the emoncms config module.

What system do you have? I assume it’s a RFM2Pi if you can see the led flash and if it’s flashing that would suggest it is recieving. That leaves the serial connection between the RFM2Pi and the RPi, is the board seated correctly? Have you added other serial devices of altered any settings? or updated using the emonPi script etc ?

Thanks, Paul, for your reply.
I have dug out the original order for the hardware in 2014

emonTx V3 - Bundle Builder
(emonTx V3: emonTx V3 - Assembled PCB, Case: emonTx V3 Aluminium Enclosure Case, Case Assembled? No, Microprocessor: RFµ328 - Arduino ATmega328 compatible, Radio: 433Mhz RFM12B (Worldwide), Power Supply / AC Voltage Sensor: UK Plug - AC-AC Power Supply Adapter, emonTx V3 Assembled? Yes)

Pre-Loaded Raspberry Pi Gateway 4GB SD card

RFM12Pi V2 Raspberry Pi Expansion board
(Frequency (RF): 433Mhz RFM12B (Worldwide))

I must have used a Raspberry Pi I already had.

This is how the port appears in a directory listing.

pi@emonpi(ro):dev$ ls -l ttyAMA0
crw-rw---- 1 root dialout 204, 64 May 20 08:47 ttyAMA0

I removed the small RFM12Pi board from the Raspberry Pi and reinserted it fully. But I still get the following

pi@emonpi(ro):emoncms$ cat /var/log/emonhub/emonhub.log
2017-05-22 15:53:31,996 INFO     MainThread EmonHub emonHub 'emon-pi' variant v1.2
2017-05-22 15:53:32,009 INFO     MainThread Opening hub...
2017-05-22 15:53:32,012 INFO     MainThread Logging level set to DEBUG
2017-05-22 15:53:32,015 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2017-05-22 15:53:32,042 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2017-05-22 15:53:34,048 WARNING  MainThread Device communication error - check settings
2017-05-22 15:53:34,051 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2017-05-22 15:53:35,055 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2017-05-22 15:53:36,059 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2017-05-22 15:53:37,064 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2017-05-22 15:53:38,068 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2017-05-22 15:53:39,072 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2017-05-22 15:53:39,076 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-05-22 15:53:39,103 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2017-05-22 15:53:39,106 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2017-05-22 15:53:39,194 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2017-05-22 15:53:39,239 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2017-05-22 15:53:39,247 DEBUG    MainThread MQTT Subscribed to channel' : ToEmonCMS
2017-05-22 15:53:39,448 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2017-05-22 15:53:39,494 DEBUG    MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2017-05-22 15:53:39,548 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:53:39,620 INFO     MQTT       Could not connect...
2017-05-22 15:53:40,732 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:53:40,763 INFO     MQTT       Could not connect...
2017-05-22 15:53:41,960 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:53:42,021 INFO     MQTT       Could not connect...
2017-05-22 15:53:43,161 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:53:43,230 INFO     MQTT       Could not connect...
2017-05-22 15:53:44,369 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:53:44,389 INFO     MQTT       Could not connect...
2017-05-22 15:58:14,036 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:14,044 INFO     MQTT       Could not connect...
2017-05-22 15:58:15,148 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:15,171 INFO     MQTT       Could not connect...
2017-05-22 15:58:16,311 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:16,344 INFO     MQTT       Could not connect...
2017-05-22 15:58:17,448 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:17,483 INFO     MQTT       Could not connect...
2017-05-22 15:58:18,588 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:18,632 INFO     MQTT       Could not connect...
2017-05-22 15:58:19,754 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:19,832 INFO     MQTT       Could not connect...
2017-05-22 15:58:20,962 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:21,046 INFO     MQTT       Could not connect...
2017-05-22 15:58:22,207 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:22,313 INFO     MQTT       Could not connect...
2017-05-22 15:58:23,501 INFO     MQTT       Connecting to MQTT Server
2017-05-22 15:58:23,667 INFO     MQTT       connection status: Connection successful
2017-05-22 15:58:23,748 DEBUG    MQTT       CONACK => Return code: 0
2017-05-22 15:58:23,882 INFO     MQTT       on_subscribe

So there is still a basic problem as shown by
2017-05-22 15:53:34,048 WARNING MainThread Device communication error - check settings

There is no data showing in the http://192.168.123.26/emoncms/input/view page, unsurprisingly given the communications error.

One small observation is that the tiny led on the RFM12Pi board stops flashing every 10 seconds when I turn off the Arduino box in the garage. As you can see I’m clutching at straws to gain some small understanding of this.

So, if the problem is with communication then does that mean that the 38400 bits/s or something similar is wrong?

RFM2Pi v2 from 2014 could well use a different baud. Try setting com_baud = 9600 or maybe even com_baud = 57600 if 9600 doesn’t work.

Sidenote - Do NOT be tempted by the “update RFM69Pi” button in emoncms if it’s there. That will install the later RFM69Pi firmware which will not run on the rfm12b model RFM2Pi’s, effectively bricking it until you manually find and reinstall the correct firmware. If you wish to use the update routine, you can, but use the “update emonPi” button as that will fail to change the RFM2Pi firmware, leaving you with (old but) working firmware rather than (new but) wrong firmware.

I have changed the baud rate to 9600 in /home/pi/emonhub/conf/emonhub.conf as in the following

[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[RFM2Pi]]
    Type = EmonHubJeeInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 9600                      # 9600 for old RFM12Pi modules
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        subchannels = ToRFM12,

        group = 210
        frequency = 433
        baseid = 5                              # emonPi / emonBase nodeID
        quiet = true                            # Report incomplete RF packets (no implemented on emonPi)
        calibration = 230V                      # (UK/EU: 230V, US: 110V)
        # interval =  0                         # Interval to transmit time to emonGLCD (seconds)

Then I rebooted the pi. I was surprised that this made no difference to the results reported in the log file

2017-05-22 17:02:59,955 INFO     MainThread EmonHub emonHub 'emon-pi' variant v1.2
2017-05-22 17:02:59,958 INFO     MainThread Opening hub...
2017-05-22 17:02:59,961 INFO     MainThread Logging level set to DEBUG
2017-05-22 17:02:59,974 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2017-05-22 17:02:59,995 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2017-05-22 17:03:02,003 WARNING  MainThread Device communication error - check settings

where, if not /home/pi/emonhub/conf/emonhub.conf, are these settings set, please?

Can you check to see if the edits you made have stuck or if the file you edited currently says 38400?

If 38400, try editing again and then recheck the file again to see if the edit has stuck, then recheck the logfile, you should not need to restart emonhub for this change to happen.

I copied the excerpt in the previous post from the /home/pi/emonhub/conf/emonhub.conf file, so it had stuck.

But just now I found that you could alter the settings from within the http://192.168.123.26/emoncms/config/view webpage served by the pi. I changed it to 9600 in this interface and saved it and restarted emonhub from within the webpage. Now it works!

Thanks for your help. There doesn’t seem to be an upgrade button anywhere in http://192.168.123.26/emoncms/ so I shall leave things alone now they work.

best wishes
Nigel

@glyn.hudson perhaps checking the Baud rate should be part of any upgrade instructions as it is an easy one to trip over if you are upgrading using a new image (not that I can find any upgrade instructions in the guide :frowning: )