Coder Social home page Coder Social logo

matthias-bs / bresserweathersensorttn Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 9.0 1.52 MB

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)

License: MIT License

Ruby 0.02% C++ 53.83% C 10.27% JavaScript 33.53% Python 2.35%
arduino arduino-pico ble bluetooth bluetooth-low-energy esp32 esp32-arduino helium-network lorawan lorawan-application rp2040 thethingsnetwork ttn-application

bresserweathersensorttn's People

Contributors

dependabot[bot] avatar matthias-bs avatar

Stargazers

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

Watchers

 avatar  avatar

bresserweathersensorttn's Issues

Implement wake-up to fixed time scheme

For a receiving endpoint (e.g. MQTT client), it would be beneficial if the transmission would follow a predictable schedule. This would reduce uptime waiting for an incoming message.
Since the sensor RF message reception and LoRaWAN join/rejoin/transmit time varies, the sleep time would have to be adjusted for each cycle to provide wake-up at fixed intervals with respect to the full hour.

Wrong RPS information in debug output

After changing debug printing to the Arduino logging functions, wrong RPS (radio parameter selections) is printed in the debug output, i.e. ... rps=0x01 (SF7 BW125... is printed even if other values are actually used (according to the network provider's console).

Thingpulse ePulse Feather & Adafruit LoRa Radio FeatherWing Battery Power Stability

The Thingpulse ePulse Feather & Adafruit LoRa Radio FeatherWing setup works as expected when powered via USB port.

When powered from the battery connector (CN1 in the schematic - net label VBAT), the brownout detection is triggered after initialization of the LoRa radio in case the battery voltage is below ~4.0 V. This is indicated by the message Brownout detector was triggered in the serial console.

Adding a small electrolytic capacitor (0.22 or 2.2µF) to either VBAT, VBUS or 3V3 [with jumper wires] did not solve the issue.

It it is expected that operation from a lithium-ion battery is possible at least down to ~3.6 V.

Wrong Soil Moisture Value

The Soil Moisture Sensor value is not plausible.

Bug in BresserWeatherSensorTTN.ino:
encoder.writeUint8(weatherSensor.sensor[s1].humidity);
-- should read
encoder.writeUint8(weatherSensor.sensor[s1].moisture);

Unused variable in ESP32AnalogRead.h

An unused variable in ESP32AnalogRead causes the CI to fail:

/home/runner/Arduino/libraries/ESP32AnalogRead/ESP32AnalogRead.cpp: In member function 'uint16_t ESP32AnalogRead::readRaw()':
/home/runner/Arduino/libraries/ESP32AnalogRead/ESP32AnalogRead.cpp:576:11: error: unused variable 'voltage' [-Werror=unused-variable]
  uint32_t voltage = 0;
           ^~~~~~~
cc1plus: some warnings being treated as errors

Inadvertent change of sleep duration

prefs.sleep_interval is read from Preferences in setup() (with a default value of SLEEP_INTERVAL).
When prefs.sleep_interval is read in prepareSleep(), its value sometimes has changed due to an unknown reason.

This is presumably caused by a buffer overflow.

Add support for arduino-pico / RP2040 - full features

Open issues

  • Saving LoRaWAN network session state using Preferences ✅
  • Sleep mode with wake-up by RTC ✅
  • HW real-time clock setting ✅
  • Time-keeping after wake-up/reset* ✅
    -> epoch time is stored in a watchdog SCRATCH register temporarily during reset
  • Preferences (testing) ✅

*) RP2040 RTC is reset by SW-reset!

Firebeetle LoRa Cover

Firebeetle LoRa Cover on Firebeetle ESP32 with nss->27/D4, rst->25/D2, DIO0->26/D3, DIO1->9/D5, DIO2->LMIC_UNUSED_PIN

When compiled and uploaded the board boot/rst loops.
`rst:0x3 (SW_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1412
load:0x40078000,len:13400
load:0x40080400,len:3672
entry 0x400805f8
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1412
load:0x40078000,len:13400
load:0x40080400,len:3672
entry 0x400805f8
ets Jun 8 2016 00:22:57`

Full Compile Output
`G:\My Drive\Arduino\Smart Cities\BresserWeatherSensorTTN-main\BresserWeatherSensorTTN\BresserWeatherSensorTTN.ino:166:6: warning: #warning "LMIC_ENABLE_DeviceTimeReq is not set - will not be able to retrieve network time!" [-Wcpp]
#warning "LMIC_ENABLE_DeviceTimeReq is not set - will not be able to retrieve network time!"
^~~~~~~
G:\My Drive\Arduino\Smart Cities\BresserWeatherSensorTTN-main\BresserWeatherSensorTTN\BresserWeatherSensorTTN.ino:691:3: warning: #warning "You must replace the values marked FILLMEIN with real values from the TTN control panel!" [-Wcpp]

warning "You must replace the values marked FILLMEIN with real values from the TTN control panel!"

^~~~~~~
In file included from c:\Users\cow5038\Documents\Arduino\libraries\BresserWeatherSensorReceiver\src/Lightning.h:63,
from G:\My Drive\Arduino\Smart Cities\BresserWeatherSensorTTN-main\BresserWeatherSensorTTN\BresserWeatherSensorTTN.ino:160:
c:\Users\cow5038\Documents\Arduino\libraries\BresserWeatherSensorReceiver\src/WeatherSensorCfg.h:164:140: note: #pragma message: LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)
#pragma message("LORAWAN_NODE defined; assuming this is the LoRaWAN_Node board (DFRobot Firebeetle32 + Adafruit RFM95W LoRa Radio)")
^
c:\Users\cow5038\Documents\Arduino\libraries\BresserWeatherSensorReceiver\src/WeatherSensorCfg.h:491:48: note: #pragma message: Receiver chip: [SX1276]
#pragma message("Receiver chip: " RECEIVER_CHIP)
^
c:\Users\cow5038\Documents\Arduino\libraries\BresserWeatherSensorReceiver\src/WeatherSensorCfg.h:492:170: note: #pragma message: Pin config: RST->12, CS->14, GD0/G0/IRQ->4, GDO2/G1/GPIO->16
#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) )
^
G:\My Drive\Arduino\Smart Cities\BresserWeatherSensorTTN-main\BresserWeatherSensorTTN\BresserWeatherSensorTTN.ino:271:119: note: #pragma message: FIREBEETLE_COVER_LORA defined; assuming FireBeetle ESP32 with FireBeetle Cover LoRa will be used
#pragma message("FIREBEETLE_COVER_LORA defined; assuming FireBeetle ESP32 with FireBeetle Cover LoRa will be used")
^
G:\My Drive\Arduino\Smart Cities\BresserWeatherSensorTTN-main\BresserWeatherSensorTTN\BresserWeatherSensorTTN.ino:272:85: note: #pragma message: Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1
#pragma message("Required wiring: D2 to RESET, D3 to DIO0, D4 to CS, D5 to DIO1")
^
c:\Users\cow5038\Documents\Arduino\libraries\MCCI_LoRaWAN_LMIC_library\src\hal\getpinmap_thisboard.cpp: In function 'const Arduino_LMIC::HalPinmap_t* Arduino_LMIC::GetPinmap_ThisBoard()':
c:\Users\cow5038\Documents\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")`

request for adding heltec-wifi-lora-32-v3 as supported board

Hi Matthias,
​you know from other experiences with me, I'm not an expert in that world.
What do you think about adding the heltec-wifi-lora-32-v3 card as a supported card too?
You can use me, my board and my weather station as testers, :-) .
Let me know.
Many thanks for your time. Davide

