BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
Install / Use
/learn @matthias-bs/BresserWeatherSensorLWREADME
BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 — sends data to a LoRaWAN Network
Moreover, this project provides a base for a generic LoRaWAN device, which transmits sensor data, digital or analog input signals.
This was originally a remake of BresserWeatherSensorTTN based on RadioLib instead of MCCI Arduino LoRaWAN Library for LoRaWAN communication.
Important Notes
-
This should not be the first Arduino sketch you are ever trying to flash to your board - try something simple first (e.g.
blink.ino) to get familiar with the tools and workflow. -
If you are new to LoRaWAN
- Check out The Things Fundamentals on LoRaWAN
- Read the excellent article RadioLib LoRaWAN on TTN starter script
-
You need RadioLib v7.5.0 or later
-
You need espressif/arduino-esp32 v3.X.Y
-
Try and configure BresserWeatherSensorReceiver (examples/BresserWeatherSensorBasic) stand-alone before using it with BresserWeatherSensorLW
-
While the software has quite many configuration options, most users won't need any or just a few. See Required Configuration for the bare minimum configuration (and maybe Default Parameter Values & Default Configuration).
Features
- Single 868 MHz Radio Transceiver for both Sensor Data Reception and LoRaWAN Connection
- Protocols supported by RadioLib
- LoRaWAN Specification 1.1.0
- LoRaWAN Specification 1.0.4
- RP001 Regional Parameters 1.1 revision B
- RP002 Regional Parameters 1.0.4
- Tested with The Things Network, ChirpStack and Helium IoT
- Supports multiple 868 MHz Sensors (e.g. Weather Sensor and Soil Moisture Sensor or Indoor Thermometer/Hygrometer)
- See BresserWeatherSensorReceiver for supported sensors
- Low Power Design (using ESP32 Deep Sleep Mode / RP2040 Sleep State)
- Fast LoRaWAN Joining after Deep Sleep (using ESP32 RTC RAM / RP2040 RAM)
- ATC MiThermometer Bluetooth Low Energy Thermometer/Hygrometer Integration (optional)
- Theengs Decoder Bluetooth Low Energy Sensors Integration (optional)
- OneWire Temperature Sensor Integration (optional)
- ESP32/RP2040 Analog Digital Converter Integration (optional)
- A02YYUW / DFRobot SEN0311 Ultrasonic Distance Sensor (30...4500mm) (optional)
- DYP-R01CW / DFRobot SEN0590 Laser Distance Sensor (20...4000mm) (optional, supports multiple sensors)
- Remote Configuration via LoRaWAN Downlink
- Easy Sensor Data Uplink Payload Configuration
- Implementation with Separation between LoRaWAN Network Layer and Application Layer for easy Repurposing
- Loading of LoRaWAN Secrets from JSON File on LittleFS (optional)
- Loading of Hardware/Deployment specific Configuration Parameters from JSON file on LittleFS (optional)
- External RTC (with Backup Battery) Integration (optional)
- GPS Receiver as alternative Time Source (optional)
- LoRaWAN Codec API compliant Uplink/Downlink Payload Formatters
Contents
- LoRaWAN Uplink Messages
- Supported Hardware
- LoRaWAN Network Service Configuration
- Software Build Configuration
- LoRaWAN Payload Formatters
- MQTT Integration
- Datacake Integration
- Remote Configuration Commands / Status Requests via LoRaWAN
- Scanning for Sensors
- Loading LoRaWAN Network Service Credentials from File
- Loading LoRaWAN Node Configuration from File
- Payload Configuration
- Customizing the Application Layer
- Implementation
- Doxygen Generated Source Code Documentation
- References
- Legal
LoRaWAN Uplink Messages
With the default configuration, the device will periodically send 3 different uplink messages. The LoRaWAN Node Status message and the Application Layer / Sensor Status message can be disabled by setting the corresponding interval to zero.
Sensor Data Message
- Payload: see Default Configuration
- Port: 1
- Interval: ~
<sleep_interval>/<sleep_interval_long>(depending on battery voltage); see Default Parameter Values
LoRaWAN Node Status Message
-
Payload:
| Signal | description | Unit | Type | Bytes | | ------------------------- | ------------------------------------- | ------- | ----------- | ----- | | ubatt_mv | Battery Voltage | mv | uint16 | 2 | | long_sleep | Flag: Long sleep time (energy saving) | — | uint8 | 1 | | PowerFeather specific | | usupply_mv | Supply Voltage (VDC or USB input) | mv | uint16 | 2 | | isupply_ma | Supply Current (VDC or USB input) | mA | int16 | 2 | | isupply_ma | Battery Current | mA | int16 | 2 | | soc | Battery State of Charge | % | uint8 | 1 | | soh | Battery State of Health | % | uint8 | 1 | | battery_cycles | Estimated Battery Cycles | — | uint16 | 2 | | batt_time_min | Estimated time to charge/discharge | min | int32 | 4 | | batt_temp_c | Battery Temperature | °C | temperature | 2 |
The data types are implemented in lora-serialization and the [Payload Formatters]
(#lorawan-payload-formatters). int16 and int32 are extensions in the payload formatter for signed integers (implemented as uint<16|32> + offset).
- Port:
CMD_GET_LW_STATUS - Interval:
<lw_status_interval>(uplink frames); see Default Parameter Values
Application Layer / Sensor Status Massage
- Payload: Bresser/BLE Sensor Battery Status (Bitmap)
- Port:
CMD_GET_SENSORS_STAT - Interval:
<app_status_interval>
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
