Help Needed: Correct RFM69 Configuration & EMonTH2 Packet Format Details

I’m currently working on a project to read data from my EMonTH2 sensors using an RFM69HCW module mounted on a Raspberry Pi 5 (with the Adafruit Radio Bonnet). My EMonPi system has been working for years with these sensors and I want to keep it as-is, but I’m trying to replicate the sensor functionality on the new Pi5 setup before I purchase dedicated EMonTH sensors for it.

What I’ve Done So Far:

  • I have the RFM69 initialized for 433 MHz operation (using a custom Python script) and the module is successfully entering receive (RX) mode.
  • My current code polls the FIFO and reads incoming data, but I’m getting unexpected results:
    • The FIFO length values read from register 0x00 are extremely high (e.g., 223, 197, 253, etc.) instead of the small, expected value (around 11 bytes).
    • Occasionally, when I decode the packets, the resulting data fields (such as temperatures, humidity, battery, pulse count, and RSSI) are clearly off.

What I Need to Confirm/Understand:

Packet Mode:

Are the EMonTH2 sensors using variable‑length or fixed‑length packet mode when transmitting?

If variable‑length, does the first byte represent the packet length?

Packet Format:

What is the exact packet structure of the EMonTH2 sensor data?
My assumptions are:

Byte 0: Packet length (expected to be 11 bytes for the payload),

Byte 1: Node ID,

Bytes 2–3: Internal Temperature (little‑endian, scaled by a factor, possibly 0.1 or 0.01),

Bytes 4–5: External Temperature,

Bytes 6–7: Humidity

Byte 8: Battery Voltage (×0.1 V),

Bytes 9–10: Pulse Count,

Byte 11: RSSI (raw value to be negated for dBm))

Any clarification on byte order and scaling would be extremely helpful.

RFM69 Register Settings:

Could someone please confirm the recommended RFM69 configuration settings (especially for registers controlling packet mode, modulation, sync word, packet filtering, and DataModul) for interfacing with the EMonTH2 sensors?

Are there any specific adjustments needed to ensure that the FIFO data is correctly interpreted as valid sensor packets?

Any known issues or best practices when reading the RSSI value or handling the FIFO data from the sensor transmissions?

I’d really appreciate pointers toward documentation, posts or experience from anyone who’s interfaced the EMonTH2 sensors with an RFM69 module. My goal is to ensure that my RFM69 on the Pi5 is configured exactly as needed so I can properly decode the sensor data.

I know I have asked for a lot of information, but thank you in advance for your help!

We use the RFM69CW module. I know there are detail differences and you will need to compare the two (RFM69HCW vs RFM69CW).

We also use the LPL library to handle the transmissions. Data is encrypted and the packet format is here:
Radio Packet Formats.pdf (48.1 KB)
The payload and encryption key are in the emonTH2 sketch.

      [[[rx]]]
         names = temperature, external temperature, humidity, battery, pulseCount
         datacodes = h,h,h,h,L
         scales = 0.1,0.1,0.1,0.1,1
         units = C,C,%,V,p

and 89txbe4p8aik5kt3

Decryption is done inside the RFM69CW, I believe LPL can handle the RFM69HCW. I don’t know what an Adafruit Radio Bonnet is.

Do you know what firmware your emonTH2 is using? Are you using the newer Low Power Labs library, or the older JeeLib? The document Rob lists shows some differences.

We can assume that it’s using LPL - you can upgrade them if they are older, and you might as well :slight_smile:

Just to check, you have the physical 433 MHz version? The 868/915 MHz and 433 MHz RFM modules have different front ends and can’t be used interchangeably…

Just to break this down, h codes are 16 bit integers, and L is 32 bits.

For the LPL library, the format is, with bytes indices:

[0]: Length (packet size + 3)
[1]: Destination address
[2]: Source address
[3]: Control byte
[4..(4+length-1)]: data packet
[4+length..(4+length+2)]: CRC

From rewriting the LPL library to the emonPi3 from the emonTx4, to answer your specific setup:

  • DataModul: 0x00 (packet mode, FSK, no shaping)
  • SyncValue1: 0x2D
  • SyncValue2: 0xD2 (210, OEM group ID)
  • PacketConfig1: 0x90 (nb: different sources I’ve looked at have different values here - need to confirm…)

As Rob mentioned, you need to set the encryption key as well.

The HCW is compatible with the CW - it’s the higher powered version. The register configuration is the same. The Adafruit Radio Bonnets are a series of wireless development for plugging into the Pi.