OpenMQTTGateway and 868 MHz devices (e.g. Weatherstation?)


I like the fact that I don’t have to use a full blown raspberry pi with a rtl Dongle so I grabbed my old lilygo
lora Board

and flashed it with the rtl_433 Port whicht works in 433 MHz out of the box.

If I get another Lora Lilygo which supports 868 MHz instead, would it also work on that frequency or is it untestet or not implemented yet?

Thanks a lot for clearifying!


I only have sensor devices that operate at 433Mhz, so other frequencies are not tested. Technically the code will work at other frequencies, you just need to change the frequency. Do you sensor devices on that frequency ?

Currently I have a Bresser 5-in-1 Weatherstation which I monitor by an RTL-SDR DVB device and a low power Intel ATOM PC - I’d really like to migrate that to a way lower Power ESPxx Board if possible.

So with other Words, I have to look in the source code, buy an Lilygo 868 MHz Board an get tinkering :slight_smile:


Another low-power solution is to use RFLink:

I have two Arduino Mega clones, one with a 433 MHz receiver, one with a 868 MHz receiver.
Both are connected by USB to my Raspberry Pi running Domoticz.
The 433 board does light switching (mostly KaKu), the 868 receives my weather station (Alecto DKW2012, but can be found under different brand names).
But using ESP’s is even more simple and low power of course.
I am curious too whether my weather station would work, so I am considering getting a Lilygo 868 MHz board. The Alecto DKW2012 uses ASK modulation, is that supported?

just bought a 868Mhz Liligo. Have you been able to adapt the software to 868 Mhz? If yes could you please tell me where to implement the necessary changes of send me the modified .bin file?


just bought a 868Mhz Liligo. Have you been able to adapt the software to 868 Mhz? If yes could you please tell me where to implement the necessary changes of send me the modified .bin file?


What devices are you attempting to receive at 868Mhz ? Hopefully they are not using FSK modulation, as it is not currently supported

Receiving at 868Mhz should be as straight forward as sending a MQTT command to change the receive frequency to 868Mhz.

I had the same issue and came by this post yesterday. I would like to briefly report how it worked for me. I had a TTGO T3_V1.6 (20180606) 868/915MHz board lying around and I own a Froggit WH1080SE weather station. I have flashed via the web upload (lilygo-rtl_433). Afterwards I connected to the WLAN and stored my own access data of WLAN and MQTT. Then I told the board via MQTT that it should now please listen on 868.3MHz: With the message {"mhz":868.3} to the topic home/rtl433/commands/MQTTtoRTL_433/config. (home is my base topic and rtl433 my gatewayname set in the webinterface.) In the webinterface under the point information I could see that this worked. And now the weather station sends me data via MQTT and I am happy :slight_smile:

PS: I think I now have to resend the command every time I restart the board (?!)


Thanks for your sollution.
My weatherstation (bresser 5in1) uses FSK modulation so the lilygo-rtl_433 option in web upload did not work because here it is set to OOK mudulation.
However after adding two lines:

; *** radio settings ***

I got it to work! With the last line you can set the frequency and it will not reset if you restart the board.


Hi, I want to test this as well. However, I don;t know where I should add those radio settings. Can you indicate which file I need to change? thanks!

Hi @marckessels

You need to add these lines to the environment applicable for the board you are using, i.e. 868MHz Heltec, 868MHz LilyGo or ESP32 with an 868MHz CC1101. Which one do you have?

The environments are defined in the environments.ini file.

Are you familiar with Visual Studio Code and PlatformIO?

Hi @DigiH ,

thanks for your help. I have a ttgo-lora32-v1-868.
I am new to visual studio code and platformIO, but I installed it, and I am able to compile and upload openMQTTGateway as well as the example OOK_RECEIVER from rtl_433_esp.

now wanting to get my bresser 5_in_1 connected as well :-).

So if you have a look in the environments.ini file and go to the [env:lilygo-rtl_433] environment to add the above two lines under build_flags, then compile and upload this build you should be set for your 868MHZ FSK bresser 5_in_1.

I have to admit though that I’m currently not sure about the v1 you mentioned with your LilyGo ttgo-lora32-v1-868 board, as the current board definitions are for v2.1 - so if also changing the line

board = ttgo-lora32-v21


board = ttgo-lora32-v1

will be enough.

Let us know how you get on.

Best to copy the whole changed environment here if you are experiencing any issues.

I got it working!

things I ran into:
ttgo-lora32-v1-868 board type did not pull the right libraries, so I added those. Also pin definitions were not entirely correct, so I hacked those into the header files :thinking:
the board seems to not have a lot of memory, so flash size was too big. Therefore I had to remove all rtl_433 protocols, except the bresser_5in1. now I am at 97.5% of the flash size.
So I did not do the changes in the intended way, but it works now :slight_smile:
thanks for your help to get me started!

here all my changes, in case somebody else wants to do it too. (or wants to do it the right way :slight_smile: )

in platformio.ini I uncommented
default_envs = ttgo-lora32-v1-868

and in environments.ini I added (+) and removed (-):

lib_deps =
+  ${libraries.rtl_433_ESP}
 build_flags =
-  '-DZgatewayLORA="LORA"'
-  '-DLORA_BAND=868E6'
-  '-DGateway_Name="OMG_ESP32_LORA"'
+  ; *** OpenMQTTGateway Modules ***
+  '-DTTGO_LoRa32_v1=1'
+  '-DZgatewayRTL_433="rtl_433"'
+  '-DZradioSX127x="SX127x"'
+  '-DGateway_Name="OMG_ESP32_868_3"'
+  ; *** radio settings ***
+  '-DCC1101_FREQUENCY=868.30'
+  '-DSX1276_FREQUENCY=868.30'
+  '-DMY_DEVICES=true'		; subset of devices

in main.ino I added:

#define MY_DEVICES 1
#ifndef TTGO_LoRa32_v1
  #define TTGO_LoRa32_v1 1

in rtl_sdr.h I changed line 137 :
#if defined(ARDUINO_TTGO_LoRa32_v21new) // LILYGO® Disaster-Radio LoRa V2.1_1.6.1
#if defined(ARDUINO_TTGO_LoRa32_v21new) || defined(TTGO_LoRa32_v1)// LILYGO® Disaster-Radio LoRa V2.1_1.6.1

in rtl_devices.h I modified the lines 254-262 to:

 * Subset of devices that I have access to and have tested with
#  define DEVICES         \
    DECL(bresser_5in1) \
/* Add new personal decoders here. */

and in signalDecoder.cpp I modified the section to include the bresser_5in1

#ifndef MY_DEVICES
    // This is a generated fragment from tools/
    // end of fragement

    //memcpy(&cfg->devices[0], &lacrosse_tx141x, sizeof(r_device));
    memcpy(&cfg->devices[0], &bresser_5in1, sizeof(r_device));**

in “C:\.platformio\packages\framework-arduinoespressif32\variants\ttgo-lora32-v1\pins_arduino.h” in
I added

#define LORA_IRQ 26  // GPIO26 - SX1276 IRQ (interrupt request)
#define LORA_D1     33  // GPIO33 - SX1276 IO1 (for LMIC Arduino library)
#define LORA_D2     32 // GPIO32 - SX1276 IO2
1 Like

Great to hear you got it working, but I am wondering if you actually require the LoRa protocol part of the gateway, if you only want to decode rtl_433?

That was my idea above, when I mentioned your board ttgo-lora32-v1 I was more thinking of replacing this board definition in the [env:lilygo-rtl_433] environment, from which you pulled in the additional lib_deps and build_flags to your above environment. Without all the LoRa relevant parts I would think even all the rtl_433 protocols will fit nicely onto your board.

great work :slight_smile: would you mind sharing the your branch of the development ?

I Try to make it run in but the last step seems to be impossible… ttgo-lora32-v1-868

“in “C:.platformio\packages\framework-arduinoespressif32\variants\ttgo-lora32-v1\pins_arduino.h” in
I added”

Off course I don’t find C: in gitpod, but I don’t find any variants or framework subdirs as well :frowning:

Cheers & Thank you!