RFM12Pi

I do not understand control 3.

can explain

3.$ sudo nano /etc/php5/cli/php.ini add extension=dio.so to file in the beginning of the ;Dynamic Extensions; section on line 843 [Ctrl+X] then [y] then [Enter] to save and exit
_____________________________________________

ran the command nothing happens

$ minicom -b 9600 -o -D /dev/ttyAMA0

 

 

ukmoose's picture

Re: RFM12Pi

php.ini is the configuration file for php.  You need to modify it by adding "extension=dio.so" to the section suggested.

The most commonly used text editor for the raspberry pi is called nano. 

So the command opens the php.ini file in nano texteditor.  Because of the permission on the file you will need additional rights to edit the file which is why you need the sudo command.

So type:
  sudo nano /etc/php5/cli/php.ini

you should then be asked to type you password.

add extension=dio.so at line 843.

To save the file and quit nano you will need to do the following: [Ctrl+X] then [y] then [Enter] to save and exit

 

reins5's picture

Re: RFM12Pi

 

when I run minicom nothing happens. how do I know if the command is used?

 minicom -b 9600 -o -D /dev/ttyAMA0

the text is AMAO or AMA0 (zero)

 

ukmoose's picture

Re: RFM12Pi

The minicom command is nothing to do with the line 3. (I have modified the wiki to make this clearer)

What you are doing with the minicom command is trying to check that the RFM12B can receive data.  For it to receive something you need to have something else that is broadcasting a signal.

When I type minicom -b 9600 -o -D /dev/ttyAMA0 (the last character is a zero)

The text in the window disappears and I see the following:


Welcome to minicom 2.6.1

OPTIONS: I18n
Compiled on Apr 28 2012, 19:24:31.
Port /dev/ttyAMA0

Press CTRL-A Z for help on special keys

If this isn't what you see, could you:

  1. describe what you do see?
  2. type sudo nano /boot/cmdline.txt and post the contents of the file? 
  3. confirm that you are using the Raspbian 'Wheezy' distribution and if you are using your Rapsberry Pi for anything else?

 

mharizanov's picture

Re: RFM12Pi

Also, type 'h' in minicom, it should spit a help message that ends with the current configuration. Make sure band is 868 or 433 mhz, depending on what you have then group must be 210.

Also, If you already have the cron running, it dowsnt mesh well with minicom as both are accessing the serial. just to a "ps -A' to identify the php process id, then "sudo kill 1234" to kill it, replacing 1234 with whatever process id the php has.

reins5's picture

Re: RFM12Pi

you can be more clear with the command

* / 1 **** cd root / var / www / emoncms / Modules / raspberrypi && php raspberrypi_run.php 

I got here

"With the script running you should now see the message box at the top of the raspberry pi module page turn green"

but not green

 

mharizanov's picture

Re: RFM12Pi

That line has spaces between the * (starts), it is bect to copy/paste the whole line rather than typing it manually. I see your line is wrong, the correct one is:

*/1 * * * * root cd /var/www/emoncms/Modules/raspberrypi && php raspberrypi_run.php

Again, mind the spaces, this is very important

ukmoose's picture

Re: RFM12Pi

I don't know what instructions you are following, as I cannot find that line on http://wiki.openenergymonitor.org/index.php?title=Raspberry_Pi

Your last post suggests you are trying to link the RFM12Pi into emoncms and php.

Does that mean you have now got minicom working?  

What instructions are you following?

reins5's picture

Re: RFM12Pi

minicom ok

I'm here now

http://wiki.openenergymonitor.org/index.php?title=File:Raspberrypi_modul...

but I do not compare the green line

http://wiki.openenergymonitor.org/index.php?title=File:Raspberrypi_modul...

how do I know that the module is running??

ukmoose's picture

Re: RFM12Pi

Ahh!   Now I know where you are ;-)

The green line at the top took two attempts for it to work for me.

The easiest way to see if it is working is to click on the input tab and see if you are receiving data.  If you are, it's working ;-)

 

 

 

ukmoose's picture

Re: RFM12Pi

What was the problem with minicom that you fixed?  If you write it here if others who have the same error can learn. 

reins5's picture

Re: RFM12Pi

The problem was the command minicom AMA0 I had typed AMAO
Now I can not go on

the module is offline

ukmoose's picture

Re: RFM12Pi

Try rebooting your RaspPi and then in the browser, click again on the Raspberry PI link and try again.  For some reason mine did not appear to work the first time.

 

 

ukmoose's picture

Re: RFM12Pi

can you do type "ps -aux" at a prompt.

this will list all the processes running.  Do you see one that ends with /USR/SBIN/CRON (in capitals)

reins5's picture

Re: RFM12Pi

I run the command given by you and actually being there

root 2571 0.1 0.7 6188 3460 tty1 S 21:41 0:00 /USR/SBIN/CRON

 

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

but the module is not communicating.

 

ukmoose's picture

Re: RFM12Pi

