Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

I don't fully understand what I'm doing, but I'm following the Wiki to set up emoncms on my RasPi, and I'm having real trouble getting emoncms to work on my RasPi. I believe my emonTx to be transmitting, but am not sure how I can confirm this- I have set the led to flash once per loop, and it does this.

No matter how many times I kill the cron and php processes, after a short period (~20sec), I always get the message "The RFM12 to PI interface script is not running, you may need to configure cron". Sometimes, it does turn green, but not for long.

I have edited crontab and inserted */1 * * * * root cd /var/www/emoncms/Modules/raspberrypi && php raspberrypi_run.php

I have formatted and rebuilt the ready-to-go sd img several times. I have tried without 'update', and with.

I have searched the forum and have tried all of the suggestions.

The RFM12Pi LED lights when plugged in; I killed the php process in TOP and tried minicom and got these results-

[RFM2Pi]

Availÿ
[RFM2Pi]

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 ack
  ...,<nn> s - send data packet to node <nn>, no ack
  <n> l      - turn activity LED on DIG8 on or off
Current configuration:
79 i15 g1 @ 868 MHz  Lock: 1
> 15i

     > 8b

         > 1g

Can anyone suggest what else I can try, please?

MartinR's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

You have the group set to 1 (> 1g) Are you sure the emonTx group is also set to 1?

The default is 210...

const int networkGroup = 210;

v8hybrid's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

what a marvelous man you are!

:-)

tango's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

I have the same issue like the thread-opener and tried the same ways. 

When I connect to the Emoncms I get:

"Message: The RFM12 to PI interface script is not running, you may need to configure cron"

When I disconnect the RFM12 from PI an reconnect, then the LED is lightning for about 5 seconds and when I refresh the Emoncms-Website I get the gree

"Message: RFM12 to PI interface script is up and running"

or another some seconds, few time late it is the yellow warning again. 

There is a second warning line: 

"Warning: file_get_contents(http:///time/local.json?apikey=): failed to open stream: operation failed in /var/www/emoncms/Modules/raspberrypi/raspberrypi_view.php on line 15"

I have set the frequency to "868 "(like my kit), Group to "210" and Base ID is at "15".

I Have one full-featured-EmonTX-Node, set to frequency 868, group 210,  nodeID 11. 

My second Node ist an lowpower-temerature-EmonTX, set to F 868, G 210 and N 18

 

Do you have any suggestions, what to do to get started?

 

Many thanks

Stefan Krüger

Jérôme's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

Could it be you're stuck waiting for data on the COM port ? Is there anything coming from the COM port ? (If you're unsure, see the lines about minicom in the wiki.)

tango's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

I'm not shure about this, will try this evening. I think, when the Board is ok and configured, then the communication should be ok, although there are no data from any EmonTX-Board - right?

Are there any function-test build-in? Perhaps a good idea, especially so long we are soldering the boards on our own.

Thanks

Stefan 

Jérôme's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

> I think, when the Board is ok and configured, then the communication should be ok, although there are no data from any EmonTX-Board - right?

I'm afraid not.

You're most certainly using raspberry_run.php (with the line in crontab).

https://github.com/emoncms/raspberrypi/blob/master/raspberrypi_run.php

I think there is not timeout on fgets and you get stuck when nothing comes in.

https://github.com/emoncms/raspberrypi/issues/7

I wrote an alternative to raspberry_run.php in python you may want to try. Search for RFM2Pi Gateway on my profile page.

This script does not hold waiting for inputs, and it has more logging.

 

scohrab's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

I have exactly the same symptoms as Stefan. I"m using the low power temp node kit and the RFM12pi, all from the energyMonitor shop. Minicom suggests that the 12Pi board is working, cos I can turn the LED On and off by typing 

1 l

I've tried the suggestions on killing CRON and PHP and then rebooting, but no success. I guess from the previous comments that I'm getting nothing from the remote Tx board.

Any ideas on how to debug ? Could I type commands into Minicom ? Anyone know where I could find these ?

Hugh

Jérôme's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

See "Test the RFM12Pi is receiving data" section in this page : http://wiki.openenergymonitor.org/index.php?title=Raspberry_Pi

scohrab's picture

Re: Resolved: 'The RFM12 to PI interface script is not running, you may need to configure cron'

Thanks. Just got it working today. Not sure how, but just started everything from scratch again, inc re-flashing the Pi sd card.

 

Comment viewing options

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