Giter VIP home page Giter VIP logo

matthias-bs / bresserweathersensorreceiver Goto Github PK

View Code? Open in Web Editor NEW
94.0 6.0 21.0 5.35 MB

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

License: MIT License

C++ 97.00% C 1.14% Ruby 0.01% Perl 0.34% Makefile 1.00% Python 0.43% XSLT 0.09%
arduino cc1101 sx1276 esp32 esp32-arduino esp8266 esp8266-arduino arduino-library weather mqtt

bresserweathersensorreceiver's Introduction

BresserWeatherSensorReceiver

CI CppUTest GitHub release License: MIT

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

See the Wiki for additional information.

To allow automatic handling of all Bresser weather station variants, the decoders are tried in the following order until decoding succeeded:

  1. 7-in-1-Decoder
  2. 6-in-1-Decoder
  3. 5-in-1 Decoder
  4. Lightning Sensor Decoder
  5. Water Leakage Sensor Decoder

(The Bresser 5-in-1 Weather Stations seem to use two different protocols - 5-in-1 and 6-in-1.)

Model Type Decoder Function
7002510..12, 9602510 Weather Station decodeBresser5In1Payload()
7902510..12 Weather Station (Base) decodeBresser5In1Payload()
7002531 3-in-1 Professional Wind Gauge / Anemometer decodeBresser6In1Payload() 1)
7002585 Weather Station decodeBresser6In1Payload()
7009999 Thermo-/Hygrometer Sensor decodeBresser6in1Payload()
7009970 Air Quality Sensor PM 2.5 / PM 10 decodeBresser7In1Payload()
7009972 Soil Moisture/Temperature Sensor decodeBresser6In1Payload()
7009973 Pool / Spa Thermometer decodeBresser6In1Payload()
7009975 Water Leakage Sensor decodeBresserLeakagePayload()
7009976 Lightning Sensor decodeBresserLightningPayload()
7009977 CO2 Sensor decodeBresser7In1Payload() 2)
7009978 Air Quality Sensor HCHO / VOC decodeBresser7In1Payload() 3)
7003600 and WSX3001 Weather Station decodeBresser7In1Payload() 4)
7003210 Weather Station decodeBresser7In1Payload()
7803200 Weather Sensor decodeBresser7In1Payload()
7003300 Weather Station decodeBresser7In1Payload()
7803300 Weather Sensor decodeBresser7In1Payload()

Some guesswork:

Numbering Scheme Type
700[25|32|33|36]* Weather Station, Base + Sensor
780[25|32|33]* Weather Station Sensor (Replacement)
790* Weather Station Base (Replacement)
700[99]* Accessory Sensor

1) The flag DATA_COMPLETE must not be set in getData(), otherwise the return value would always indicate a timeout. (I.e. use #define RX_STRATEGY 0 in some of the example sketches.)

2) Request for testing, see #138

3) Request for testing, see #139

4) The part number is specific to the actual variant, i.e. some more characters are appended

Contents

Configuration

Predefined Board Configurations

By selecting a Board and a Board Revision in the Arduino IDE, a define is passed to the preprocessor/compiler. For the boards in the table below, the default configuration is assumed based on this define. I.e. you could could use an Adafruit Feather ESP32-S2 with a CC1101 connected to the pins of your choice of course, but the code assumes you are using it with a LoRa Radio Featherwing with the wiring given below. In some cases (bold entries in the table below) an additional define has to be enabled manually in WeatherSensorCfg.h.

If you are not using the Arduino IDE, you can use the defines in the table below with your specific tool chain to get the same result.

If this is not what you need, you have to switch to Manual Configuration

Setup Board Board Revision Defines
bold: to be enabled manually in WeatherSensorCfg.h
Radio Module Notes
LILYGO®TTGO-LORA32 V1 "TTGO LoRa32-OLED" "TTGO LoRa32 V1 (No TFCard)" ARDUINO_TTGO_LORA32_V1 SX1276 (HPD13A) -
LILYGO®TTGO-LORA32 V2 "TTGO LoRa32-OLED" "TTGO LoRa32 V2" ARDUINO_TTGO_LoRa32_V2 SX1276 (HPD13A) Only needed for LMIC: Wire DIO1 to GPIO33
LILYGO®TTGO-LORA32 V2.1 "TTGO LoRa32-OLED" "TTGO LoRa32 V2.1 (1.6.1)" ARDUINO_TTGO_LoRa32_v21new SX1276 (HPD13A) -
Heltec Wireless Stick "Heltec Wireless Stick" n.a. ARDUINO_heltec_wireless_stick & USE_SX1276 SX1276 -
Heltec Wireless Stick V3 "Heltec Wireless Stick" n.a. ARDUINO_heltec_wireless_stick & USE_SX1262 SX1262 see #80 (comment)
Heltec WiFi LoRa 32 V2 "Heltec WiFi LoRa 32(V2)" n.a. ARDUINO_heltec_wifi_lora_32_V2 SX1276 -
Heltec WiFi LoRa 32 V3 "Heltec WiFi LoRa 32(V3)" n.a. ARDUINO_heltec_wifi_32_lora_V3 SX1262 -
Adafruit Feather ESP32S2 with Adafruit LoRa Radio FeatherWing "Adafruit Feather ESP32-S2" n.a. ARDUINO_ADAFRUIT_FEATHER_ESP32S2 SX1276 (RFM95W) Wiring on the Featherwing:
E to IRQ
D to CS
C to RST
A to DI01
Adafruit Feather ESP32, Adafruit Feather ESP32 V2 or ThingPulse ePulse Feather with Adafruit LoRa Radio FeatherWing "Adafruit ESP32 Feather"
"Adafruit Feather ESP32 V2"
n.a. ARDUINO_FEATHER_ESP32 SX1276 (RFM95W) Wiring on the Featherwing:
A to RST
B to DIO1
D to IRQ
E to CS

See #55 for ePulse Feather battery voltage divider hint.
DFRobot FireBeetle with FireBeetle Cover LoRa Radio 868MHz "FireBeetle-ESP32" n.a. FIREBEETLE_ESP32_COVER_LORA SX1276 (LoRa1276) Wiring on the cover:
D2 to RESET
D3 to DIO0
D4 to CS
D5 to DIO1

Additional connections required for battery voltage measurement.
M5Stack Core2 with M5Stack Module LoRa868 "M5Core2" n.a. ARDUINO_M5STACK_CORE2 SX1276
(RA-01H)
Only needed for LMIC - wiring on the LoRa868 Module:
DIO1 to GPIO35

