emonhub: "Device communication error - check settings"

Hi,

I have rebooted my raspberry pi and emonhub is no longer receiving anything.  In the emonhub log file the error "Device communication error - check setting" is reported.

Here below an extract of my emonhub log file.

2016-02-12 19:37:07,305 DEBUG    MainThread SIGINT received.
2016-02-12 19:37:07,307 INFO     MainThread Exiting hub...
2016-02-12 19:37:07,496 INFO     MainThread Exit completed
2016-02-12 19:37:21,745 INFO     MainThread EmonHub emonHub 'emon-pi' variant v1.1
2016-02-12 19:37:21,757 INFO     MainThread Opening hub...
2016-02-12 19:37:21,765 INFO     MainThread Logging level set to DEBUG
2016-02-12 19:37:21,775 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi'
2016-02-12 19:37:21,800 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2016-02-12 19:37:23,808 WARNING  MainThread Device communication error - check settings
2016-02-12 19:37:23,815 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2016-02-12 19:37:24,825 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2016-02-12 19:37:25,834 INFO     MainThread Setting RFM2Pi quiet: 0 (0q)
2016-02-12 19:37:26,839 INFO     MainThread Setting RFM2Pi baseid: 15 (15i)
2016-02-12 19:37:27,850 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2016-02-12 19:37:28,856 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2016-02-12 19:37:28,866 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2016-02-12 19:37:28,871 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2016-02-12 19:37:28,882 DEBUG    MainThread Interfacer: Subscribed to channel' : ToRFM12
2016-02-12 19:37:28,893 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2016-02-12 19:37:28,910 INFO     MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 mqtt_user=emonpi
2016-02-12 19:37:28,937 DEBUG    MainThread MQTT Subscribed to channel' : ToEmonCMS
2016-02-12 19:37:28,947 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2016-02-12 19:37:28,966 DEBUG    MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2016-02-12 19:37:29,057 INFO     MQTT       Connecting to MQTT Server
2016-02-12 19:37:29,092 INFO     MQTT       connection status: Connection successful
2016-02-12 19:37:29,118 DEBUG    MQTT       CONACK => Return code: 0
2016-02-12 19:37:29,239 INFO     MQTT       on_subscribe
2016-02-12 19:37:59,045 INFO     emoncmsorg sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1455302279
2016-02-12 19:37:59,605 DEBUG    emoncmsorg acknowledged receipt with 'ok' from http://emoncms.org
2016-02-12 19:38:29,013 INFO     emoncmsorg sending: http://emoncms.org/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-02-12 19:38:30,267 INFO     emoncmsorg sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=145530231

Note that before the reboot of the raspberry pi it was working properly.

Any tips regarding how I can fix this?

many thanks,

jan

jvda's picture

Re: emonhub: "Device communication error - check settings"

Hi,

I did a hard reboot (unplugged the adaptor) and this fixed it.

I have the impression that a soft reboot (using reboot unix command) doesn't completely reset the state of the RFM69Pi.

kr
Jan.

pb66's picture

Re: emonhub: "Device communication error - check settings"

I can't say why the rfm2pi stopped, but you are right, there is no way for it to be reset by doing a soft reboot. Currently, the rfm2pi board runs autonomously using the unswitched 3.3v power from the Pi, only interrupting the power or grounding the reset line will cause the rfm2pi to reset.

As it happens, I am currently working on adding functionality to emonhub to enable it to reset the device if required.

Paul

jvda's picture

Re: emonhub: "Device communication error - check settings"

Thanks Paul for the response.

In my case I think that the soft reboot of the raspberry pi (using the unix comment  "sudo reboot") triggered the problem.

Indeed it would be good to add functionality to emonhub to reset the device.

For the moment everything is working fine and next time when rebooting the raspberry pi I know that I need to check if emonhub is receiving signals.

Jan

Comment viewing options

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