RPS debug logging output format not as desired

The debug output format for RPS information does not match other debug messages:

10:42:46.290 -> [ 47074][D][BresserWeatherSensorTTN.ino:820] NetTxComplete(): 
10:42:46.290 -> 41359 ms:[ 47090][I][BresserWeatherSensorTTN.ino:772] operator()(): TX @41359 ms: ch=2 rps=0x03 (SF9 BW125 CR 4/5 Crc IH=0)
10:42:46.290 -> 

(Preceeding extra timestamp 41359ms:, extra line-feed.)

This is due to the fact that there are still Serial.print() calls in ~/Arduino/libraries/MCCI_Arduino_LoRaWAN_Library/src/lib/arduino_lorawan_cEventLog.cpp even if debug output is implemented in the sketch with the myEventLog.logEvent() function. (see Arduino_LoRaWAN::cEventLog::processSingleEvent())

arduino_lorawan_cEventLog.cpp#L88

Add define for ePulse Feather VBAT Monitoring Voltage Divider

Problem

While the Thingpulse ePulse Feather – Low Power ESP32 development board is (mostly) pin compatible to the Adafruit HUZZAH32 - ESP32 Feather, the VBAT monitoring voltage divider is different:

ePulse Feather
grafik

Huzzah32 ESP32 Feather