"M5Unified" must be installed
M5.begin()is called to control power management
ESP32-S3 PowerFeather with Adafruit LoRa Radio FeatherWing "ESP32-S3 PowerFeather" n.a. ARDUINO_ESP32S3_POWERFEATHER SX1276 (RFM95W) Wiring on the Featherwing:
A to RST
B to DIO1
D to IRQ
E to CS

"PowerFeather-SDK" must be installed
Board.init(); is called to control power management
Adafruit Feather RP2040 with Adafruit LoRa Radio FeatherWing "Adafruit Feather RP2040" n.a. ARDUINO_ADAFRUIT_FEATHER_RP2040 SX1276 (RFM95W) Wiring on the Featherwing:
A to RST
B to DIO1
D to IRQ
E to CS

External voltage divider required for battery voltage measurement.

The preprocessor will provide some output regarding the selected configuration if enabled in the Arduino IDE's Preferences ("Verbose Output"), e.g.

ARDUINO_ADAFRUIT_FEATHER_ESP32S2 defined; assuming RFM95W FeatherWing will be used
[...]
Receiver chip: [SX1276]
Pin config: RST->0 , CS->6 , GD0/G0/IRQ->5 , GDO2/G1/GPIO->11

Note

The AVR architecture — including Adafruit Feather 32u4 RFM95 LoRa Radio — is no longer supported due to code size.

User-Defined Configuration

See WeatherSensorCfg.h for configuration options.

  • Set the desired radio module by (un-)commenting USE_CC1101, USE_SX1262 or USE_SX1276.

    SX1276 is compatible with RFM95W and HPD13A.

  • Set the I/O pinning according to your hardware

    Define Radio Module Configuration
    ESP32 user-defined generic, used for ESP32 boards if none of the above is defined
    ESP8266 user-defined generic, used for ESP8266 boards if none of the above is defined
  • Data from multiple sensors can be received by setting NUM_SENSORS to an appropriate value in WeatherSensorCfg.h.

    e.g. #define NUM_SENSORS 1

  • The sensors to be handled can be configured by two ways:

    • Add any unwanted sensor IDs to the exclude list SENSOR_IDS_EXC

      e.g. #define SENSOR_IDS_EXC { 0x39582376 }

    • Specify the wanted sensors explicitly in the include list SENSOR_IDS_EXC - if empty, all sensors will be used

      e.g. #define SENSOR_IDS_INC { 0x83750871 }

  • Unused decoders can be disabled to save computation time/power by commenting out:

    e.g. //#define BRESSER_LEAKAGE

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.

Same core functionality as BresserWeatherSensorMQTT, but instead of using static WiFi- and MQTT-connection data, WiFiManager is used instead.

Note:

When using the sketch on a device for the first time, you must format the flash file system (SPIFFS) first, otherwise the configuration cannot be saved.

Configuration:

  • Access Point SSID: ESPWeather-<chip_id>
  • Access Point Password: password
  • Configuration URL: http://192.168.4.1/ (The browser must be connected to the access point above!)

Please refer to the WiFiManager documentation for details!

After a successful setup, you can perform two consecutive resets (within 10 seconds) to enable WiFiManager for changing the configuration. This is achieved by using ESP_DoubleResetDetector.

