Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ESP32 Example - Backport from matthias-bs/BresserWeatherSensorTTN with fixes and additional features #211

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

matthias-bs
Copy link
Contributor

If debug output is implemented with a callback (myEventLog.logEvent()), its contents, formatting and debug port should entirely be defined there. Specifically, I am using the logging macros from https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-log.h in my logEvent() implementation.

Currently, there is still some output from the library itself, which results in some minor inconsistencies.

E.g.

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 -> 

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

@matthias-bs
Copy link
Contributor Author

Updated arduino_lorawan_esp32_example to use any LoRaWAN network supported by the library.

@terrillmoore
Copy link
Member

terrillmoore commented Mar 7, 2023 via email

@matthias-bs
Copy link
Contributor Author

Moved example sketch modifications to separate PR as proposed.

@terrillmoore
Copy link
Member

I forgot that I never moved this library to V1, so we don't have to do a major bump (not required by semver if version is 0). However, we should change the version to 0.10. The way to do this in a pr is:

  1. change line 37 of Arduino_LoRaWAN.h to:
    ARDUINO_LORAWAN_VERSION_CALC(0, 10, 0, 1) /* v0.10.0-pre1 */
  2. Also change library.properties to match and the change log in README.md.
  3. send the PR
  4. get the PR merged
  5. Iterate with any other changes, incrementing the pre-release field.
  6. Send another PR requesting release of 0.10.0, and changing line 37 to:
    ARDUINO_LORAWAN_VERSION_CALC(0, 10, 0, 0) /* v0.10.0 */
  7. Find previous release tickets and do the other work indicated there (tweaking badges, etc.)
  8. The merge of the release PR is accompanied by creating a release tag on github; which will cause users of the Arduino tooling to get updated.

@matthias-bs
Copy link
Contributor Author

I tried to follow this procedure in #214

@terrillmoore
Copy link
Member

Yes, thanks, I saw. Let me know which PR you'd like to merge first, and let me know when you're done on a given PR; don't want do to things in the wrong order or prematurely. You'll probably have to rebase your other branches (for the version change) as we move forward, but that's relatively painless.

@matthias-bs
Copy link
Contributor Author

Please merge #214 first. Then I will update #215. Then I will try to modify #211 maintain backwards-compatibility.
Thanks in advance!

@terrillmoore
Copy link
Member

OK, #214 is merged. For #211, since it's officially pre-release and we're bumping the version number, no need to really worry; go ahead and take out the prints.

@matthias-bs
Copy link
Contributor Author

ESP32 Example - Backport from matthias-bs/BresserWeatherSensorTTN with fixes and additional features

@matthias-bs matthias-bs changed the title Removed Serial.print() calls in Arduino_LoRaWAN::cEventLog::processSingleEvent() Updated ESP32 Example - Backport from matthias-bs/BresserWeatherSensorTTN with fixes and additional features Sep 7, 2023
@matthias-bs
Copy link
Contributor Author

matthias-bs commented Sep 7, 2023

New Features

  • Time keeping with RTC and synchronization to network time
  • Wake-up to fixed time scheme (sleep time is adjusted to current up time)
  • Added energy saving modes
    • Switching to SLEEP_INTERVAL_LONG if battery voltage < BATTERY_WEAK
    • Entering sleep mode if battery voltage < BATTERY_LOW
  • Generic ADC functions (e.g. for analog sensor inputs)
  • Debug output uses Arduino logging functions, i.e. debug level set in Arduino IDE is used
  • Remote configuration via LoRaWAN downlink
    • CMD_SET_SLEEP_INTERVAL
    • CMD_SET_SLEEP_INTERVAL_LONG
    • CMD_SET_DATETIME
  • Remote status request via LoRaWAN downlink - subsequent response uplink
    • CMD_GET_CONFIG
    • CMD_GET_DATETIME
  • Pin configurations for several ESP32 boards
  • Support for Raspberry Pi Pico RP2040 (Adafruit Feather RP2040 with FeatherWing LoRa Radio)
  • Example Javascript uplink/downlink formatters for The Things Network

matthias-bs and others added 6 commits October 4, 2023 22:52
Replaced DEBUG_PRINTF/DEBUG_PRINTF_TS by macros log_i/../log_d/log_v
Added support for Adafruit Feather RP2040 with RFM95W FeatherWing
Renamed FIREBEETLE_COVER_LORA in FIREBEETLE_ESP32_COVER_LORA
Improved config for Firebeetle Cover LoRa and
Adafruit Feather ESP32-S2 (default battery voltage thresholds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants