Skip to content

Bresser 5-in-1/6-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101 or SX1276/RFM95W

License

Notifications You must be signed in to change notification settings

ptrsmt/BresserWeatherSensorReceiver

 
 

Repository files navigation

BresserWeatherSensorReceiver

CI CppUTest GitHub release License: MIT

Bresser 5-in-1/6-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101 or SX1276/RFM95W

The Bresser 5-in-1 Weather Stations seem to use two different protocols. First, the 6-in-1 decoder is tried. If this fails, the 5-in-1 decoder is tried.

Model Sensor Type Decoder Function
7002510..12 Weather decodeBresser5In1Payload()
7902510..12 Weather decodeBresser5In1Payload()
7002585 Weather decodeBresser6In1Payload()
7009999 Thermo-/Hygrometer decodeBresser6in1Payload()
7009972 Soil Moisture/Temperature decodeBresser6In1Payload()

Configure the desired radio module by (un-)commenting USE_CC1101 or USE_SX1276 in WeatherSensorCfg.h.

SW Examples

Uses default configuration src/WeatherSensorCfg.h

Really a very basic example. Good for testing the SW build, wiring and sensor reception/decoding. Output is printed to the serial console (example). Data is provided by the getMessage()-method, which returns almost immediately (i.e. after a small multiple of expected time-on-air), even if no data has been received.

Uses default configuration src/WeatherSensorCfg.h

Very similar to BresserWeatherSensorBasic, but data is provided by the getData()-method, which waits until a complete set of data has been received or a timeout occurred. Output is printed to the serial console (example).

Uses default configuration src/WeatherSensorCfg.h

Based on BresserWeatherSensorWaiting, but repeatedly invokes a callback function while waiting for data. In this example, in each iteration of the wait-loop, a dot is printed. Output is printed to the serial console (example).

Uses default configuration src/WeatherSensorCfg.h

Based on BresserWeatherSensorWaiting, but demonstrates the different options of the getData()-method which defined if enough sensor data has been received before returning. Output is printed to the serial console (example).

Uses default configuration src/WeatherSensorCfg.h

This is finally a useful application.

At startup, first a WiFi connection and then a connection to the MQTT broker is established. (Edit secrets.h accordingly!) Then receiving data of all sensors (as defined in NUM_SENSORS, see WeatherSensorCfg.h) is tried periodically. If successful, sensor data is published as MQTT messages, one message per sensor. If the sensor ID can be mapped to a name (edit sensor_map[]), this name is used as the MQTT topic, otherwise the ID is used. From the sensor data, some additional data is calculated and published with the extra topic.

The data topics are published at an interval of >DATA_INTERVAL. The status and the radio topics are published at an interval of STATUS_INTERVAL.

If sleep mode is enabled (SLEEP_EN), the device goes into deep sleep mode after data has been published. If AWAKE_TIMEOUT is reached before data has been published, deep sleep is entered, too. After SLEEP_INTERVAL, the controller is restarted.

MQTT publications:

<base_topic>/data/<ID|name> sensor data as JSON string - see publishWeatherdata()

<base_topic>/radio CC1101 radio transceiver info as JSON string - see publishRadio()

<base_topic>/status "online"|"offline"|"dead"$

$ via LWT

<base_topic> is set by #define HOSTNAME ...

<base_topic>/data JSON Example:

{"sensor_id":12345678,"ch":0,"battery_ok":true,"humidity":44,"wind_gust":1.2,"wind_avg":1.2,"wind_dir":150,"rain":146}

Dashboard with IoT MQTT Panel (Example)

IoTMQTTPanel_Bresser_5-in-1

Customized version of the example BresserWeatherSensorMQTT

The file BresserWeatherSensorReceiver/examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h has been customized (from BresserWeatherSensorReceiver/src/WeatherSensorCfg.h.

See examples/BresserWeatherSensorMQTTCustom/Readme.md for details.

Based on BresserWeatherSensorMQTT. Provides sensor data as MQTT messages via WiFi to Domoticz (https://domoticz.com/) (MQTT plugin for Domoticz required). The MQTT topics are designed for using with Domticz virtual sensors (see https://www.domoticz.com/wiki/Managing_Devices#Temperature and https://www.domoticz.com/wiki/Managing_Devices#Weather).

HW Examples

ESP8266 D1 Mini with CC1101

Bresser5in1_CC1101_D1-Mini

Pinout ESP8266 WeMos D1-Mini with cc1101

CC1101

Texas Instruments CC1101 Product Page

Note: CC1101 Module Connector Pitch is 2.0mm!!!

Unlike most modules/breakout boards, most (if not all) CC1101 modules sold on common e-commerce platforms have a pitch (distance between pins) of 2.0mm. To connect it to breadboards or jumper wires with 2.54mm/100mil pitch (standard), the following options exist:

Note 2: Make sure to use the 868MHz version!

Adafruit Feather ESP32S2 with Adafruit LoRa Radio FeatherWing

Note: Make sure to use the 868MHz version!

  • ADA3231 - Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz - RadioFruit
  • ADA3232 - Adafruit LoRa Radio FeatherWing - RFM95W 433 MHz - RadioFruit
  • ADA5303 - Adafruit ESP32-S2 Feather with BME280 Sensor - STEMMA QT - 4MB Flash + 2 MB PSRAM

Solder-Bridges on the Module/Wing:

  • E to IRQ
  • D to CS
  • C to RST
  • A to DI01

Adafruit RFM95W LoRa Radio Transceiver Breakout

Note: Make sure to use the 868MHz version!

  • ADA3072 - 868/915 MHz version
  • ADA3073 - 433 MHz version
  • RF connector
  • Antenna

See Adafruit RFM69HCW and RFM9X LoRa Packet Radio Breakouts - Pinouts.

Note: The RFM95W also supports FSK modulation and thus can be used to receive the weather sensor data.

Antennas and RF Connectors

The required antenna depends on the signal path between weather sensor and CC1101 or RFM95W receiver.

Some options are:

  • wire antenna
  • spring antenna (helical wire coil)
  • rubber antenna

See Adafruit Tutorial - Antenna Options for wire antenna lengths and uFL connector soldering.

The Data Alliance website helped to sort out my RF connector confusion:

Applications of MHF Connectors & Cables

The MHF series of RF micro-connectors (mating heights listed below are the maximum):

  • MHF1 (also known as MHF) has a Mating Height of 2.5mm
  • MHF2 has a Mating Height of 2.1mm
  • MHF3 has a Mating Height of 1.6mm
  • MHF4 has a Mating Height of 1.2mm

MHF3 connector is compatible with a W.FL connector while MHF2 connector is equivalent of U.FL connector. The MHF4 cable connector is the smallest while MHF1 connector is the largest which is comparable to a U.FL connector.

Personally I prefer the SMA connector over the uFL connector - but be aware of the (usual) male/female connector types and the normal/reverse polarity types. See SMA vs RP-SMA what is the difference? by Digikey.

Software Build Tutorial

See issue matthias-bs#12 (comment)

Source Documentation

https://matthias-bs.github.io/BresserWeatherSensorReceiver/

About

Bresser 5-in-1/6-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101 or SX1276/RFM95W

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 98.2%
  • Makefile 1.1%
  • Other 0.7%