WiFiManager Start Screen
WiFiManager Configuration Screen

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 Domoticz virtual sensors (see https://www.domoticz.com/wiki/Managing_Devices#Temperature and https://www.domoticz.com/wiki/Managing_Devices#Weather).

Example for BresserWeatherSensorReceiver on M5Stack Core2 with M5Stack Module LoRa868 (and optionally M5Go Bottom2). Using getMessage() for non-blocking reception of a single data message. Weather sensor data is presented on the display.

BresserWeatherSensorM5Core2

MQTT Integrations

Home Assistant

Shadowpost provided a Home Assistant configuration which can be modified as required:
Bresser_HA_MQTT_custom_config.yaml

Debug Output Configuration

See Debug Output Configuration in Arduino IDE

HW Examples

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

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
  • ADA5400 - Adafruit ESP32 Feather V2 - 8MB Flash + 2 MB PSRAM - STEMMA QT

Solder-Bridges on the Module/Wing:

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

Adafruit Feather ESP32 or ThingPulse ePulse Feather with Adafruit LoRa Radio FeatherWing

ePulse_Feather+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
  • ADA3405 - Adafruit HUZZAH32 – ESP32 Feather Board
  • B0BSC1PVL4 - ThingPulse ePulse Feather

Solder-Bridges on the Module/Wing:

  • A to RST
  • B to DIO1
  • D to IRQ
  • E to CS

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.

DFRobot FireBeetle ESP32 with FireBeetle Cover LoRa Radio 868MHz

firebeetle_esp32+cover_lora Note: Stacking headers were included with TEL0125.

Note: Make sure to use the 868MHz version!

  • DFR0478 - FireBeetle ESP32 IoT Microcontroller
  • TEL0125 - LoRa Radio 868MHz - FireBeetle Covers

Solder-Bridges on the Cover:

  • D2 to RESET
  • D3 to DIO0
  • D4 to CS
  • D5 to DIO1

Antennas and RF Connectors

The required antenna depends on the signal path between weather sensor and 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 BUILD

Source Documentation

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

Legal

This project is in no way affiliated with, authorized, maintained, sponsored or endorsed by Bresser GmbH or any of its affiliates or subsidiaries.

bresserweathersensorreceiver's People

Contributors

jorgenavarroortiz avatar matthias-bs avatar sadlo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bresserweathersensorreceiver's Issues

Support of BME280

Hi, me again, sorry.
It would be also nice to add BME280 support to have also in house data.
Please find attached a very dirty hack again for supporting BME280.
BresserWeatherSensorDomoticz_example.zip

grafik

It is tricky using a ESP8266 because of limited GPIO's, but at my side it is working with a wemos nodemcu clone device
Br Frank

Fix CppUTest for RainGauge

The unit tests have passed on a local installation but tend to fail in the CI actions.
There seems to be a dependency on the test case execution order.

Need help: No sensors for BRESSER_5_IN_1

With my Heltec lora v2 esp32, I dont have any sensors.
I am running the MQTTcustom example

I added:


#if ( !defined(USE_CC1101) && !defined(USE_SX1276) )
    // #define USE_CC1101
    #define USE_SX1276
#endif

... 
#define PIN_RECEIVER_CS 18   // CS
#define PIN_RECEIVER_IRQ 26  // DIO0
#define PIN_RECEIVER_RST 14  // RESET
#define PIN_RECEIVER_GPIO 35 // DIO1

SENSOR_IDS_EXC & SENSOR_IDS_INC are both empty

I dont know how I can de bug any further. The serial montior outputs only the loop. No sensor.loop

Devices/Bresser/status: online
Devices/Bresser/radio: {"rssi":-104}
Devices/Bresser/status: online
Devices/Bresser/radio: {"rssi":-105}

Basic-Example gets data correctly, Mqtt-Example gets radom data?

Describe the bug

after a lot of fiddeling I got my rtm95w working. If I upload the basic example I can se the data its receiving is changing, e.g. the wind direction. But after uploading the Mqtt example I only get random? data? The data is not changing if I spin the anemometer, or change the wind direction by hand.

The data looks like the following:

ESPWeather-925BA3/data/ 1234567: {"id":01234567,"battery_ok":1,"temp_c":22.2,"humidity":55,"wind_gust":4.4,"wind_avg":3.3,"wind_dir":111.1} ESPWeather-925BA3/extra: {"wind_dir_txt":"ESE","wind_gust_bft":3,"wind_avg_bft":2,"dewpoint_c":12.7,"perceived_temp_c":24.8}

has this something to do with the "num-sensors" and the mapping?

To Reproduce
I only changed my mqtt and wifi credentials.

Expected behavior
Getting the data into my mqtt server just like I can see them with the basic-example

Debug Log
If applicable, add log file to help explain your problem.

Embedded Device (please complete the following information):

  • Board: Wemos mini
  • Arduino Version: 2.0.3
  • Library Version latest?

I guess I'm just missing a little thing...

Thank you

Add pin configuration based on selected board

Selecting a board in the Arduino IDE sets a specific define for the compiler. This should be used to select the pin configuration accordingly.
e.g. selecting "TTGO LoRa32-OLED" will set -DARDUINO_TTGO_LoRa32_V1

JSON Parsen schlägt schief.

HAllo,m
Beim Decodieren der JSON bekom ich immer Fehler:
25.1.2023, 00:29:18node: 4b3131542aa8ddaffunction : (error)
"SyntaxError: Unexpected number in JSON at position 7"

Die DAten die roh ankommen sind:
25.1.2023, 00:29:18node: e320d83476070742
ESP-Bresser -0CDFBC/data/ A : msg.payload : string[163]
"{"id":0000000A,"ch":0,"battery_ok":1,"temp_c":-0.6,"humidity":99,"wind_gust":0.8,"wind_avg":0.8,"wind_dir":292.5,"rain":0.0,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}"

Woran kann das liegen?

No connection to MQTT Broker possible

After some trouble I got the basic and callback examples running successfully.

But if I try to connect to a unsecured Mosquitto broker it won't connect.

Opened the MQTT example and modified it to:

#define SLEEP_EN        false

and

#ifndef SECRETS
    const char ssid[] = "xxxxxxxx";
    const char pass[] = "yyyyyyyy";

    #define HOSTNAME "ESPWeather"
    #define APPEND_CHIP_ID

    #define    MQTT_PORT     1883 // checked by pre-processor!
    const char MQTT_HOST[] = "192.168.123.186";
    const char MQTT_USER[] = ""; // leave blank if no credentials used
    const char MQTT_PASS[] = ""; // leave blank if no credentials used

After compiling and uploading, I get this massage:

sdd��|�$�|�����l�c|������{�c�#��'o�dog���b�x��l{lsdp�g�����d����c�o�|�����b��ng�$��$`����og�l`���'{���o�#l��d8�o����{���������cn�|���c��og��d`����gnl`���o;���g��c��`��;��o��b��`������|�l�d`���g��l
SDK:2.2.2-dev(38a443e)/Core:3.1.1=30101000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386


BresserWeatherSensorMQTT 20221024

Attempting to connect to SSID: xxxxxxxxfpm close 1 
mode : sta(84:cc:a8:b1:e7:10)
add if0
...scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt 

connected with xxxxxxxx, channel 1
dhcp client start...
ip:192.168.123.119,mask:255.255.255.0,gw:192.168.123.1
connected!
Setting time using SNTP done!
Current time: Mon Mar 13 08:45:42 2023

Checking wifi...
MQTT connecting... .........pm open,type:2 0
..............................

I tried two simple sketches to verify a connection to the broker is possible.
This very simple code also won't connect.

{$lܟ<�l�|���d��c<������s�#��c��g'�l'o���c�p��dsdrlx�o����d�����cn�|�����#��no�d��$`����g'�l ���n{���o�bd��dp�g����;���������c�o�<���c��g'��l`����og�$`���gs�ۓn�c��`��sۓnc��`������s���l`���o��l
SDK:2.2.2-dev(38a443e)/Core:3.1.1=30101000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386
fpm close 1 
mode : sta(84:cc:a8:b1:e7:10)
add if0
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt 

connected with xxxxxxxxxx, channel 1
dhcp client start...
ip:192.168.123.119,mask:255.255.255.0,gw:192.168.123.1
192.168.123.119
pm open,type:2 0

But this code runs as expected.

sd$��|�l�|���d�#|������;�c��c��og�$gn����c�8�lrl{lp�'������l����#�g�|�������c��g'�l��l ����'od`���o;Ǜ�g�cd��lp�'�����s��ܜ����#�g�|���c��gn��l ����og�l`���gs�ۓn�c��`��sۓnc��`�������p��l`���n��$
SDK:2.2.2-dev(38a443e)/Core:3.1.1=30101000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386

Connecting to xxxxxxxx
fpm close 3 
mode : sta(84:cc:a8:b1:e7:10)
add if0
.....scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt 

connected with xxxxxxxxx, channel 1
dhcp client start...
ip:192.168.123.119,mask:255.255.255.0,gw:192.168.123.1
.
WiFi connected
IP address: 
192.168.123.119
Attempting MQTT connection...connected
subscribed to : wemos/esp-84:cc:a8:b1:e7:10/in
pm open,type:2 0
Publish topic: wemos/esp-84:cc:a8:b1:e7:10/out
Publish message: {"micros":20001068,"counter":1,"client":esp-84:cc:a8:b1:e7:10}

Maybe this issue is related? I will try to find out why no connection to the broker is established.

Fail to compile

Hi There,

I am not pretty sure if it is a bug or a missconfiguration of my own, but anyhow, here's my issue.

I use Ubuntu 22.04LTS, Arduino IDE 1.8.19 and ESP 8266 (I tried both dev and stable version)

When trying to compile on a ESP866 generic module, I have got the following error 👍

In file included from /home/marc/Arduino/BresserWeatherSensorBasic/BresserWeatherSensorBasic.ino:54: sketch/WeatherSensorCfg.h:315:48: note: '#pragma message: Receiver chip: [SX1276]' 315 | #pragma message("Receiver chip: " RECEIVER_CHIP) | ^ sketch/WeatherSensorCfg.h:316:170: note: '#pragma message: Pin config: RST->2, CS->15, GD0/G0/IRQ->4, GDO2/G1/GPIO->5' 316 | #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) ) | ^ Archiving built core (caching) in: /tmp/arduino_cache_703725/core/core_esp8266com_esp8266_generic_xtal_80,vt_flash,exception_disabled,stacksmash_disabled,ssl_all,mmu_3232,non32xfer_fast,ResetMethod_nodemcu,CrystalFreq_26,FlashFreq_40,FlashMode_dout,eesz_1M64,led_2,sdk_nonosdk_190703,ip_lm2f,dbg_Disabled,lvl_None____,wipe_none,baud_115200_551d4108386915ba00dc00bafc339e8d.a /usr/share/arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: sketch/BresserWeatherSensorBasic.ino.cpp.o:(.text.setup+0x8): undefined reference to _ZN13WeatherSensor5beginEv'
/usr/share/arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: sketch/BresserWeatherSensorBasic.ino.cpp.o:(.text.loop+0x3c): undefined reference to _ZN13WeatherSensor10getMessageEv\' /usr/share/arduino/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: sketch/BresserWeatherSensorBasic.ino.cpp.o:(.text.loop+0x67): undefined reference to _ZN13WeatherSensor10getMessageEv'
collect2: error: ld returned 1 exit status
exit status 1
Erreur de compilation pour la carte Generic ESP8266 Module`

I guess "pragma messages" are just alarms, but I could not get why I have got undefined references ? Wrong liking ?

Any idea ?

error 'NUM_SENSORS' was not declared in this scope

Hi, i'm trying to compile this code but keep getting the same error,
WeatherSensor.h:204:25: error: 'NUM_SENSORS' was not declared in this scope
sensor_t Sensor[NUM_SENSORS]; //!< sensor data array

as you can see from the screenshots 'NUM_SENSORS' is defined!
1
2

can you offer any assistance?

decodeBresser5In1Payload() extracts rain-value from three digits instead of four digits

I use this setup:

  • Bresser 5-in-1 weather station,
  • CC1101 868MHz receiver
  • Wemos D1 mini µC.

The received readings from the 5-in-1 sensor are confirmed by the base station. The SW worked right away, Respect!

This year white Christmas could be forgotten anyway, it's raining instead. But at least the rain counter is incrementing. Coincidentally, at my station there was just a change from 8980 (898.0mm) to 9112 (911.2mm) .

The 5-in-1 manual states rain-value range as [0 ... 999.9mm].

I wonder if there is a special reason why only three digits are used for the extraction of the rain value and the existing fourth digit of msg[24] is ignored. Or it this a bug?

I made a change in decodeBresser5In1Payload() line 542 from:

int rain_raw = (msg[23]&0x0f) + ((msg[23]&0xf0)>>4) * 10 + (msg[24]&0x0f) * 100;

to this:

int rain_raw = (msg[23]&0x0f) + ((msg[23]&0xf0)>>4) * 10 + (msg[24]&0x0f) * 100 + ((msg[24]&0xf0)>>4) * 1000 ; 

Example of an received frame, the rain-value is found in msg[23] and msg[24]

16:01:42.005 > raw= E4 1C 7F EB 5F EA EF E7 FE 6A CD 6E FF 1B E3 80 14 A0 15 10 18 01 95 32 91 00
16:01:42.011 >      |____________________XOR_redundancy__| CS |___________________________Data__|
16:01:42.019 > 
16:01:42.019 > msg[14]       [e3]       ID   = 227 
16:01:42.022 > msg[15]       [80]       Type = 0 
16:01:42.025 > msg[20,21,25] [18,01,00] T = 118 =  11.8 °C
16:01:42.028 > msg[22]       [95]       H = 95 %
16:01:42.030 > msg[17]       [a0]       Wind-Dir-Raw = 2250 °
16:01:42.036 > msg[16,17]    [14,a0]    Wind-Gust-Raw = 20 
16:01:42.038 > msg[18,19]    [15,10]    Wind-Raw = 15 
16:01:42.044 > msg[23,24]    [32,91]    Rain = 9132 total =913.2mm delta =  0.0mm
16:01:42.050 > msg[25]       [00]       Battery=Ok
16:01:42.052 > 24   12s E3-00 BAT=OK  T= 11.8°C H=95% wMax= 2.0m/s wAve= 1.5m/s wDir=225.0° R=913.2mm RSSI=-73.5dBm

Maybe someone with an 5-in-1 station can confirm?

ESP keeps disconnecting

When I reset the wifi, (or kill the power of the house...) the esp won't reconnect by it self. I need to power reset the ESP

PS. Thanks alot for this code. It saves alot of coding time

Add documentation for the Adafruit LoRa Radio FeatherWing - RFM95W (ADA3231)

I have successfully tested and used the RFM95W "FeatherWing", Adafruit ADA3232, with a ESP32-S2 feather.

Maybe it would be worth adding this to the documentation. The easiest way to implement is:

Solder-Bridges on the Module/Wing:
E to IRQ
D to CS
C to RST
A to DI01

definitions in WeatherSensorCfg.h:

#define PIN_RECEIVER_CS 6
#define PIN_RECEIVER_IRQ 5
#define PIN_RECEIVER_GPIO 11
#define PIN_RECEIVER_RST 9

Adding Domoticz Support ?

Hi, is it possible to add mqtt Domoticz Support?

Currently I am using node red to convert json string into Domoticz message:

msg1.payload = {"idx":1810,"nvalue":0,"svalue":msg.payload.wind_dir+";"+msg.payload.wind_dir_txt+";"+msg.payload.wind_avg10+";"+msg.payload.wind_gust10+";"+msg.payload.temp_c+";"+msg.payload.temp_c}

Where :

IDX = id of your device (This number can be found in the devices tab in the column "IDX")
WB = Wind bearing (0-359)
WD = Wind direction (S, SW, NNW, etc.)
WS = 10 * Wind speed [m/s]
WG = 10 * Gust [m/s]
22 = Temperature
24 = Temperature Windchill

MQTT Topic is domoticz/in

Add different configurations to CI workflow

There have been some glitches in non-default configurations (e.g. with debug output enabled) leading to compiler errors.
It would be useful to test some typical configurations in the CI workflow automatically.

Compile Error if _DEBUG_MODE_ is used

Hi, if you enable DEBUG_MODE in WeatherSensorCfg.h , you get a compile error at:

WeatherSensor.cpp:692:21: error: 'chksum' was not declared in this scope
692 | DEBUG_PRINT(chksum, HEX);
| ^~~~~~

As you disable it in the code:
// Checksum, add with carry
// unused...
//int chksum = msg[17];

Br. Frank

rain value is still the same and seems not to be updated

First of all, greate work! It works just fine but there is a little issue with my rain value, it stays all the time at 15,6.
I bought the Bresser station 5 in 1 (Lot No. 7002510-1274880) from ALDI last week for a very good price. And it works just fine with your WeatherSensorReceiver but the Rain value is not changing, doesn't matter if it's raining or not. The original Display shows correct values for rain.

Checking wifi...
MQTT connecting... connected!
ESPWeather-E8AE68/status: online
ESPWeather-E8AE68/data/37040087: {"id":923009159,"ch":0,"battery_ok":1,"temp_c":19.3,"humidity":72,"wind_gust":0.8,"wind_avg":0.8,"wind_dir":68.0,"rain":15.6,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}
ESPWeather-E8AE68/extra: {"wind_dir_txt":"ENE","wind_gust_bft":0,"wind_avg_bft":0,"dewpoint_c":14.1,"perceived_temp_c":22.9}
Sleeping for 150000 ms

Any idea where to look at?
Many thanks for help, regards
Oliver

Issues after update

Hi Matthias, me again :0
I've just tried to update my esp32 board after noticing an error on the display, and it has me slightly confused after your updates to the WeatherSensorCcg.h file
My board is a T3_V1.6.1, with the LoRa DI01 wired manually to socket 12 (as labelled on the board. I cant find any reference to GPIO 33 for my board, and have had to use
#define PIN_LMICDI01 12
in my TTGO_ESP32_Bresser_with _display.ino code, and change line 187 to
if defined (ARDUINO_TTGO_LoRa32_V2)
To get the new version of WeatherSensor.cfg.h to work I have to select "Board: TTGO LoRa32-OLED" / "Board Revision: TTGO LoRa32 V2" in the Arduino IDE.
It does throw this error when compiling :
c:\Users\mtc20tfq\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()': c:\Users\mtc20tfq\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp:71:72: note: #pragma message: Board not supported -- use an explicit pinmap #pragma message("Board not supported -- use an explicit pinmap")
but does appear to work ok.
Its just a little confusing!!
:)

Add support for Fineoffset-WH65B (Sainlogic 7-in-1 WS3500, etc)

Hi,
I have a Sainlogic WS3500 Weather Station which communicate with its display at 868Mhz (inside the display there's a ESP8266 and a CC1101 receiver).
I'd like to receive date inside my own ESP8266 with CC1101 receiver, I guess that your library for Bresser 7-in-1 could be adapted also to my Sainlogic, but I think that the initial parameter configurations aren't right, I always get [CC1101] Receive failed: [0], do you think can be added? If so, can you teach me how to identify correct parameters for my WS?

Thanks

MQTT Topics ändern

Hallo,
ich hab es doch ans laufen bekommen.

Jedoch hab ich 2 Fragen?

  1. Gibt es eine Möglichkeit die Topics zu ändern?
    Da diese Daten auf meinem Server zusammenlaufen und da diese von meinen Bezeichnungen abweichen.
    So müßte ich extra alles anders Definieren.
  2. Windrichtung. Da die Anlagen ja nicht immer richtig ausgerichtet sind gib es eien weg dieses anzupassen?
    Danke

Range Inquiry

Hi,
Very interested with this one.
My cOncern is range. what is its range in compare with traditonal RF module like Superheterodyne type?

I use to use CC1101 to decode weather station using another library but the range is disappointed.

Thanks

TTGO LoRa32 V2.1 1.6.1 [SX1276] Error initialising

TTGO-Lora32-V2.1 Board
Labeled with T3 v1.6.1 20210104

Settings from: here doesn't work.
Setting SX1276:
#define PIN_RECEIVER_CS 18
#define PIN_RECEIVER_IRQ 26
#define PIN_RECEIVER_GPIO 33
#define PIN_RECEIVER_RST 23

Please help!

Radio module not recognized (radio.beginFSK failed)

Hi,

I have a problem with radio module initialization and fixed it as follows:

I changed in WeatherSensor.cpp the line
static SX1276 radio = new Module(PIN_RECEIVER_CS, PIN_RECEIVER_IRQ, PIN_RECEIVER_RST, PIN_RECEIVER_GPIO);

with hard coded pin settings for my case:

static SX1276 radio = new Module(27, 21,32, 33);

Then it works. There might be something wrong with IN_RECEIVER_CS, PIN_RECEIVER_IRQ, PIN_RECEIVER_RST, PIN_RECEIVER_GPIO
since they are not known in this context though I have declared them in WeatherSensorCfg.h

I would appreciate any advice, may I have done something wrong.

Cheers Maria

Prevent treating a sensor reset/battery change as a rain/lightning counter overflow

Is your feature request related to a problem? Please describe.
Some sensor values are implemented as counters, e.g. the rain gauge or the lightning strike counter. If a counter value changes from some value to zero (or in general: a smaller value than before), this is treated by the receiver as an overflow. The counter's range is considered in the calculation.

Using this procedure after a sensor reset (or a battery change), leads to wrong accumulated values.

Describe the solution you'd like
Use the sensor's startup bit (if available) to handle this case in a different way than a counter overflow.

Describe alternatives you've considered
none

Additional context
none

SSL error

Describe the bug
I get a SSL error with my Heltec Lora esp32.

To Reproduce
Steps to reproduce the behavior:
The only thing in the 'MQTT example' script that I changed is the following.

    const char ssid[] = "WiFiSSID";
    const char pass[] = "WiFiPassword";
    #define HOSTNAME "hostname"
    const char MQTT_HOST[] = "xxx.yyy.zzz.com";
    const int  MQTT_PORT = 8883; // I used port 1883
    const char MQTT_USER[] = ""; 
    const char MQTT_PASS[] = "";

Expected behavior
The other example shows the lora messages (that works), my laptop can connect to MQTT, so that works.
I would assume the scripts works without any certs

Debug Log

15:01:28.190 -> Checking wifi...
15:01:28.190 -> MQTT connecting... [I][ssl_client.cpp:127] start_ssl_client(): WARNING: Skipping SSL Verification. INSECURE!
15:01:28.238 -> [E][ssl_client.cpp:36] _handle_error(): [start_ssl_client():216]: (-80) UNKNOWN ERROR CODE (0050)
15:01:28.238 -> [E][WiFiClientSecure.cpp:133] connect(): start_ssl_client: -80
15:01:28.238 -> .[I][ssl_client.cpp:127] start_ssl_client(): WARNING: Skipping SSL Verification. INSECURE!
15:01:29.237 -> [E][ssl_client.cpp:36] _handle_error(): [start_ssl_client():216]: (-80) UNKNOWN ERROR CODE (0050)
15:01:29.237 -> [E][WiFiClientSecure.cpp:133] connect(): start_ssl_client: -80

Embedded Device (please complete the following information):

Issue with negative temperatures on Bresser 7002510

Describe the bug
In the last few days, temperatures got below zero. This caused abnormal rain-meter readings on my Bresser 5-in-1 (7002510), which uses the 6-in-1 decoder of the library.

The problem seems to be, that a received message is interpreted as "temp, hum, wind, rain" OK, but this is not possible, since the to messages are either "wind & rain" or "temp, hum & rain".

To investigate, I logged the raw messages and found the following behavior:

Message 1 (Correct Reading) (Type: Wind, Rain) :
10.12.2022 21:41:07 Data: 55 49 14 40 07 ed 18 ff ff ff 27 08 ff fb 77 ff 01 02 00 00 00 00 00 00 00 00
Rain = 48.8mm

Message 2 (False Reading) (Type: Wind, Rain, Temp, Hum):
10.12.2022 21:41:19 Data: 2c c3 14 40 07 ed 18 ff ff ff 27 08 99 7a 94 ff f0 dd 00 00 00 00 00 00 00 00
Rain = 66857mm

I marked bytes 12,13,14 in bold.

For checking if the temperature is OK, there is the following function:
temp_ok = humidity_ok = msg[12] <= 0x99 && (msg[13] & 0xf0) <= 0x90;

In Message 1, 0xFF, 0xFB, 0x77 is clearly read false for "temp_ok"
In Message 2, 0x99, 0x7a, 0x94 are read true for "temp_ok" (which would be correct since this message comes after the wind/rain one)

For checking if the rain is OK, there is the following function:
rain_ok = msg[12] <= 0x99 && msg[13] <= 0x99 && msg[14] <= 0x99;

In Message 1, 0xFF, 0xFB, 0x77 is read true for "rain_ok"
In Message 2, 0x99, 0x7a, 0x94 is read true for "rain_ok"

The temperature (temp_raw) in this data example would be calculated as follows
900+90+7 = 997
997-1000 = -3 * 0.1f = -0.3°C

This is correct and was displayed on the indoor station, this poses a problem with the "rain_ok" check since it also calculates a rain level of 66857mm because the validity-check returns true.

Maybe an implementation of cross-check would help, but I'm not fully sure.
Example:
rain_ok = msg[12] <= 0x99 && msg[13] <= 0x99 && msg[14] <= 0x99 && !temp_ok;

Home Assistant: Client <unknown> disconnected due to protocol error.

Hi,
i have issues to connect the weatherstation to my Home Assistant by MQTT. Testing with the BresserWaetherSensorWaiting gives me perfect values. But when i try a MQTT connection, the Serial Monitor shows me a endless try to MQTT connect and in Home Assistant i get a "Client disconnected due to protocol error." message. Anyone else got it Working with Home Assistant?

BR

7in1 rain always 0.0

Context
BresserSensorMQTT

Describe the bug
Even if it rains, I receive 0.0.
The original display show the actual value like 4.0

Setting hostname on ESP8266 and ESP32 differs

Hi,

I have solved why in the default code setting the hostname on esp8266 is not working.

On esp32 this is required setting the hostname must before de WiFi.mode()

WiFi.hostname(Hostname);
WiFi.mode(WIFI_STA);

On the esp8266 it must be turn around

WiFi.mode(WIFI_STA);
WiFi.hostname(Hostname);

So maybe it can be done in the code to check the board and to the right order.

Optimize MQTT Public display?

Hello.

I noticed that the MQTT tree is not displayed optimally.
Image like ioBroker is displayed.
original

Better would be that the folder "data" the id or sensor name becomes
one level down the id or sensor name becomes data.
The level extra, radio & status should be displayed under id or sensor name, like.
angepasst

Proper location / include mechanism for WeatherSensorCfg.h?

WeatherSensorCfg.h should be modified for a specific sketch and therefore not be located in the library directory, but it has to be included both in the sketch and in the library.
Unfortunately, it is not found when the preprocessor tries to include it in the library (file WeatherSensor.h).
Any suggestions?

As a workaround, copy WeatherSensorCfg.h to the library's src/ directory, too.
Or copy all files to your sketch directory, e.g.:

BresserWeatherSensorMQTT.ino
secrets.h
WeatherSensorCfg.h
WeatherSensor.cpp
WeatherSensor.h

CC1101 & Esp8266

Hi,
first thanks a lot for the project.
Unfortunately I have troubles to get it working. I'm using a CC1101 together with a CH340 Node MCU V3 ESP8266. I believe I connected it correctly, as the sketch confirms successful connection. But I doesn't manage to process the data, and I'm currently not sure why.

18:13:05.690 -> success!
18:13:05.690 -> [CC1101] Setup complete - awaiting incoming messages...
18:13:06.214 -> ..............................[CC1101] Receive failed: [0]
18:13:20.982 -> ...................................[CC1101] Receive failed: [0]
18:13:38.162 -> ......................................[CC1101] Receive failed: [0]
18:13:57.106 -> ...................
18:14:06.094 -> Sensor timeout
18:14:06.715 -> ......[CC1101] Data: D4 CF 59 73 9B 64 83 58 FD BF FD 09 08 21 06 62 BB B0 5E 00 00 00 00 00 00 00 00
18:14:09.615 -> [CC1101] R [D4] RSSI: -87.5
18:14:09.615 -> Parity wrong at column 0
18:14:09.615 -> ........................[CC1101] Receive failed: [0]
18:14:21.631 -> ........................[CC1101] Receive failed: [0]
18:14:33.636 -> ...................................................[CC1101] Receive failed: [0]
18:14:59.071 -> .......[CC1101] Receive failed: [0]
18:15:02.499 -> .........
18:15:06.496 -> Sensor timeout
18:15:07.067 -> ......[CC1101] Receive failed: [0]
18:15:09.750 -> ....................................[CC1101] Receive failed: [0]
18:15:27.324 -> ..........................................[CC1101] Receive failed: [0]
18:15:48.310 -> ......................................
18:16:06.838 -> Sensor timeout
18:16:07.458 -> .....[CC1101] Data: D4 D6 A7 73 93 44 83 18 FC BD FC 13 58 20 86 64 BB B0 85 00 00 00 00 00 00 00 00
18:16:09.611 -> [CC1101] R [D4] RSSI: -88.5
18:16:09.611 -> Parity wrong at column 0
18:16:09.611 -> .......[CC1101] Receive failed: [0]
18:16:12.670 -> .[CC1101] Receive failed: [0]
18:16:12.956 -> ..................[CC1101] Data: D4 3F 82 73 93 44 83 18 FC BD FC 09 0C FF ED 8D FB 01 DB 00 00 00 00 40 00 00 00
18:16:21.640 -> [CC1101] R [D4] RSSI: -90.5
18:16:21.640 -> Parity wrong at column 0

Anything you can see I've done wrong? Thanks for your help!

Weather station 7002531

Hi,
i'm trying to use your code with a WeMos (non-official) D1 mini with CC1101.
My weather station is 7002531 and i try to get external sensor data ( temperature, humidity and wind ).
But impossible to launch, an error appear in the serial monitor. After some search on your Github page, another guy have the same problem ( _solution was change the power supply 5V USB : https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/12 ).
But in my case i want to monitor data and send it on my website with GET method.

Have you some solution to test CC1101 receptor with my bresser weather station external sensor ?
Thanks

This is my monitor message :

`Soft WDT reset

stack>>>

ctx: cont
sp: 3ffffdd0 end: 3fffffc0 offset: 01a0
3fffff70: 3ffee6f8 00000000 3ffee734 4020124d
3fffff80: 00000020 00000000 3ffeea38 40203d95
3fffff90: 3fffdad0 00000000 3ffeea38 40201051
3fffffa0: feefeffe feefeffe 3ffeea8c 40204590
3fffffb0: feefeffe feefeffe 3ffe85d8 40101281
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00045ac0
~ld
`

Help: Bresser 9602510, D1 mini, CC1101

Hi,
I would like to use your software to integrate a Bresser 9602510 (5in1) sensor via MQTT into my system.
I can't get it to work. I already stopped after "Starting execution..."

I followed your instructions. Modified WeatherSensorCfg.h (#define USE_CC1101) and compiled BresserWeatherSensorBasic without issues.
Wiring is according this diagram.
The original receiver gets data.
I assuming the sensor is broadcasting and don't have do be paired.
I assuming I do not have to provide the sensor type.

Can I check somehow if the CD1101 is working/wired correctly?

Thanks for your help,
Sebastian

Compile Output:

In file included from /home/setz/projekte/sketchbook/BresserWeatherSensorBasic/BresserWeatherSensorBasic.ino:54:
/home/setz/projekte/sketchbook/libraries/BresserWeatherSensorReceiver/src/WeatherSensorCfg.h:336:48: note: '#pragma message: Receiver chip: [CC1101]'
  336 | #pragma message("Receiver chip: " RECEIVER_CHIP)
      |                                                ^
/home/setz/projekte/sketchbook/libraries/BresserWeatherSensorReceiver/src/WeatherSensorCfg.h:337:170: note: '#pragma message: Pin config: RST->2, CS->15, GD0/G0/IRQ->4, GDO2/G1/GPIO->5'
  337 | #pragma message("Pin config: RST->" STR(PIN_RECEIVER_RST) ", CS->" STR(PIN_RECEIVER_CS) ", GD0/G0/IRQ->" STR(PIN_RECEIVER_IRQ) ", GDO2/G1/GPIO->" STR(PIN_RECEIVER_GPIO) )
      |                                                                                                                                                                          ^
. Variables and constants in RAM (global, static), used 29896 / 80192 bytes (37%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1496     initialized variables
╠══ RODATA   1584     constants       
╚══ BSS      26816    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 61719 / 65536 bytes (94%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     28951    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 249508 / 1048576 bytes (23%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     249508   code in flash   
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 84:cc:a8:b1:e1:87
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 285696 bytes to 209752...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 285696 bytes (209752 compressed) at 0x00000000 in 4.8 seconds (effective 480.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Serial Output:

sdl��|�d�|����$��c|������s�b�#��og�lng����c�8��dsdsdp�g�����d���b'�|������c��'o�$��l ����ng�l ���o;Ǜ�'�#l��$p�'���{���������cn�<��#��og��l ����gnd`���g{���g�c��`��{��g�c��`�����{���l`���o��dStarting execution...

image
image

7 in 1 not receiving data

Context

  • Which example sketch are you using?
    examples/BresserWeatherSensorMQTT
  • Which changes to the code did you make (if any)?
    USE_CC1101
  • Which sensor are you using?
    7in1 7003600GYE000

Describe the bug
CC1101 is not receiving data

To Reproduce
Steps to reproduce the behavior:
Upload sketch

Expected behavior
Receive data

Debug Log
If applicable, add log file to help explain your problem.

  • Build log file (enable verbose output in the Arduino IDE: File->Preferences - "Show verbose output during: compile")
/home/ben/.arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 -X utf8 -I /home/ben/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/tools/sizes.py --elf /tmp/arduino_build_487795/BresserWeatherSensorMQTT.ino.elf --path /home/ben/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin --mmu "-DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000"
. Variables and constants in RAM (global, static), used 32176 / 80192 bytes (40%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1696     initialized variables
╠══ RODATA   2984     constants       
╚══ BSS      27496    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 62951 / 65536 bytes (96%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     30183    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 290992 / 1048576 bytes (27%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     290992   code in flash   
Bibliothek ESP8266WiFi in Version 1.0 im Ordner: /home/ben/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/libraries/ESP8266WiFi  wird verwendet
Bibliothek MQTT in Version 2.5.1 im Ordner: /home/ben/Arduino/libraries/MQTT  wird verwendet
Bibliothek ArduinoJson in Version 6.21.2 im Ordner: /home/ben/Arduino/libraries/ArduinoJson  wird verwendet
Bibliothek BresserWeatherSensorReceiver in Version 0.9.0 im Ordner: /home/ben/Arduino/libraries/BresserWeatherSensorReceiver  wird verwendet
Bibliothek RadioLib in Version 6.0.0 im Ordner: /home/ben/Arduino/libraries/RadioLib  wird verwendet
Bibliothek SPI in Version 1.0 im Ordner: /home/ben/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/libraries/SPI  wird verwendet
22:22:39.684 -> SDK:2.2.2-dev(38a443e)/Core:3.1.1=30101000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386
22:22:39.684 -> 
22:22:39.684 -> 
22:22:39.684 -> BresserWeatherSensorMQTT 20221024
22:22:39.684 -> 
22:22:39.684 -> Attempting to connect to SSID: muhxnetworkfpm close 1 
22:22:39.684 -> mode : sta(8c:aa:b5:cb:65:bd)
22:22:39.684 -> add if0
22:22:39.784 -> ...scandone
22:22:43.500 -> state: 0 -> 2 (b0)
22:22:43.500 -> .state: 2 -> 3 (0)
22:22:43.533 -> state: 3 -> 5 (10)
22:22:43.533 -> add 0
22:22:43.533 -> aid 10
22:22:43.533 -> cnt 
22:22:43.632 -> 
22:22:43.632 -> connected with muhxnetwork, channel 11
22:22:43.632 -> dhcp client start...
22:22:43.665 -> ip:192.168.22.154,mask:255.255.255.0,gw:192.168.22.6
22:22:44.528 -> connected!
22:22:44.528 -> Checking wifi...
22:22:44.528 -> MQTT connecting... connected!
22:22:44.528 -> ESPWeather-CB65BD/status: online
22:22:44.528 -> [CC1101] Initializing ... 
22:22:44.694 -> success!
22:22:44.694 -> [CC1101] Setup complete - awaiting incoming messages...
22:22:53.521 -> pm open,type:2 0

Embedded Device (please complete the following information):

  • Arduino IDE Version: 1.8.19
  • ESP32/ESP8266 Board Support Package Version: [e.g. ESP32 2.0.7]
  • Library Version 0.9.0
  • Your Board: Wemos D1 mini
  • Selected Board in the Arduino IDE: [brand/model/version]
  • Your Radio Transceiver Module (if external): cc1101 868
  • Pinning/Wiring as in the example

Add Support for WALDBECK Huygens Weather Sensor

Hello,
I am trying work with a Waldbeck station.
I have an OLED TTGO LORA32 board.
I have this mistake.
Start run ...
[42] [E] [Weathersensor.cpp: 130] Begin (): [sx1276] Initializing error: [-104]

I read #41, but I'm not sure if it can work.

Best regards,
David.

The JSON string is not formed correctly (ID)

Describe the bug
there is an error in the generation of the JSON.
The ID can also contain letters (z.B. BF) and must be in "".

Client [ESPWeatherLSD-39B225] Cannot parse "ESPWeatherLSD-39B225/data/LSDWetterSensor": {"id":000000BF,"ch":0,"battery_ok":1,"temp_c":16.9,"humidity":59,"wind_gust":0.0,"wind_avg":0.4,"wind_dir":202.5,"rain":28.8,"rain_d":0.0,"rain_w":0.0,"rain_m":0.0}

The line 427 in the BresserWeatherSensorMQTTCustom.ino
old
sprintf(&mqtt_payload[strlen(mqtt_payload)], "\"id\":%08X", weatherSensor.sensor[i].sensor_id);
new
sprintf(&mqtt_payload[strlen(mqtt_payload)], "\"id\":\"%08X\"", weatherSensor.sensor[i].sensor_id);

LILYGO® TTGO LORA32 868/915Mhz ESP32 LoRa OLED - pinouts

The pinout for this device is different as the SX1278 is hardwired.
GPIO5 -- SX1278's SCK
GPIO19 -- SX1278's MISO
GPIO27 -- SX1278's MOSI
GPIO18 -- SX1278's CS
GPIO14 -- SX1278's RESET
GPIO26 -- SX1278's IRQ(Interrupt Request)

There doesn't seem to be a place to edit the default pins. The board is available in the Boards Manager but I'm not sure if that filters through to your code.

The MQTT output goes online then 25 seconds later goes to dead. I can't get the test versions to compile so not sure whether it an issue from the weather station to the radio or radio to ESP32. Any ideas?

[HELP] How to compile this correctly

Hello.

I could not find any instructions in the wiki on how to compile the software.

In the file "WeatherSensorCFG.h" I have defined my ESP8266, cc1101 and the 5in1 sensor.

Only how does it go on then?

Greetings Lothar

Improve example sketches' robustness of connecting to WiFi network

Is your feature request related to a problem? Please describe.
In certain cases, the example sketches hang in an infinite loop waiting for a WiFi connection, while the connection is made immediately after a reset.

Describe the solution you'd like
Add a retry counter and do a restart if the maximum number of retries is exceeded.

Bresser model 7 in 1 7003100CM3000

Hello.
I just bought this weather station and I would like to try the CC1101, but I don't know which one to buy. Can you tell me where to buy it? So I would test if it works, and I would indicate it here. Thank you.

Mosquitto MQTT as server does not work if no SSL is used

Describe the bug
If I compile your code and try without using ssl to connect to my mqtt server, the server response with a "socket error (unknown) on client"

To Reproduce
Steps to reproduce the behavior:

  1. Step1 'compile'
  2. Step2 'connect to a none secure mosquitto mqtt server.'
  3. See error

Expected behavior
Successfully connection to MQTT server without using ssl

It is working if I change the code to:
#elif defined(ESP8266)
// BearSSL::WiFiClientSecure net;
WiFiClient net;
&
#if (!defined(CHECK_PUB_KEY) and !defined(CHECK_CA_ROOT) and !defined(CHECK_FINGERPRINT))
// net.setInsecure();
#endif

Seems to be a problem using BearSSL::WiFiClientSecure net;

Br. Frank

BresserWeatherSensorReceiverBasic ESP32-WROVER-E with c1101

Hi,
I,m trying to use the BresserWeatherSensorReceiverBasic example with an ESP32-WROVER-E board in combination with a c1101 868 Mhz module. I'm using Arduino IDE 1.8 to compile the sketches.

I made the required changes in the WeathersensorCfg.h file to define the ESP32, c1101 and to define the pins as follows:

// Arduino default SPI pins
//
// Board   SCK   MOSI  MISO
// ESP8266 D5    D7    D6
// ESP32   D18   D23   D19


// Generic pinning for ESP32 development boards
#define PIN_RECEIVER_CS   5
// CC1101: GDO0 / RFM95W/SX127x: G0
#define PIN_RECEIVER_IRQ  21
// CC1101: GDO2 / RFM95W/SX127x: G1
#define PIN_RECEIVER_GPIO 4
// RFM95W/SX127x - GPIOxx / CC1101 - RADIOLIB_NC
#define PIN_RECEIVER_RST  32

First question I only have the following pins on the c1101 module: vcc, gnd, miso, mosi, gdo0, gdo2, csn, slck.
the above PIN_RECEIVER_RST 32 is not connected as this would be the 9th pin to connect, I only have 8 available?

when I compile and upload the following message appaers on terminal

[     4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   451][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
Starting execution...
[   458][D][WeatherSensor.cpp:85] begin(): [CC1101] Initializing ... 
[   558][E][WeatherSensor.cpp:129] begin(): [CC1101] Error initialising: [-2]

any idea what could be the issue or problem?
thanks in advance,
Bart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.