SkillAgentSearch skills...

BresserWeatherSensorTTN

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver based on ESP32 and RFM95W/SX1276 - sends data to a LoRaWAN Network (e.g. The Things Network)

Install / Use

/learn @matthias-bs/BresserWeatherSensorTTN

README

BresserWeatherSensorTTN

CI GitHub release License: MIT

[!WARNING] This repository is deprecated and has been archived and set to read-only.

The recommended alternative is BresserWeatherSensorLW which provides more features and has a much cleaner architecture.

The underlying LoRaWAN libraries MCCI LoRaWAN LMIC library and MCCI Arduino LoRaWAN Library seem not to be maintained any longer.

Bresser 5-in-1/6-in-1/7-in-1 868 MHz Weather Sensor Radio Receiver based on ESP32 and RFM95W/SX1276 - sends data to a LoRaWAN Network (e.g. The Things Network) Support for RP2040 (Arduino-Pico) has been added recently.

The RFM95W/SX1276 radio transceiver is used in FSK mode to receive weather sensor data and in LoRaWAN mode to connect to a LoRaWAN Network.

Auxiliary sensor data can be integrated via Bluetooth Low Energy (BLE), OneWire, UART, analog/digital inputs etc.

Features

Supported Hardware

See The Things Network's Big ESP32 + SX127x topic part 2 for some hardware options.

See Leonel Lopes Parente's collection of LoRa development boards pinout-diagrams.

Recommended Hardware

Beginners

LILYGO® TTGO LORA32

You get a fully functional board (including antenna) which does not require any additional wiring for a reasonable price!

Advanced

ESP32 Module

DFRobot FireBeetle ESP32 IoT (DFR0478) recomended due to its good low power design.

RFM95W- or SX1276-based Radio Transceiver Module

or

Antenna

Power Supply

Mains adapter or Li-Ion battery (with or without solar charger) - depending on desired operation time and duty cycle.

Software Build Setup

  • Install the Arduino ESP32 board package in the Arduino IDE -<br> Note: When using the ESP32 board package >=V2.0.5, you have to apply two fixes in arduino-lorawan and arduino-lmic, respectively (see below)

  • Select the desired ESP32 board

  • Install all libraries as listed in the section Library Dependencies via the Arduino IDE Library Manager

  • Configure Arduino/libraries/MCCI_LoRaWAN_LMIC_library/project_config/lmic_project_config.h:

    • select you appropriate region
    • #define CFG_sx1276_radio 1
  • Add the following line to Arduino/libraries/MCCI_LoRaWAN_LMIC_library/project_config/lmic_project_config.h:

    #define LMIC_ENABLE_DeviceTimeReq 1

    (Otherwise requesting the time from the LoRaWAN network will not work, even if supported by the network.)

  • Apply fixes if using ESP32 board package >= v2.0.5

    • https://github.com/mcci-catena/arduino-lorawan/pull/204 (fixed in mcci-catena/arduino-lorawan v0.10.0)
    • https://github.com/mcci-catena/arduino-lmic/issues/714#issuecomment-822051171
  • Clone (or download and unpack) the desired BresserWeatherSensorTTN release (Releases)

  • Load the sketch BresserWeatherSensorTTN.ino from the BresserWeatherSensorTTN directory

  • Compile

Library Dependencies

| Library | r: required /<br>o: optional | | ---------------------------------- | ---------------------------- | | MCCI Arduino Development Kit ADK | r | | MCCI LoRaWAN LMIC library | r | | MCCI Arduino LoRaWAN Library | r | | RadioLib | r | | LoRa_Serialization | r | | ESP32Time | r | | BresserWeatherSensorReceiver | r | | Preferences | r (RP2040) | | OneWireNg | o | | DallasTemperature | o | | NimBLE-Arduino + ATC_MiThermometer | o | | NimBle-Arduino + Theengs Decoder | o | | DistanceSensor_A02YYUW | o |

See package.json for required/tested versions.

Software Customization

Configure the LoRaWAN Network settings APPEUI, DEVEUI and APPKEY

  • First you have to follow your LoRaWAN Network provider's instructions on how to configure/obtain the settings.
  • Then configure the BresserWeatherSensorTTN software accordingly:
    • Solution 1 (not recommended): Configure the section starting with // APPEUI, DEVEUI and APPKEY in BresserWeatherSensorTTN.ino
    • Solution 2 (recommended): Configure the file secrets.h - refer to secrets.h.template as an example --
      #define SECRETS
      
      // deveui, little-endian
      static const std::uint8_t deveui[] = { 0xAA, 0xBB, 0xCC, 0x00, 0x00, 0xDD, 0xEE, 0xFF };
      
      // appeui, little-endian
      static const std::uint8_t appeui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
      
      // appkey: just a string of bytes, sometimes referred to as "big endian".
      static const std::uint8_t appkey[] = { 0x11, 0x22, 0x33, 0
      
View on GitHub
GitHub Stars23
CategoryDevelopment
Updated1y ago
Forks9

Languages

C++

Security Score

80/100

Audited on Nov 22, 2024

No findings