100k/100k (1:1 divider - as all other development boards seen so far)

Workaround

Since there is no "Thingpulse ePulse Feather" board definition in the Arduino ESP32 Board Package (AFAIK), users would typically select "Adafruit ESP23 Feather" instead.

A define has to be added to the sketch to distinguish the two boards accordingly.

Guru Meditation Error with v2.0.x of Arduino core for the ESP32

After getting the build process with v2.0.x to work, I got the following run time error (the same code works fine with v1.0.6):

[...]
23:14:20.569 -> Indoor Humidity:     56.8 %
23:14:20.569 -> 
23:14:20.569 -> Guru Meditation Error: Core  1 panic'ed (LoadStoreError). Exception was unhandled.
23:14:20.569 -> 
23:14:20.569 -> Core  1 register dump:
23:14:20.569 -> PC      : 0x400d3df3  PS      : 0x00060b30  A0      : 0x800d3e77  A1      : 0x3ffcf4e0  
23:14:20.603 -> A2      : 0x40030a4e  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00387313  
23:14:20.603 -> A6      : 0xfffffffc  A7      : 0x00000003  A8      : 0x00000000  A9      : 0x3ffc3694  
23:14:20.603 -> A10     : 0x00000010  A11     : 0x00000016  A12     : 0x00000000  A13     : 0x00040df7  
23:14:20.603 -> A14     : 0x63ffffff  A15     : 0x00000003  SAR     : 0x0000001b  EXCCAUSE: 0x00000003  
23:14:20.636 -> EXCVADDR: 0x40030a4e  LBEG    : 0x400d3da4  LEND    : 0x400d3e02  LCOUNT  : 0x00000004  
23:14:20.636 -> 
23:14:20.636 -> 
23:14:20.636 -> Backtrace:0x400d3df0:0x3ffcf4e00x400d3e74:0x3ffcf510 0x400d383b:0x3ffcf610 0x400d3912:0x3ffcf630 0x400d3954:0x3ffcf650 0x400d4d9e:0x3ffcf670 0x400d6325:0x3ffcf690 0x400d6636:0x3ffcf6b0 0x400d78d8:0x3ffcf6d0 0x400d3c93:0x3ffcf6f0 0x400d2ea1:0x3ffcf710 0x400e3908:0x3ffcf730 
23:14:20.636 -> 
23:14:20.636 -> 
23:14:20.636 -> 
23:14:20.636 -> 
23:14:20.636 -> ELF file SHA256: 0000000000000000

Kommerzielle Nutzung

Hallo,
Darf man das Projekt bei Kommerziellen allerdings nicht Gewinnbringenden Projekten Nutzen?
Projekt siehe: hsn-ttn.de
Danke

Unused variable in OneWire

An unused variable in OneWire causes the CI to fail:

/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::reset()':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:167:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'void OneWire::write_bit(uint8_t)':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:201:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
/home/runner/Arduino/libraries/OneWire/OneWire.cpp: In member function 'uint8_t OneWire::read_bit()':
/home/runner/Arduino/libraries/OneWire/OneWire.cpp:229:24: error: unused variable 'reg' [-Werror=unused-variable]
  volatile IO_REG_TYPE *reg IO_REG_BASE_ATTR = baseReg;
                        ^~~
cc1plus: some warnings being treated as errors

As a workaround ONEWIRE_EN is disabled in BresserWeatherSensorTTNCfg.h.

Device_Time_Req not working with Helium Network

Getting time and date via Device_Time_Req MAC command does not work with the Helium Network.
According to the Helium console, the command is received, but there is no suitable response.
_Helium_Device_Time_Req

Thus, Rain Data Statistics will not work with Helium until an alternative way to set the Real Time Clock has been implemented.

Wrong author in references

Hi, I'm not the author of Theengs Decoder, as is now shown in the references, but just a minor contributor. Maybe change the author to "the Theengs project"?

Outputting Bresser data on TTGO ESP32 OLED board

