Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: matthias-bs/BresserWeatherSensorReceiver
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.28.7
Choose a base ref
...
head repository: matthias-bs/BresserWeatherSensorReceiver
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jun 20, 2024

  1. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    c4c9d67 View commit details
  2. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    39980f4 View commit details
  3. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    44f7af5 View commit details
  4. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    5baf83d View commit details
  5. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    5c4b3b3 View commit details
  6. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    e14088c View commit details
  7. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    2348889 View commit details
  8. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    26007f3 View commit details
  9. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    321d2f4 View commit details
  10. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    9d01907 View commit details
  11. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    0169904 View commit details
  12. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    3d02800 View commit details
  13. Update README.md

    matthias-bs authored Jun 20, 2024
    Copy the full SHA
    d87a94e View commit details

Commits on Jul 1, 2024

  1. Create data_storage.txt

    matthias-bs authored Jul 1, 2024
    Copy the full SHA
    e7d9502 View commit details
  2. Create reception+filtering.txt

    matthias-bs authored Jul 1, 2024
    Copy the full SHA
    2aca1df View commit details

Commits on Jul 2, 2024

  1. Fixed handling of empty list of IDs / 0x00000000 in Preferences (#180)

    matthias-bs authored Jul 2, 2024
    Copy the full SHA
    9f62f65 View commit details
  2. Update CI.yml

    matthias-bs authored Jul 2, 2024
    Copy the full SHA
    5382004 View commit details
  3. Update package.json

    matthias-bs authored Jul 2, 2024
    Copy the full SHA
    80b5c59 View commit details

Commits on Jul 16, 2024

  1. Fix invalid battery flag (#185)

    Update BresserWeatherSensorBasic.ino
    matthias-bs authored Jul 16, 2024
    Copy the full SHA
    6694ff1 View commit details

Commits on Jul 17, 2024

  1. Feat scan sensors (#187)

    * Added struct Sensor.decoder
    * Added option to skip initialization of include/exclude list in begin()
    matthias-bs authored Jul 17, 2024
    Copy the full SHA
    ff450b6 View commit details

Commits on Jul 30, 2024

  1. Update README.md

    matthias-bs authored Jul 30, 2024
    Copy the full SHA
    174432e View commit details

Commits on Sep 4, 2024

  1. Added generic target ARDUINO_ESP32S3_DEV (#192)

    matthias-bs authored Sep 4, 2024
    Copy the full SHA
    1466b26 View commit details

Commits on Sep 10, 2024

  1. Heltec: Fixed pin definitions (#194)

    matthias-bs authored Sep 10, 2024
    Copy the full SHA
    a257639 View commit details

Commits on Sep 17, 2024

  1. Update CI.yml

    matthias-bs authored Sep 17, 2024
    Copy the full SHA
    3a31788 View commit details

Commits on Sep 22, 2024

  1. Update CI.yml

    matthias-bs authored Sep 22, 2024
    Copy the full SHA
    8e3595f View commit details

Commits on Oct 1, 2024

  1. Update CI.yml

    matthias-bs authored Oct 1, 2024
    Copy the full SHA
    2b41c33 View commit details

Commits on Oct 28, 2024

  1. Update CI.yml

    matthias-bs authored Oct 28, 2024
    Copy the full SHA
    7c24ffc View commit details
  2. Update library.properties

    matthias-bs authored Oct 28, 2024
    Copy the full SHA
    3d30850 View commit details
  3. Update package.json

    matthias-bs authored Oct 28, 2024
    Copy the full SHA
    fb78fb9 View commit details
  4. Update CI.yml

    matthias-bs authored Oct 28, 2024
    Copy the full SHA
    6c886a6 View commit details

Commits on Oct 30, 2024

  1. Add pin definitions for Maker Go ESP32C3 Supermini with Heltec HT-RA62 (

    matthias-bs authored Oct 30, 2024
    Copy the full SHA
    12d0558 View commit details

Commits on Nov 10, 2024

  1. Update CI.yml

    matthias-bs authored Nov 10, 2024
    Copy the full SHA
    0701ca7 View commit details
  2. Update arduino-lint.yml

    matthias-bs authored Nov 10, 2024
    Copy the full SHA
    5f7150f View commit details

Commits on Nov 11, 2024

  1. Update CI.yml

    matthias-bs authored Nov 11, 2024
    Copy the full SHA
    0945236 View commit details

Commits on Nov 14, 2024

  1. Add run time configuration of sensor_ids_inc/sensor_ids_exc via MQTT (#…

    …198)
    
    Added configuration of sensor include/exclude list via MQTT
    matthias-bs authored Nov 14, 2024
    Copy the full SHA
    60edb54 View commit details

Commits on Nov 23, 2024

  1. Update CI.yml

    matthias-bs authored Nov 23, 2024
    Copy the full SHA
    21e56b7 View commit details
  2. Update package.json

    matthias-bs authored Nov 23, 2024
    Copy the full SHA
    bc21cd8 View commit details

Commits on Nov 30, 2024

  1. Added Heltec Vision Master T190 (#204)

    matthias-bs authored Nov 30, 2024
    Copy the full SHA
    e85d07d View commit details

Commits on Dec 1, 2024

  1. Update CI.yml

    matthias-bs authored Dec 1, 2024
    Copy the full SHA
    617a1f1 View commit details

Commits on Dec 8, 2024

  1. [Frequency] Added an option to set a frequency offset (#207)

    Some CC1101 are crappy and don't work exactly on 868.3 Mhz although set.
    Mine e.g. needs a setting of 868.35 to see my sender properly.
    This adds a parameter to begin() to specify the offset.
    ThomasKeil authored Dec 8, 2024
    Copy the full SHA
    54f30b8 View commit details
  2. Update WeatherSensor.h

    matthias-bs authored Dec 8, 2024
    Copy the full SHA
    d599693 View commit details
  3. Update WeatherSensor.cpp

    matthias-bs authored Dec 8, 2024
    Copy the full SHA
    f54228c View commit details
  4. [Debugging] Prevent #define of CORE_DEBUG_LEVEL if already defined el…

    …sewhere (#208)
    
    This enables you #define the desired debug level in your source-file or
    build flags.
    ThomasKeil authored Dec 8, 2024
    Copy the full SHA
    7e3ea30 View commit details
  5. Update WeatherSensorCfg.h.template

    matthias-bs authored Dec 8, 2024
    Copy the full SHA
    05c6753 View commit details
  6. Update WeatherSensorCfg.h

    matthias-bs authored Dec 8, 2024
    Copy the full SHA
    224196c View commit details

Commits on Dec 10, 2024

  1. Update Makefile

    matthias-bs authored Dec 10, 2024
    Copy the full SHA
    f2a7ccf View commit details
  2. Update Makefile

    matthias-bs authored Dec 10, 2024
    Copy the full SHA
    1bca47c View commit details

Commits on Dec 14, 2024

  1. Fixed a bug reset reason handling on ESP8266 platform in BresserWeath…

    …erSensorMQTTWifiMgr.ino (#209)
    
    @ThomasKeil Thanks again!
    ThomasKeil authored Dec 14, 2024
    Copy the full SHA
    efd7547 View commit details
  2. [Typos] Fixed some minor typos (#210)

    ThomasKeil authored Dec 14, 2024
    Copy the full SHA
    91dd04c View commit details

Commits on Dec 16, 2024

  1. Added LilyGo T3 S3 (#212)

    * Added pin definitions for Lilygo T3-S3 (SX1262/SX1276/LR1121)
    * Added Lilygo T3 S3 LR1121
    * Added Lilygo T3 S3 SX1262
    matthias-bs authored Dec 16, 2024
    Copy the full SHA
    1e1126f View commit details
Showing with 1,509 additions and 1,246 deletions.
  1. +11 −8 .github/workflows/CI.yml
  2. +1 −1 .github/workflows/arduino-lint.yml
  3. +0 −25 .travis.yml
  4. +1 −1 BUILD.md
  5. +60 −7 README.md
  6. +25 −1 examples/BresserWeatherSensorBasic/BresserWeatherSensorBasic.ino
  7. +10 −0 examples/BresserWeatherSensorCallback/BresserWeatherSensorCallback.ino
  8. +6 −0 examples/BresserWeatherSensorDomoticz/BresserWeatherSensorDomoticz.ino
  9. +85 −11 examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino
  10. +93 −14 examples/BresserWeatherSensorMQTTCustom/BresserWeatherSensorMQTTCustom.ino
  11. +80 −34 examples/BresserWeatherSensorMQTTCustom/src/WeatherSensor.cpp
  12. +65 −8 examples/BresserWeatherSensorMQTTCustom/src/WeatherSensor.h
  13. +197 −232 examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorCfg.h
  14. +101 −19 examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorConfig.cpp
  15. +24 −6 examples/BresserWeatherSensorMQTTCustom/src/WeatherSensorDecoders.cpp
  16. +38 −2 examples/BresserWeatherSensorMQTTCustom/src/WeatherUtils.cpp
  17. +27 −1 examples/BresserWeatherSensorMQTTCustom/src/WeatherUtils.h
  18. +83 −11 examples/BresserWeatherSensorMQTTWifiMgr/BresserWeatherSensorMQTTWifiMgr.ino
  19. +12 −0 examples/BresserWeatherSensorOptions/BresserWeatherSensorOptions.ino
  20. +16 −2 examples/BresserWeatherSensorTest/BresserWeatherSensorTest.ino
  21. +13 −0 extras/hw_test/docs/flowcharts/data_storage.txt
  22. +20 −0 extras/hw_test/docs/flowcharts/reception+filtering.txt
  23. +10 −3 library.properties
  24. +5 −5 package.json
  25. +1 −1 src/Lightning.cpp
  26. +81 −33 src/WeatherSensor.cpp
  27. +65 −8 src/WeatherSensor.h
  28. +197 −232 src/WeatherSensorCfg.h
  29. +0 −552 src/WeatherSensorCfg.h.template
  30. +102 −20 src/WeatherSensorConfig.cpp
  31. +24 −6 src/WeatherSensorDecoders.cpp
  32. +32 −1 src/WeatherUtils.cpp
  33. +23 −1 src/WeatherUtils.h
  34. +1 −1 test/Makefile
19 changes: 11 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -19,12 +19,15 @@ jobs:
#- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_V1
#- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_V2
- esp32:esp32:ttgo-lora32:Revision=TTGO_LoRa32_v21new
- esp32:esp32:lilygo_t3s3:Revision=Radio_SX1262
- esp32:esp32:lilygo_t3s3:Revision=Radio_SX1276
- esp32:esp32:lilygo_t3s3:Revision=Radio_LR1121
- esp32:esp32:heltec_wireless_stick
- esp32:esp32:heltec_wifi_lora_32_V2
- esp32:esp32:heltec_wifi_lora_32_V3
- esp32:esp32:adafruit_feather_esp32s2
- esp32:esp32:featheresp32
- esp32:esp32:m5stack_core2
#- esp32:esp32:m5stack_core2
#- esp32:esp32:esp32s3_powerfeather
- esp8266:esp8266:generic:dbg=Disabled
- esp8266:esp8266:generic:dbg=Serial
@@ -99,19 +102,19 @@ jobs:
run:
|
ps -p "$$"
arduino-cli lib install RadioLib@6.6.0
arduino-cli lib install "LoRa Serialization"@3.1.0
arduino-cli lib install RadioLib@7.1.2
arduino-cli lib install "LoRa Serialization"@3.3.1
arduino-cli lib install MQTT@2.5.2
arduino-cli lib install ArduinoJson@7.0.4
arduino-cli lib install ArduinoJson@7.3.0
arduino-cli lib install WiFiManager@2.0.17
arduino-cli lib install ESP_DoubleResetDetector@1.3.2
arduino-cli lib install Preferences@2.1.0
# The following libs are only needed for M5Stack Core2
arduino-cli lib install M5Unified@0.1.16
arduino-cli lib install M5Core2@0.1.9
arduino-cli lib install M5GFX@0.1.16
arduino-cli lib install M5Unified@0.2.1
arduino-cli lib install M5Core2@0.2.0
arduino-cli lib install M5GFX@0.2.0
# Only ESP32-S3 PowerFeather
arduino-cli lib install powerfeather-sdk@1.0.5
arduino-cli lib install powerfeather-sdk@1.0.7

- name: Install platform
if: ${{ env.run-build == 'true' }}
2 changes: 1 addition & 1 deletion .github/workflows/arduino-lint.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@v1
- uses: arduino/arduino-lint-action@v2
with:
library-manager: update
# compliance: strict
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ You can of course copy the **secrets** to `secrets.h` and make your changes ther
```
#define SECRETS
```
**Note:** The define `SECRET`has been renamed to `SECRETS`for consistency.
**Note:** The define `SECRET` has been renamed to `SECRETS` for consistency.

8. Now you want to save your changes. You will be asked to select a new directory, because the example resides in the Arduino/libraries folder which is treated as read-only:

67 changes: 60 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Badge is not updated any more!
[![arduino-library-badge](https://www.ardu-badge.com/badge/BresserWeatherSensorReceiver.svg?)](https://www.ardu-badge.com/BresserWeatherSensorReceiver)
-->

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
Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver for Arduino based on CC1101, SX1276/RFM95W, SX1262 or LR1121

**See the [Wiki](https://github.com/matthias-bs/BresserWeatherSensorReceiver/wiki) for additional information.**

@@ -40,13 +40,14 @@ To allow automatic handling of all Bresser weather station variants, the decoder
| 7803200 | Weather Sensor | decodeBresser**7In1**Payload() |
| 7003300 | Weather Station | decodeBresser**7In1**Payload() |
| 7803300 | Weather Sensor | decodeBresser**7In1**Payload() |
| 7003150 | 8-in-1 Weather Station | decodeBresser**7In1**Payload() **5)** |

Some guesswork:

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

@@ -58,11 +59,27 @@ Some guesswork:

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

**5)** The value `tglobe_c` is preliminary, see https://github.com/matthias-bs/BresserWeatherSensorReceiver/issues/220

> [!NOTE]
> Weather sensors which are using the 6-in-1 protocol are actually transmitting two different kind of messages alternately:
> 1. Temperature, Humidity, Wind and Battery status
> 2. Wind and Rain
>
> All other sensors/protocols are transmitting a single type of message which contains a complete set of data.
>
> The behavior described above can be observed with [BresserWeatherSensorBasic](examples/BresserWeatherSensorBasic), which just shows each message as it is received by using the function [`getMessage()`](https://matthias-bs.github.io/BresserWeatherSensorReceiver/class_weather_sensor.html#a05fbfc16fb2e13543591cb0b3cd8baaf).
>
> The other examples are using the function [`getData()`](https://matthias-bs.github.io/BresserWeatherSensorReceiver/class_weather_sensor.html#a558191760f9d9b9bf12f79f6f3e5370a),
which buffers and combines messages from the 6-in-1 protocol until a complete set of data — with some configuration options regarding *completeness*, see [BresserWeatherSensorOptions](examples/BresserWeatherSensorOptions) — is available.

## Contents

* [Configuration](#configuration)
* [Predefined Board Configurations](#predefined-board-configurations)
* [User-Defined Configuration](#user-defined-configuration)
* [Rain Statistics](#rain-statistics)
* [Lightning Sensor Post-Processing](#lightning-Sensor-post-processing)
* [SW Examples](#sw-examples)
* [BresserWeatherSensorBasic](#bresserweathersensorbasic)
* [BresserWeatherSensorWaiting](#bresserweathersensorwaiting)
@@ -102,6 +119,8 @@ If this is not what you need, you have to switch to **Manual Configuration**
| [LILYGO®TTGO-LORA32 V1](https://github.com/Xinyuan-LilyGo/TTGO-LoRa-Series) | "TTGO LoRa32-OLED" | "TTGO LoRa32 V1 (No TFCard)" | ARDUINO_TTGO_LORA32_V1 | SX1276 (HPD13A) | - |
| [LILYGO®TTGO-LORA32 V2](https://github.com/LilyGO/TTGO-LORA32) | "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](https://www.lilygo.cc/products/lora3?variant=42272562282677) | "TTGO LoRa32-OLED" | "TTGO LoRa32 V2.1 (1.6.1)" | ARDUINO_TTGO_LoRa32_v21new | SX1276 (HPD13A) | - |
| [LILYGO®T3 S3 SX1262](https://lilygo.cc/products/t3s3-v1-0?variant=42586879721653) | "LilyGo T3-S3" | "Radio-SX1262" | ARDUINO_LILYGO_T3S3_SX1262 | SX1262 | - |
| [LILYGO®T3 S3 LR1121](https://lilygo.cc/products/t3-s3-lr1121) | "LilyGo T3-S3" | "Radio-LR1121" | ARDUINO_LILYGO_T3S3_LR1121 | LR1121 | - |
| [Heltec Wireless Stick](https://heltec.org/project/wireless-stick/) | "Heltec Wireless Stick" | n.a. | ARDUINO_HELTEC_WIRELESS_STICK | SX1276 | - |
| [Heltec Wireless Stick V3](https://heltec.org/project/wireless-stick-v3/) | "Heltec Wireless Stick" | n.a. | ARDUINO_HELTEC_WIRELESS_STICK_V3 | SX1262 | - |
| [Heltec WiFi LoRa 32 V2](https://heltec.org/project/wifi-lora-32/) | "Heltec WiFi LoRa 32(V2)" | n.a. | ARDUINO_HELTEC_WIFI_LORA_32_V2 | SX1276 | - |
@@ -130,9 +149,9 @@ Pin config: RST->0 , CS->6 , GD0/G0/IRQ->5 , GDO2/G1/GPIO->11

See `WeatherSensorCfg.h` for configuration options.

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

SX1276 is compatible with RFM95W and HPD13A.
RFM95W, HPD13A and RA-01H are compatible with SX1276.

* Set the I/O pinning according to your hardware

@@ -141,9 +160,9 @@ See `WeatherSensorCfg.h` for configuration options.
| 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`.
* Data from multiple sensors can be received by setting `MAX_SENSORS_DEFAULT` to an appropriate value in `WeatherSensorCfg.h`.

e.g. `#define NUM_SENSORS 1`
e.g. `#define MAX_SENSORS_DEFAULT 1`

* The sensors to be handled can be configured by two ways:
* Add any unwanted sensor IDs to the exclude list `SENSOR_IDS_EXC`
@@ -158,6 +177,40 @@ See `WeatherSensorCfg.h` for configuration options.

e.g. `//#define BRESSER_LEAKAGE`

See [How Sensor Reception works](https://github.com/matthias-bs/BresserWeatherSensorReceiver/wiki/02.-How-Sensor-Reception-works) for a detailed description.

## Rain Statistics

The weather sensors transmit the accumulated rainfall since the last battery change or reset. This raw value is provided as `rain_mm`. To provide the same functionality as the original weather stations, the class `RainGauge` (see
[RainGauge.h](src/RainGauge.h))
is used to calculate
* hourly (past 60 minutes) rainfall,
* daily rainfall,
* weekly rainfall,
* and monthly rainfall.

These values are named `rain_h`, `rain_d`, `rain_w` and `rain_m` in the MQTT software examples.

> [!NOTE]
> Time and date must be set correctly in order to reset the daily, weekly and monthly rain values correctly.
> This is achieved by setting the real time clock (RTC) from an available time source, e.g. via SNTP from a network time server if the device has internet connection via WiFi.
> The user must set the appropriate time zone (`TZ_INFO`) in the sketch.
See
[Implementing Rain Gauge Statistics](https://github.com/matthias-bs/BresserWeatherSensorReceiver/wiki/04.-Implementing-Rain-Gauge-Statistics) for more details.

## Lightning Sensor Post-Processing

The lightning sensor transmits the accumulated number of strikes and the estimated distance from the storm front (at the time of the last strike) at an interval. The post-processing algorithm implemented in the class `Lightning` (see
[Lightning.h](src/Lightning.h)) calculates the number of events during the past 60 minutes — using the same algorithm as the rain statistics — and stores information of the last event:
* Timestamp (UTC),
* Estimated distance and
* Number of strikes since the previous event.

> [!NOTE]
> Time and date must be set correctly in order to store the timestamp.
> This is achieved by setting the real time clock (RTC) from an available time source, e.g. via SNTP from a network time server if the device has internet connection via WiFi.
## SW Examples

### [BresserWeatherSensorBasic](https://github.com/matthias-bs/BresserWeatherSensorReceiver/tree/main/examples/BresserWeatherSensorBasic)
26 changes: 25 additions & 1 deletion examples/BresserWeatherSensorBasic/BresserWeatherSensorBasic.ino
Original file line number Diff line number Diff line change
@@ -50,6 +50,8 @@
// 20231025 Added Bresser Air Quality (Particulate Matter) Sensor decoder
// 20240209 Added Leakage, Air Quality (HCHO/VOC) and CO2 Sensors
// 20240213 Added PM1.0 to Air Quality (Particulate Matter) Sensor decoder
// 20240716 Fixed output of invalid battery state with 6-in-1 decoder
// 20250127 Added Globe Thermometer Temperature (8-in-1 Weather Sensor)
//
// ToDo:
// -
@@ -87,12 +89,25 @@ void loop()
int decode_status = ws.getMessage();

if (decode_status == DECODE_OK) {
char batt_ok[] = "OK ";
char batt_low[] = "Low";
char batt_inv[] = "---";
char * batt;

if ((ws.sensor[i].s_type == SENSOR_TYPE_WEATHER1) && !ws.sensor[i].w.temp_ok) {
// Special handling for 6-in-1 decoder
batt = batt_inv;
} else if (ws.sensor[i].battery_ok) {
batt = batt_ok;
} else {
batt = batt_low;
}
Serial.printf("Id: [%8X] Typ: [%X] Ch: [%d] St: [%d] Bat: [%-3s] RSSI: [%6.1fdBm] ",
static_cast<int> (ws.sensor[i].sensor_id),
ws.sensor[i].s_type,
ws.sensor[i].chan,
ws.sensor[i].startup,
ws.sensor[i].battery_ok ? "OK " : "Low",
batt,
ws.sensor[i].rssi);

if (ws.sensor[i].s_type == SENSOR_TYPE_LIGHTNING) {
@@ -203,6 +218,15 @@ void loop()
else {
Serial.printf("Light: [--.-klx] ");
}
if (ws.sensor[i].s_type == SENSOR_TYPE_WEATHER2) {
if (ws.sensor[i].w.tglobe_ok) {
Serial.printf("T_globe: [%3.1fC] ",
ws.sensor[i].w.tglobe_c);
}
else {
Serial.printf("T_globe: [--.-C] ");
}
}
#endif
Serial.printf("\n");

Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@
// 20220815 Changed to modified WeatherSensor class; added support of multiple sensors
// 20221227 Replaced DEBUG_PRINT/DEBUG_PRINTLN by Arduino logging functions
// 20240507 Added configuration of maximum number of sensors at run time
// 20250127 Added Globe Thermometer Temperature (8-in-1 Weather Sensor)
//
// ToDo:
// -
@@ -188,6 +189,15 @@ void loop()
{
Serial.printf("Light: [--.-Klux] ");
}
if (ws.sensor[i].s_type == SENSOR_TYPE_WEATHER2) {
if (ws.sensor[i].w.tglobe_ok) {
Serial.printf("T_globe: [%3.1fC] ",
ws.sensor[i].w.tglobe_c);
}
else {
Serial.printf("T_globe: [--.-C] ");
}
}
#endif
Serial.printf("\n");

Original file line number Diff line number Diff line change
@@ -608,6 +608,12 @@ void loop()
#ifdef LED_EN
pinMode(LED_GPIO, INPUT);
#endif
// Note:
// Further reduction of sleep current might be possible by
// controlling the GPIO pins (including SPI CS) appropriately.
// This depends on the actual board/radio chip used.
// See
// https://github.com/jgromes/RadioLib/discussions/1375#discussioncomment-11763846
weatherSensor.sleep();
ESP.deepSleep(SLEEP_INTERVAL * 1000);
}
Loading