The guys at OpenEnergyMonitor were kind enough to send me a prototype of their new RFM12Pi board a few weeks ago, this handy little kit allows our favourite low power radio board to be connected to the immensely popular Raspberry Pi. This makes setting up a tiny little server for receiving data from the OEM emonTX or my own TinyTX sensor boards very easy and negates the need for a separate internet gateway device such as a NanodeRF. If you want a local back end solution rather than a remote server it’s ideal.
While everyone else was struggling with interrupt issues when trying to get the RFM12B to work directly with the Pi, Martin went instead for the simple method of using an ATtiny84 to receive the data from the RF module and then spit it out to the Pi’s UART. A PHP script on the Pi then receives this, correctly formats it and sends it on to emoncms. Simple but effective and allows the tried and tested JeeLib RF12 library to be used on the ATtiny.
The board comes as a kit which shouldn’t take more than 10 minutes to put together and then just plugs onto the GPIO headers of the Raspberry Pi. Assuming you already have the Raspbian Linux distro installed on your Pi all you need to do is install emoncms (+ Apache, PHP and MySQL if not already installed), the PECL PHP serial module and the Raspberry Pi emoncms Module and you will be receiving data from your nodes in no time. Follow the complete setup instructions here.
If you are using ACKs like I am with the TinyTX then you will need to make a small edit in raspberrypi_run.php otherwise your node numbers will all be increased by 32.
Just change the line:
$url = “/emoncms/input/post?apikey=”.$apikey.”&node=”.$values[1].”&csv=”.$msubs;
to:
$url = “/emoncms/input/post?apikey=”.$apikey.”&node=”.($values[1]-32).”&csv=”.$msubs;
This is a bit of a quick and dirty fix that won’t be any good if you have a mix of nodes that use ACKs and some that don’t but it does the job for me. Update: See comments below for a better fix that works with both, does mean updating the code on the ATtiny84 though.
I’ve been using emoncms for over 12 months now and it makes a fantastic back end for the TinyTX and similar sensors and has seen some great improvements in that time. If you want a local dedicated back end for your system I can highly recommend the RFM12Pi board and Raspberry Pi combo.
![]() |
![]() |
![]() |
| RFM12Pi Kit | Completed Board | Fitted to Raspberry Pi |






Hi Nathan,
maybe just doing logical AND with 0x1F is a better approach to clear the ACK bit.
Also, did you know that the RFM2Pi board can send data, not only receive? You can use that to send out time to emonGLCD for example
Hi Martin,
Yep, that’s the answer, cheers. Changed line 250 of TinySensor_RF12_Demo.ino to:
mySerial.print((int) rf12_hdr & 0x1F);updated the ATtiny84 and it now works for nodes that want an ACK as well as those that don’t.
Not looked at sending yet but if I decide to switch to the Pi as my full time base station I will want to so good to know it can be done.
Cheers,
Nathan
AM interested in knowing more about sending if anyone has any pointers .. would like to be able to send commands to my wireless plugs and wireless boiler control. Can I run this in conjunction with receiving data? Was looking at something such as https://github.com/r10r/rcswitch-pi to allow me to control remote plugs.
Thanks
Nick