Hi Matthias,
I have used your code, and also that of @Uspizig to output the bresser data on the screen of the ESP32 board.
I have put the code in my own repository here: https://github.com/mczakk/TTGO-ESP32-Bresser-with-display
I am struggling to extract the current time as generated by the function 'printDateTime' (line 975)so that I can print it on the screen (line 1533)
I tried to put in a public function (lines 985 - 996) to store the value of tbuf, but it doesnt seem to work :(
Could you possibly advise?

Many Thanks

Error compiled

Guten morgen,
ich hab das ganze in PlatformIO importiert.
Allerdings bekomme ich:
In file included from C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:142:0:
lib/BresserWeatherSensorReceiver-main/src/WeatherSensor.h:196:25: error: 'NUM_SENSORS' was not declared in this scope
sensor_t sensor[NUM_SENSORS]; //!< sensor data array
^
lib/BresserWeatherSensorReceiver-main/src/WeatherSensor.h: In member function 'void WeatherSensor::clearSlots(uint8_t)':
lib/BresserWeatherSensorReceiver-main/src/WeatherSensor.h:218:30: error: 'NUM_SENSORS' was not declared in this scope
for (int i=0; i< NUM_SENSORS; i++) {
^
lib/BresserWeatherSensorReceiver-main/src/WeatherSensor.h:219:40: error: 'sensor' was not declared in this scope
if ((type == 0xFF) || (sensor[i].s_type == type)) {
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino: In member function 'void cSensor::setup(uint32_t)':
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:931:44: error: 'class WeatherSensor' has no member named 'sensor'
if ((ws > -1) && weatherSensor.sensor[ws].valid && weatherSensor.sensor[ws].rain_ok) {
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:931:78: error: 'class WeatherSensor' has no member named 'sensor'
if ((ws > -1) && weatherSensor.sensor[ws].valid && weatherSensor.sensor[ws].rain_ok) {
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:932:58: error: 'class WeatherSensor' has no member named 'sensor'
rainGauge.update(timeinfo, weatherSensor.sensor[ws].rain_mm, rg_overflow);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino: In member function 'void cSensor::doUplink()':
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1102:70: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Air Temperature: % 3.1f °C\n", weatherSensor.sensor[ws].temp_c);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1103:69: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Humidity: %2d %%\n", weatherSensor.sensor[ws].humidity);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1104:66: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Rain Gauge: %7.1f mm\n", weatherSensor.sensor[ws].rain_mm);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1105:71: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Wind Speed (avg.): %3.1f m/s\n", weatherSensor.sensor[ws].wind_avg_meter_sec_fp1/10.0);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1106:71: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Wind Speed (max.): %3.1f m/s\n", weatherSensor.sensor[ws].wind_gust_meter_sec_fp1/10.0);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1107:68: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Wind Direction: %4.1f °\n", weatherSensor.sensor[ws].wind_direction_deg_fp1/10.0);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1115:72: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Soil Temperature 1: % 3.1f °C\n", weatherSensor.sensor[s1].temp_c);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1116:71: error: 'class WeatherSensor' has no member named 'sensor'
DEBUG_PRINTF("Soil Moisture 1: %2d %%\n", weatherSensor.sensor[s1].moisture);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:173:51: note: in definition of macro 'DEBUG_PRINTF'
#define DEBUG_PRINTF(...) { DEBUG_PORT.printf(VA_ARGS); }
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1170:51: error: 'class WeatherSensor' has no member named 'sensor'
(s1 > -1) ? weatherSensor.sensor[s1].valid : false,
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1171:51: error: 'class WeatherSensor' has no member named 'sensor'
(s1 > -1) ? weatherSensor.sensor[s1].battery_ok : false,
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1172:51: error: 'class WeatherSensor' has no member named 'sensor'
(ws > -1) ? weatherSensor.sensor[ws].valid : false,
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1173:51: error: 'class WeatherSensor' has no member named 'sensor'
(ws > -1) ? weatherSensor.sensor[ws].battery_ok : false);
^
C:/Users/laval/Documents/PlatformIO/Projects/Bresser_TTN/src/BresserWeatherSensorTTN.ino:1178:48: error: 'class WeatherSensor' has no member named 'sensor'
encoder.writeTemperature(weatherSensor.sensor[ws].temp_c);

Was habe ich vergessen einzustellen?
Danke

LoraData too long

Hi,

if some sensors are not available and commented out, the data sent to LoRaWAN is too long.

The reason is obvious:
// Schedule transmission
if (! myLoRaWAN.SendBuffer(
loraData, sizeof(loraData), ...

Change sizeof(loraData) to encoder.getLength() should give a better result.

Regards,
Jens

Handling of shared rain / temperature&humidity data (6-in-1 protocol)

Hi Matthias,

this is more a question, not an issue - hopefully. The rain counter of my sensor is wrong in LoRaWAN.

The sensor 6in1 sends two different packets every 12s:

  • one has temp/hum information
  • one has rain information

You mention this in the software, but how do you handle it? Your sensor module sets rain_ok OR temp_ok, but you always send both information to LoraWAN. I think, I missed a detail...

Second thing: I'm using the rtl_433-software on RPi to decode the same sensor and send results to my local MQTT broker. So I'm somewhat familiar with the sources. RTL_433 decides with msg[12] == 0xFF, if it is rain or temp/hum data. I've seen you have made a correction yesterday, but are you sure, that you always get only rain OR temp/hum?

Best Regards,
Jens.

Add compile time option: transmit uplink payload only if sensor data valid

Currently the uplink payload is sent regardless of the sensor data validation. This decision was made to be able to check if the node is working and if the uplink is reliable.
However, depending on the application it could be desired to send only valid sensor data.
Alternatively, a short status message (~1 byte) could be sent on a second FPort.

Add support for A02YYUW Waterproof Ultrasonic Sensor

A02YYUW Waterproof Ultrasonic Sensor

Arduino library: DistanceSensor_A02YYUW

Measuring Applications:

  • Snow Depth
  • Water Gauge
  • Fill Level
  • ...

For battery operation, the sensor power supply must be switched to reduce power consumption in sleep mode.

For integration of multiple sensors, the outputs could be connected with a multiplexer (e.g. 74HC151 8-Line To 1-Line Data Selectors/Multiplexers or 74HC153 Dual 4-Line To 1-Line Data Selectors/Multiplexers) to the ESP32 UART RX input.

TTGO LoRa32-OLED V1 Configuration

Hi Matthias - me again!
I have complied and uploaded this code to my esp32 (TTGO LoRa32-OLED V1 with

// Enable debug mode (debug messages via serial port)
// Arduino IDE: Tools->Core Debug Level: "Debug|Verbose"
#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_DEBUG
//#define CORE_DEBUG_LEVEL ARDUHAL_LOG_LEVEL_VERBOSE

defined, but am not seeing anything in the serial monitor.
how can i check that the board is recieving the data from the bresser?

Cheers
Matt

Add energy saving / low battery mode

Energy saving: If battery voltage decreases to a certain level, increase sleep interval.

Low battery mode: If battery voltage reaches a critical level, enter sleep mode immediately after wake-up and voltage measurement.

Issues after updating libraries

Hi Matthias,
tried to update my esp32 today , simply to change one line of text on the OLED display, but now it appears that the code will not compile at all. I have installed all the latest for weathersensorreciever and weathersensor, but once i click upload the ide hangs at this point:
Screenshot_2023-07-24_17-47-33
I have tried selectin both TTGO LoRA32 v2 and TTGO LoRa32 V2 (1.61) (the correct one) in the board revision, both with the same result!
I did managed some sucess earlier, but the screen wasn't working, nor was the board sending to TTN. this screenshot shows the serial output from such an attempt:
Screenshot_2023-07-24_17-53-52

Any Advice would be greatly appreciated

Linker error with v2.0.x of Arduino core for the ESP32

There is a naming conflict between MCCI_LoRaWAN_LMIC_library and Arduino core for the ESP32. The symbol hal_init is defined twice which causes a linker error. As a workaraound, v1.0.6 of the Arduino core for ESP32 must be used.

/home/runner/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/runner/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32/lib/libpp.a(hal_mac.o): in function `hal_init':
(.text.hal_init+0xb4): multiple definition of `hal_init'; /tmp/arduino-sketch-3B10729107F9600CD77F61B8D0ED78E7/libraries/MCCI_LoRaWAN_LMIC_library/hal/hal.cpp.o:/home/runner/Arduino/libraries/MCCI_LoRaWAN_LMIC_library/src/hal/hal.cpp:416: first defined here
collect2: error: ld returned 1 exit status

Error during build: exit status 1

Wrong rain counter values

          Unfortunately i think there is a bit of an issue with the decoder! I decided to test the device by adding a little water to the rain counter, I made it tip four times. the 'rain_mm' value went from 910.0mm to 910,7999 (perfectly normal), the others ......

air_temp_c: 2.5
humidity: 93
id: 939865349
rain_day: -33619248
rain_hr: -107481312
rain_mm: 910.7999877929688
rain_mon: -33619248
rain_week: -33619248
status: object
supply_v: 284
wind_avg_meter_sec: 0
wind_direction_deg: 354
wind_gust_meter_sec: 0

not sure whats going on here!, maybe you can shed a little light?

Originally posted by @mczakk in #38 (comment)

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.