The good news!   I now have exactly the same issue ( it was working yesterday)  

reins5's picture

Re: RFM12Pi

so we are the same point?? even your work??

reins5's picture

Re: RFM12Pi

I include photos

MartinR's picture

Re: RFM12Pi

Not sure if this is any help but I spent a couple of hours working through the php code to see why I was getting the "The RFM12 to PI interface script is not running, you may need to configure cron" message even though I could see that the script was running.

It turns out that you get this message if the RFM12 hasn't received any packets for 20 seconds even when the script is running so it's a bit confusing. I had my transmitter turned off at the time.

ukmoose's picture

Re: RFM12Pi

Many thanks MartinR   :)

So by unplugging the RFM12Pi and plugging it back in again.  Refresh the page and a green bar!  

20 seconds later try again and  back to the old message again!

 

 

ukmoose's picture

Re: RFM12Pi

Then spotted the obvious typo in the group, and hey presto working again. That error message sure needs some work.

 

 

reins5's picture

Re: RFM12Pi

I tried to remove and then replace RFM12Pi but nothing happens.
the code:

*[space]/[space]1[space] *[space] *[space] *[space] *[space] root cd /var/www/emoncms/Modules/raspberrypi && php raspberrypi_run.php

è OK???

 

mharizanov's picture

Re: RFM12Pi

You have it wrong, it is :

*/1[space]*[space]*[space]*[space]*[space]root[space]cd[space]/var/www/emoncms/Modules/raspberrypi[space]&&[space]php[space]raspberrypi_run.php

 

It would be so much simpler just to copy/paste it instead of counting the spaces.

MartinR's picture

Re: RFM12Pi

out of curiosity, what does the /1 do? If the script runs every minute isn't that just the same as * (without the /1)?

I'm no Unix expect so sorry in advance if this is a dumb question

reins5's picture

Re: RFM12Pi

ok .... the code was correct. but nothing has changed.
The RFM12Pi not communicate

MartinR's picture

Re: RFM12Pi

Is the LED flashing on the RFM12 board? If not you have no transmission and the script will block as stated above.

reins5's picture

Re: RFM12Pi

The transmission occurs via emonTx with

https://github.com/openenergymonitor/emonTxFirmware

mharizanov's picture

Re: RFM12Pi

Also, have you set the group to 210, band to 868mhz ?

 

reins5's picture

Re: RFM12Pi

just take off and get back RFM12Pi screen appears green after no

mharizanov's picture

Re: RFM12Pi

I wouldn't care about the text being green, IF it sends data. As someone already noted, this notification goes RED just after 20 seconds of inactivity, does the data keep coming to the feeds?

ukmoose's picture

Re: RFM12Pi

I would upload the sketch you use on the emontx again.  Double check your settings are the same as you have in teh raspberry pi screen.

 

reins5's picture

Re: RFM12Pi

the LED flashes regularly while eminTx RFM12Pi no.
It is about 2 meters

ukmoose's picture

Re: RFM12Pi

Have you double checked the frequency, nodeID and networkgroup on your emonTx by uploading a new copy of teh sketch to the emonTx?

 

reins5's picture

Re: RFM12Pi

can you explain better

ukmoose's picture

Re: RFM12Pi

Have a look at http://openenergymonitor.org/emon/sites/default/files/OEM_system_emoncms2.png

RFM12Pi = EmonBase.   

The EmonTX needs to broadcast on the same frequency, network group & node  as the RFM12Pi is set to recieve

  EmonTX --> RFM12Pi  
freq ? --> 868 RFM12 Frequency
networkGroup ? --> 210 Group
Node ID ? --> 15   Base ID

For the RFM12Pi LED to work the EmonTx needs to have the same settings as the RFM12Pi.

Take your EmonTx and upload the software again.  Make sure the settings are the same as RFM12Pi.

I use the emonTx_CT123_Voltage sketch so these would be the settings:

#define freq RF12_868MHZ                                    
const int nodeID = 15;                                              
const int networkGroup = 210;

 

You have checked using minicom that the RFM12Pi is working.  You have checked that php and cron is correct.  So lets check that the emonTx settings are also correct.

reins5's picture

Re: RFM12Pi

thanks to your help I was able to make it work

 

mharizanov's picture

Re: RFM12Pi

Glad to hear it,

can you share what the problem was?

 

ukmoose, thanks for all your help :)

reins5's picture

Re: RFM12Pi

I had configured the emontx

const int nodeID = 15;

thanks for the help ukmoose and all of you

 

 

khs's picture

Re: RFM12Pi

Thank you all for the useful hints here, especially not to care about the green text.

I got everything working except seeing the inputs. There was a message telling me to add my API-Key to my Nanode or something else. Strange. At the end I did the "Windows"-thing; I bootet and everything was fine.

At the very end of the crontab line I added ">/dev/null 2>&1" to dump all the messages every minute before filling the mail- and sys-logs.

 

 

Comment viewing options

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