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

Iss194 reliable delivery batch upload #447

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
12 changes: 10 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

### Added

- #194 Reliable delivery of readings to MMW. Also called batch or queued messaege delivery. Readings can be queued for later send. This can accumulate a number of readings, and on sending to MMW if they don't receive a SUCCESS http 201, automatically go into a queue for next time a connection is made.
### Removed

### Fixed
- Fixed GitHub actions for pull requests from forks.

***


## [0.35.0]

### Added
- Support [GroPoint Profile GPLP-8 Eight-Segment Soil Moisture and Temperature Profiling Probe](https://www.gropoint.com/products/soil-sensors/gropoint-profile)

## [0.34.1]

### Changed
Expand All @@ -32,6 +37,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
By default, all polling is off, but polling is enabled for a modem sensor when a sensor is created and attached to a modem.
This functionailty is inspired from [neilh10](https://github.com/EnviroDIY/ModularSensors/commits?author=neilh10).

### Fixed
- Fixed GitHub actions for pull requests from forks.

## [0.34.0]

### Changed
Expand Down
5 changes: 5 additions & 0 deletions a/mayfly1_wifi_wroom/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
18 changes: 18 additions & 0 deletions a/mayfly1_wifi_wroom/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# DRWI Sites with a Mayfly 1.x and EnviroDIY ESP32 WiFi Bees <!-- {#example_drwi_mayfly1_wifi} -->
Alpha test sketch for transmitting over WiFi ESP32 WROOM

The hardware configuration used in this example:
* Mayfly v1.1 board
* EnviroDIY ESP32 WiFi module

This is used to intergrate in Reliable Delivery
https://github.com/EnviroDIY/ModularSensors/issues/194
Setup ms_cfg.h for your network parameters

230710 Overnight testing seemed to go well. Going to submit the PR
230709 - 24hrs expanded "AT" debug tty230708-1539_dvlp_esp32.txt
230708: Switched to 57600 to wroom and testing
230708: Initial Testing sames as S6B at 9600baud



7 changes: 7 additions & 0 deletions a/mayfly1_wifi_wroom/git_rev_macro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import subprocess

git_rev = str(subprocess.check_output(["git", "rev-parse","--abbrev-ref", "HEAD"]).strip())
git_usr = str(subprocess.check_output(["git", "config","user.name"]).strip())

print('-DPIO_SRC_REV={'+(''.join('0x%02x,' % ord(c) for c in git_rev) ) +'0x0}')
print('-DPIO_SRC_USR={'+(''.join('0x%02x,' % ord(c) for c in git_usr) ) +'0x0}')
204 changes: 204 additions & 0 deletions a/mayfly1_wifi_wroom/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[platformio]
description = enviroDIY/ModularSensors a\mayfly1_wifi_wroom
;src_dir =.
default_envs = mayfly

[common]
cmn_lib_deps=
; There are 3 levels of code production
; The stream ( rel1_dvlp1m) is used in alpha coding and development
; alpha - this platformio.ini - which enables (rel1_dvlp1m) editing in ModularSensors\src & a\ex
; development see (rel1_dvlp1m) examples\tu_ec
; production see (release1) examples\tu_ex
;
; For alpha coding,
; (2023-Jan-02 : this worked, however PIO can change, and now seems to be doing realtime analysis of dependencies)
; and periodically when need to update all libs including ModularSensors #rel1_dvlp1m
; for clean lib - delete .pio,
; pio pkg install - execute
; leave .pio/libdeps/xxx/EnviroDIY_modularSensors as doing realtime dependencie checks
;https://github.com/neilh10/ModularSensors#rel1_dvlp1m
https://github.com/EnviroDIY/ModularSensors.git#develop
; ^^ Use this when you want to pull from a specific branch
; These are latest beyond EnviroDIY releases
https://github.com/vshymanskyy/StreamDebugger ;Debug when needed
; StreamDebugger ; Same as above
;https://github.com/neilh10/SensorModbusMaster ; default release1
;https://github.com/enviroDIY/SensorModbusMaster
;https://github.com/neilh10/Adafruit_INA219.git
; del https://github.com/adafruit/SdFat ;- need adafruit/SdFat for multiple SDx
;https://github.com/greiman/SdFat.git ;-
;https://github.com/neilh10/EnableInterrupt - old v1.0.0 need v1.1
;https://github.com/GreyGnome/EnableInterrupt
; del https://github.com/arduino-libraries/NTPClient - repalced
;; see lib_samd_deps for Adafruit_SPIFlash & Adafruit_TinyUSB_Arduino & Adafruit-GFX-Library Adafruit_NeoPixel
; Need extra libs, so enable STD_LIBS on 1st pass enable ModularSensors then build pulling in ref libs,
;
; STD_LIBS pulled in by ModularSensors, needed if not enabling ModularSensors to Historical Ref
;https://github.com/soligen2010/Adafruit_ADS1X15
;https://github.com/adafruit/Adafruit_AM2315
;https://github.com/adafruit/Adafruit_AM2320
;https://github.com/adafruit/Adafruit_BME280_Library
;https://github.com/adafruit/Adafruit_MPL115A2
;https://github.com/adafruit/DHT-sensor-library
;https://github.com/adafruit/Adafruit_Sensor
;https://github.com/milesburton/Arduino-Temperature-Control-Library ;Pulls in DallasTemperature
;https://github.com/neilh10/KellerModbus
;https://github.com/EnviroDIY/KellerModbus
;https://github.com/NorthernWidget/MS5803
;https://github.com/PaulStoffregen/OneWire
;https://github.com/knolleary/pubsubclient.git
;bug https://github.com/EnviroDIY/TinyGSM.git ; bug EnviroDIY/ModularSensors/issues 311
;https://github.com/neilh10/TinyGSM.git#rel1 ;Bug fixes over Envirodiy
https://github.com/vshymanskyy/TinyGSM
;https://github.com/EnviroDIY/YosemitechModbus#develop ;https://github.com/EnviroDIY/YosemitechModbus/issues/32
https://github.com/neilh10/Arduino-SDI-12#release1
;https://github.com/EnviroDIY/Arduino-SDI-12.git bug with extraWakeTime=10
;https://github.com/EnviroDIY/Tally_Library.git#Dev_I2C
;
;Historical reference
;https://github.com/greiman/SdFat.git ;- need adafruit/SdFat for multiple SDx
;https://github.com/neilh10/STC3100arduino.git # For Mayfly board Knh002rev7
;https://github.com/neilh10/Arduino-SerialCommand
;https://github.com/neilh10/InsituModbus
;https://github.com/neilh10/KellerModbus

; Ignore these folders or PlatformIO will double count all the dependencies
; Development: ModularSensors Release1: src ?
; ?? .pioenvs, .piolibdeps, .vscode, include, doc, examples, sensor_tests, compile_tests, pioScripts
cmn_lib_ignore = .git, doc, examples, arduino_update, sensor_tests,
;EnviroDIY_DS3231
;SensorModbusMaster
Arduino-SDI-12
;TinyGSM
Adafruit_INA21
EnviroDIY_ModularSensors
ModularSensors

lib_avr_deps = ;Specific Mayfly board goes in [Mayfly]

; for development, can edit directly in these directories ... relative to src_dir
; Use the src filter to ensure subfolders are built
; If enabled, disable in cmn_lib_deps=[]ModularSensors, and may need to delete duplicate directory .libdeps/ModularSensors
cmn_src_filter = +<*> +<../../../src> +<../../../src/sensors> +<../../../src/publishers> +<../../../src/modems>

#build_flags -v for detailed cc verbose, single threaded takes a long time
cmn_build_flags =
-Isrc
-I../../src ; .h For easy debug
-I../../src/sensors ; .h For easy debug
!python git_rev_macro.py ;returns -DPIO_SRC_REV=<git_revision>
;-DMQTT_MAX_PACKET_SIZE=240
-DTINY_GSM_YIELD_MS=2
;-DTINY_GSM_RX_BUFFER=64 ;is this needed?
;-DNO_FIRST_SYNC_WITH_NIST
-DMS_NETWORK_LAYER
-DNIST_SYNC_HOURLY
-DMS_DISCARD_HTTP_500
;-DUSE_RTCLIB=RTC_DS3231 ;not compiling
;-DMS_TU_XX_DEBUG
;-DMS_TU_XX_DEBUG_DEEP
;-DSTREAMDEBUGGER_DBG
;-DMS_DUMP_FREE_RAM
;-DMS_TTY_USER_INPUT
;-DSerialCommand_inFlash ;requires MS_TTY_USER_INPUT
;-DMS_TTY_INPUT_COUNT ;only if no MS_TTY_USER_INPUT
;-DSERIALCOMMAND_DEBUG
-DMS_LOGGERBASE_POSTS
;-DMS_LOGGERBASE_SLEEP_DEBUG ;Need or below
;-DMS_LOGGERBASE_DEBUG
;-DMS_LOGGERBASE_DEEP_DEBUG
;-DMS_LOGGERMODEM_DEBUG
;-DMS_LOGGERMODEM_DEBUG_DEEP
;-DMS_SENSORBASE_DEBUG
;-DMS_VARIABLEARRAY_DEBUG
;-DMS_VARIABLEARRAY_DEBUG_DEEP
;-DMS_VARIABLEBASE_DEBUG
;-DMS_VARIABLEBASE_DEBUG_DEEP
;-DMS_DATAPUBLISHERBASE_DEBUG
;-DMS_ENVIRODIYPUBLISHER_DEBUG
;-DMS_THINGSPEAKPUBLISHER_DEBUG
;-DMS_UBIDOTSPUBLISHER_DEBUG
;-DMS_DIGIXBEEWIFI_DEBUG
;-DMS_DIGIXBEEWIFI_DEBUG_DEEP
;-DMS_DIGIXBEECELLULARTRANSPARENT_DEBUG
;-DMS_DIGIXBEECELLULARTRANSPARENT_DEBUG_DEEP
;-DMS_DIGIXBEE_DEBUG
;-DTINY_GSM_DEBUG=Serial
;-DTinyGsmClientXbee_DBG=Serial
;-DMS_ESPRESSIFESP8266_DEBUG
;-DMS_ESPRESSIFESP8266_DEBUG_DEEP
;-DMS_STSTC3100SENSOR_DEBUG
;-DMS_BATTERYMANAGEMENT_DEBUG
;-DMS_PROCESSORSTATS_DEBUG
;-DMS_PROCESSORADC_DEBUG
;-DMS_TIINA219M_DEBUG
;-DMS_AOSONGAM2315_DEBUG
;-DMS_EXTERNALVOLTAGE_DEBUG
;-DMS_EXTERNALVOLTAGE_DEBUG_DEEP
;-DMS_KELLERPARENT_DEBUG
;-DMS_KELLERPARENT_DEBUG_DEEP has problem
;-DMS_MODBUS_DEBUG
-DSENSORMODBUSMASTER_NO_DBG
;-DMS_ANALOGELECCONDUCTIVITY_DEBUG
;-DMS_ANALOGELECCONDUCTIVITY_DEBUG_DEEP
;-DMS_SDI12SENSORS_DEBUG ;LT500 sometimes responding
;-DMS_SDI12SENSORS_DEBUG_DEEP
;For -DMS_SDI12 options: NONE or MS_SDI12_SINGLE_LINE_RESPONSE OR MS_SDI12_NON_CONCURRENT not BOTH
;-DMS_SDI12_SINGLE_LINE_RESPONSE
;-DMS_SDI12_NON_CONCURRENT
;-DENVIRODIY_SDI12_USE_CRC
;-DMS_ENVIRODIYPUBLISHER_DEBUG
;-DMS_ENVIRODIYPUBLISHER_DEBUG_DEEP
;-DSodaq_DS3231_DEBUG
-DMS_WATCHDOGAVR_DEBUG
-DMS_WATCHDOGAVR_DEBUG_DEEP

[env:mayfly]
;upload_port = COM11
monitor_speed = 115200
board = mayfly
platform = atmelavr
framework = arduino
;debug_tool = blackmagic
;debug_port = test01u:4242

lib_compat_mode = strict
lib_ldf_mode = deep+
lib_ignore = ${common.cmn_lib_ignore}, RTCZero
build_src_filter = ${common.cmn_src_filter}
;build_unflags = -Os
build_flags =
${common.cmn_build_flags}
-DSDI12_EXTERNAL_PCINT
-DNEOSWSERIAL_EXTERNAL_PCINT
-fmax-errors=5
;-Wl,-Map,.pio/build/mayfly/firmware.map

lib_deps =${common.cmn_lib_deps} ${common.lib_avr_deps}
;https://github.com/neilh10/AltSoftSerial ; Need this for managing pwr - data pin off as well.
;https://github.com/PaulStoffregen/AltSoftSerial.git
;
;https://github.com/EnviroDIY/SoftwaterSerial_ExternalInts.git
;https://github.com/SRGDamia1/NeoSWSerial.git
;https://github.com/neilh10/Sodaq_DS3231#release1 ; Bug fix #34 - change to RTClibnh with DS3231

monitor_filters = log2file, default, time
;
; The following monitor_flags setting is needed becasue in transparent mode the XBee3
; uses CR line endings instead of the more typical CR+LF. This setting enables you
; to see all back and forth communication.
; (https://www.envirodiy.org/topic/connecting-xbee3-lte-to-the-internet/#post-13312)
monitor_flags =
--eol
CR
Loading