RFM12 repeater - solved

I'm thinking about installtion of a RFM12B Repeater because an EmonTX I'd like to integrate is out of reach (located in the gardenhouse, receiver in the basement of my house

There are different ideas:


1) Repeater with 2 modules (433Mhz receiver and 868MHz sender), using a 433MHz EmonTX.

2) Repeater with only one 868Mhz module and a 868Mhz EmonTx.

If the power of the 868Mhz and the 433Mhz modules are equal the 433Mhz should have a little advantage in the range because the free space loss should only be 25% of the free space loss from the 868Mhz module.


For the second idea I've allready found a link to a source here in the forum that relays data between to network groups.


What would you prefer to use?

Robert Wall's picture

Re: RFM12 repeater - solved

Why not store-and-forward on the same frequency with the same module? Or is that your No.2 option? The emonTx will normally ignore other transmissions, and with bit of luck (else why do you need a repeater?) the receiver won't see the same message twice. The only problem I see is the measurement will arrive a few milliseconds late.

Jérôme's picture

Re: RFM12 repeater - solved

> with bit of luck (else why do you need a repeater?) the receiver won't see the same message twice

You could change the Node ID before transmission, to be sure the same sample is not received twice. This requires a more intelligent repeater, perhaps.

Or add a timestamp to each sample.

jb79's picture

Re: RFM12 repeater - solved

Today is the day.


Yesterday I first tried to send values from the EmonTX in the gardenhouse to my Raspberry - it doesn't work because my massive 30cm ferro-concrete basement of my house.

So I built up a small module with an ATMEGA 328, an RFM12 module for 868Mhz, and a voltage regulator. On this module I installed the groupRelay Script from my first post. In the script the serial interface is set to 57600baud, I changed it to 9600 like all the other deviced run on.

Then I changed the networkGroup and networkID of an unused EmonTX to another network group to test it.

I left the relay module connected to the PC for configuration and testing of the settings, it can be configurated via the serial monitor.


There are two settings you can change on the relay: MULTI and ACK.

ACK can be switched on or off, both seems to work with the EmonTX/RaspberryPI scripts

MULTI has to be switched off (0), otherwise no values reach my Raspberry. The NodeID that is seen for the values is equal to the outgoing NodeID of the relay.

I think MULTI = 1 should present a Node transparent so if it has nodeID 4 in group X it should have 4 in group Y after passing the relay, but it doesn't work for me, I tried it with ACK=0 and 1, but none of this settings worked.

I also tried to relay two different EmonTX with different nodeIDs but I only got crap, together there should be 11 feeds but I only got 8 feeds out of the relay with the first three of them mixed (sometimes first, sometimes second EmonTX). I tried different settings for MULTI and ACK but I wasn't able to get both EmonTX working with the relay. Maybe the script isn't perfect, maybe I did something wrong.


So for plug & play:

  1. change serial speed to 9600baud in the groupRelay script
  2. install the groupRelay script
  3. switch off MULTI by typing 0m when connected via serial console
  4. set the right  frequency, nodeIDs and networkIDs for both incoming and outgoing packets also via serial console


Bra1n's picture

Re: RFM12 repeater - solved

I couldn't get the groupRelay Script to work with my Emoncms installation, the relay seemed to receive then send out but the RaspberryPi mounted RFM12B didn't seem to understand the packets and nothing was received. I ended up writing my own simple relaying code which works for me. It receives from one network group then retransmits to another maintaining the Node ID. Example code is here https://github.com/Bra1nK/HomeMonitor/blob/master/Arduino%20Code/RFM12B_Relay_Example.ino

jb79's picture

Re: RFM12 repeater - solved

Hello Brian,

is your script able to relay more than one node? I mean for example to relay/translate Node 7  & 8 from group 211 to Node 7 & 8 in group 210?

I didn't get the groupRelay Script to do this, when I tried I only get waste data.

Bra1n's picture

Re: RFM12 repeater - solved

It should do however I've just realised that there's a problem with my script in that it only retransmits one item of data so I need to revisit it, I should have tested more comprehensively !

I've currently got a bigger problem to solve first though as my RFM12Pi will now only receive from nodes a few feet away (this followed a crash/lockup on the Pi) :(

Bra1n's picture

Re: RFM12 repeater - solved

OK having resolved my other RFM12Pi issue I've refactored the repeater code and tested it with 2 nodes transmitting data every 10 seconds. Seems to be working perfectly and and maintains the node id's as designed. The new code can be found here https://github.com/Bra1nK/HomeMonitor/tree/master/RFM12B_Relay_Example

Comment viewing options

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