Skip to content

Releases: EnviroDIY/ModularSensors

v0.37.0

25 Sep 15:54

Choose a tag to compare

Note

This release has changes to nearly every file in the entire library (ie, hundreds of files).
Many of the changes are spelling and typo fixes found by implementing CSpell code spell checking.
All header files were also modified to include the new library configuration headers.

Changed

  • BREAKING Converted the watch-dog classes in to static classes with all static function and a deleted constructor.
    • Any code that attempted to interact with the watchdog (ie, with a "complex loop") must now call the extendedWatchDog class directly, ie: extendedWatchDog::resetWatchDog(); rather than dataLogger.watchDogTimer.resetWatchDog();
  • BREAKING Renamed markedLocalEpochTime to markedLocalUnixTime to clarify the start of the epoch that we're marking down.
  • BREAKING Renamed markedUTCEpochTime to markedUTCUnixTime to clarify the start of the epoch that we're marking down.
  • Potentially BREAKING: Changed the requirements for a "sane" timestamp to between 2025 and 2035.
    • Moved the value for the sane range into two defines: EARLIEST_SANE_UNIX_TIMESTAMP and LATEST_SANE_UNIX_TIMESTAMP so they can be more easily modified and tracked.
      These defines can be set in the ModSensorConfig.h file.
  • Potentially BREAKING: For calculated variables, the calculation function will only be called if getValue(true) or getValueString(true) is called - that is, the boolean for 'update value' must explicitly be set to true to rerun the calculation function.
    • Previously, the calculation function was re-run every time getValue() or getValueString() was called, regardless of the update value parameter.
      For calculations that were based on the results of other variables that didn't change, this was fine.
      But, for calculations based on new raw readings (ie, calling analogRead()) a new value would be returned each time the function was called.
      I realized this was a problem for analog values I tried to read that reported correctly in the first round, but were saved as junk in the csv and publishers because a new analog reading was being attempted when the thing I was attempting to read was now powered down.
    • The variable array update functions have been modified accordingly.
    • Verify you have the functionality you expect if you use calculated variables.
  • Removed the enable/disable wake pin interrupt at every sleep interval in favor of a single attachment during the begin.
  • Moved all code for communication with the RTC into the new static class loggerClock().
  • Deprecated functions, to be removed in a future version:
    • Logger::setRTCTimeZone(timeZone); use loggerClock::setRTCOffset(_offsetHours) in new code.
    • Logger::getRTCTimeZone(); use loggerClock::getRTCOffset() in new code.
    • Logger::setRTClock(UTCEpochSeconds); use loggerClock::setRTClock(ts, utcOffset, epoch) in new code.
    • Logger::isRTCSane(); use loggerClock::isRTCSane() in new code.
    • Logger::wakeISR(); use loggerClock::rtcISR() in new code.
  • Support timestamps as time_t objects instead of uint32_t where every sensible.
    • The size of a uint32_t is always 32 bits, but the size of the time_t object varies by processor - for some it is 32 bits, for other 64.
  • Changed the watchdog from a fixed 15 minute reset timer to 2x the logging interval (or at least 5 minutes).
  • Modified all examples which define a sercom serial port for SAMD21 processors to require the defines for the supported processors.
    This should only make a difference for my compilation tests, real users should pick out only the chunks of code they want rather than leave conditional code in place.
  • Changed some fill-in-the-blank spots in the menu example to only set the value in a single spot in the code.
  • Unified all defines related to the resolution of the processor ADC and moved them to the new configuration file.
    • Applies only to sensors using the built-in processor ADC:
      • Internal battery, analog light sensor, and analog electrical conductivity
    • You can no-longer set a separate processor resolution for each sensor.
  • You no longer need to input a client object into the constructor for any of the publishers if you are using a loggerModem object.
    • For best results, input a client object to the constructor only if you are NOT using a loggerModem object.
  • Split functionality for the ESP8266 and the ESP32.
    • If you are using an EnviroDIY wifi bee, you should update your code to correctly select the ESP32, which is more feature rich than the ESP8266.
  • Changed the way debugging printouts are generated in the publishers.
  • Changed the default functionality of the "testing" mode.
    • When the button pin is changed to activate testing mode, a single sample will be taken and published immediately.
    • To restore the previous functionality (beginning a loop of 25 measurements) use the configuration/build flag MS_LOGGERBASE_BUTTON_BENCH_TEST.
    • The function for the original testing mode has been renamed to benchTestingMode().
  • Added check for isnan(...) to the Sensor::verifyAndAddMeasurementResult(...) function.
  • Pass pointers to c-style character strings instead of String objects where easily done.
  • Separated functions for setting button/rtc pin modes and attaching their interrupts.
  • Corrected as many spelling errors as I could find.

Added

  • CONFIGURATION Added a two configuration files (ModSensorConfig.h and ModSensorDebugConfig.h) that all files read from to check for configuration-related defines.
    This allows Arduino IDE users who are unable to use build flags to more easily configure the library or enable debugging.
    It also allows PlatformIO users to avoid the time-consuming re-compile of all their libraries required when changing build flags.
    • ALL library configuration build flags previously in any other header file for the library have been moved into the ModSensorConfig.h file, including ADC, SDI-12, and variable array options.
  • Added support for caching readings in RAM and sending in batches.
    This currently only works on the EnviroDIY/Monitor My Watershed Publisher.
    Thank you to Thomas Watson for this work.
  • Created a new ClockSupport module with the loggerClock and epochStart static classes.
  • Added support for the Micro Crystal RV-8803-C7 high accuracy, ultra low power Real-Time-Clock Module.
  • Added support for multiple 'epoch' types starting at January 1, 1970 (UNIX), January 1, 2000 (Arduino and others), January 5, 1980 (GPST), and January 1, 1900 (NIST time and NTP protocols).
    • This allows you to input the epoch you're using in every single function that deals with a uint32_t or epoch type timestamp.
      If no epoch start is given, it is assumed to be UNIX (January 1, 1970).
    • The supported epochs are given in the enum epochStart.
  • Storing _buttonPinMode internally.
  • Added a single define (MS_OUTPUT) to use for all outputs from ModularSensors.
  • Added support for sending printouts and debugging to two different serial ports. This is useful for devices (like SAMD) that use a built in USB serial port which is turned off when the device sleeps. If MS_2ND_OUTPUT is defined, output will go to both MS_2ND_OUTPUT and to MS_OUTPUT.
  • Added example code for flashing boards with a neo-pixel in the menu example.
  • NEW SENSOR Added support for Geolux HydroCam
  • NEW SENSOR Added support for ANB Sensors pH Sensors
  • Added a generic time formatting function.
  • NEW PUBLISHER Added a new publisher to AWS IoT Core over MQTT
    • A doorway to new possibilities: Unlike every other publisher, the AWS IoT Core publisher supports two-way communication with a settable callback on received messages.
  • NEW PUBLISHER Added a new publisher to AWS S3 buckets using pre-signed URLs
  • Added structure to publish metadata to publishers - intended to be used only at startup and once a day at noon.
  • Added start-up helper function makeInitialConnections() to publish metadata and sync the clock.
  • Added function getVarResolutionAtI(uint8_t)
  • Added support for full CRC checking for SDI-12 sensors.
    • This includes simplistic retries, but does not fully implement the SDI-12 protocols triple inner and outer loop retry requirements.
  • Added the ability for publishers to make an initial connection to publish metadata.
    • At present this is implemented in the IoT Core publisher - which sends all the metadata for each variable - and the ThingSpeak publisher - which changes channel and field names to match the logger configuration.
  • Added a generic generateFileName(bool include_time, const char* extension, const char* filePrefix) function to the logger which can be used to assemble a prefix, timestamp, and extension into a new filename.
  • Added more options to some of the logger and publisher begin functions.
  • Added helper functions to create and delete clients using TinyGSM.
  • Added more clear functions for checking and setting sensor status bits.
  • Added code spell checking configuration (cspell).

Removed

  • BREAKING: Removed the "built-in" GsmClient within the LoggerModem objects.
    • This means you cannot access a client with &modem.gsmClient.
    • Most of the examples used the &modem.gsmClient pattern! This means many people will need to change their code!
  • BREAKING: Removed the function setNowUTCEpoch(uint32_t).
    • Although public, this was never intended to be used externally.
  • Potentially BREAKING: Removed support for any functions using the Sodaq "DateTime" class.
  • Potentially BREAKING: Removed ability to have PRINTOUT, MS_DBG, and MS_DEEP_DBG output going to different serial ports
    • Defines for STANDARD_SERIAL_OUTPUT, DEBUGGING_SERIAL_OUTPUT, and DEEP_DEBUGGING_SERIAL_OUTPUT are all ignored.
      Use t...
Read more

v0.36.0

01 Oct 19:08
26f2558

Choose a tag to compare

DOI

Changed

  • Applied markdown lint to markdown files
  • Bumped TinyGSM dependency
    • Changed datatypes for modem voltage outputs.
  • Switched from Soligen fork of ADS1115 library to the standard Adafruit version. #456
  • Rearranged documation of examples
  • Consistently apply all pre-processor defined checks with function-like syntax
  • Consistently check for both __AVR__ and ARDUINO_ARCH_AVR in all cases.
    • Not all AVR boards defin __AVR__ within the PlatformIO system, which was confusing the SCons preprocessor.
  • Modified implementation of initial short logging intervals.
  • Allow non-sleep before returing from testing or logging functions.
  • Modified returns of modem variables from uint's to int's for consistency with the latest version of TinyGSM.
  • Add pre-processor macro for number of times to attempt to update the clock.

Added

  • Added support for Yosemitech Y513 Blue Green Algae Sensor thanks to @aufdenkampe #476
  • Added support for Alphasense CO2 Sensor thanks to @aufdenkampe #457
  • Added support for Turner Turbidity Plus thanks to @mbarneytu #361
  • Added complete paramter documentation where it was missing thanks to @SRGDamia1

v0.35.1

26 Aug 06:31

Choose a tag to compare

v0.35.1 2024-08-26

This is a hot-fix type release, pushing out fixes for sleeping for the SAMD21. It is not fully tested. If you are not using a SAMD21, please stick to version 0.35.0 until 0.36 is released.

Changed

  • BREAKING Switched default clock for SAMD21 from the built-in 32bit RTC to the DS3231.
    This is not be a permanent change.
  • Switched to reusable workflows for CI

Fixed

Fixed clock configuration for SAMD21

v0.35.0

18 May 03:13
ca7653f

Choose a tag to compare

Changed

  • BREAKING Refactored how the publisher transmit buffer works. This will require adjustment to custom data publishers.
  • Update GitHub actions
  • Remove date from copyright for easier tracking
  • Turn modem off at end of setup, regardless of time
  • Clean function to set file timestamp on SD card
  • Use equation rather than table for CSQ
  • Only polling modem for enabled parameters
  • INCREASED THE MAXIMUM NUMBER OF VARIABLES FROM A SINGLE SENSOR and implemented an option to set this by build flag.
    • This will increase memory use for the entire library.
      If you are not using the GroPoint sensors which require many variables, I recommend you change this value via the build flag -D MAX_NUMBER_VARS=8
  • Allow all WiFi modems to first attempt to connect using existing on-modem saved credentials rather than immediately sending new credentials.
  • Add further debug printouts to the processor stats

Added

Removed

  • Removed the (unused) sendOffset parameter from dataPublisherBase.

Fixed

  • Minor bug fixes for XBee Wifi
  • Handle no SIM card response from SIM7080G (EnviroDIY LTE Bee)
  • Fixed Keller debugging output.
  • Fixed file reference for SDFat 2.2.3

Known Issues

  • The modem hardware, firmware, and serial number is only implemented for the Digi XBee WiFi.

v0.34.0

16 Mar 14:39

Choose a tag to compare

Changed

  • BREAKING - Removed support for light sleep on Espressif modules.
    This changes the order of the constructor for the ESP32 and ESP8266!
    • The light sleep mode is non-functional anyway, and confusion over the sleep request pin was putting the board in a position not to sleep at all.
  • Minor tweek to clang-format
  • Moved all variable initialization to default header values and initializer lists
  • Converted all "c-style" casts to static casts
  • Switched cases of strcat and strcpy to snprintf
  • Specify python version 3.x for actions (used by PlatformIO)

Added

  • Support Campbell RainVUE10 SDI-12 Precipitation Sensor #416
  • Support YosemiTech Y700 Pressor Sensor (#421)

Removed

Fixed

  • Fixed bug in YosemiTech Y4000 Sonde (#420)
  • Fixed non-concurrent data fetch for SDI-12 when NOT using debugging.
  • Fixed internet connection when in "testing mode"
  • Allow a non-zero wait time for SDI-12 sensors
  • Fixed outdated GitHub actions

v0.33.4

08 Jun 17:33

Choose a tag to compare

DOI

Fixed

  • Increased warm-up and measurement time for Campbell ClariVUE-10 to work with the latest version of the sensor.

v0.33.3

02 May 21:43

Choose a tag to compare

Fixed

  • Increased measurement time for Hydros21 to work with the latest version of the sensor.

v0.33.2

12 Apr 03:47

Choose a tag to compare

Fixed

  • Fixed script to install and zip libraries for a release

v0.33.1

12 Apr 02:51

Choose a tag to compare

Changed

Added

  • Added a typedef and header for the ESP32
    • This is just another name to the ESP8266 class to help any who don't know they're identical for our purposes.
  • Example: Created a new DRWI wifi example for workshop.

Removed

Fixed


v0.33.0

01 Apr 20:25
acfb2eb

Choose a tag to compare

Changed

  • Breaking: Renamed the static markedEpochTime variable to markedLocalEpochTime.
    • This was sometimes used in "complex" loops. Code utilizing it will have to be changed.
    • This is part of the effort to clarify where localized and UTC time are being used.
      We recommend a logger's real time clock always be set in UTC and then localized for printing and storing data.
  • Breaking: Renamed the function setNowEpoch(uint32_t) to setNowUTCEpoch(uint32_t).
    • Although public, this was never intended to be used externally.
  • Breaking: Renamed the YosemiTech Y550 COD sensor as Y551. See below.
  • Potentially Breaking: Changed the default "button" interrupt pin mode from INPUT_PULLUP to INPUT and created optional arguments to the setTestingModePin and setLoggerPins functions to specify the pin mode and pull-up resistor state.
    • INPUT is the proper mode for the Mayfly.
      The Mayfly has an external pull down on the button pin with the button being active high.
      This means having the pull-up resistors on negates the button signal.
      The pin mode had been set as INPUT_PULLUP for the button, backwards for the Mayfly, since July of 2017.
      By some electrical luck, with the 0.x versions of the Mayfly, the external pull-down on the button pin was strong enough to out-weigh the incorretly activated pull-up resistors and an interrupt was still registered when the button was pressed.
      With a different pull-down resistor on the Mayfly 1.x, the button no longer registers with the pull-up resistors active.
      So, for most of our users with Mayflies, this will be a fix.
      But for anyone using a different board/processor/button configuration that depended on the processor pull-up resistors, this will be a breaking change and they will need to specify the button mode in the setTestingModePin or setLoggerPins function to return to the previous behavior.
  • Added a longer warm up time and removed some of the modem set-up to work with the ESP-IDF AT firmware versions >2.0
  • Made sure that all example clock synchronization happens at noon instead of midnight.
  • Renamed Classes: Renamed several classes for internal consistency.
    These are not breaking changes at this time; the old class names are still usable.
    • Rename class MPL115A2 to FreescaleMPL115A2
    • Rename class MPL115A2_Pressure to FreescaleMPL115A2_Pressure
    • Rename class MPL115A2_Temp to FreescaleMPL115A2_Temp
    • Rename class TIINA219_Volt to TIINA219_Voltage
    • Rename class PaleoTerraRedox_Volt to PaleoTerraRedox_Voltage
    • Rename class ExternalVoltage to TIADS1x15
    • Rename class ExternalVoltage_Volt to TIADS1x15_Voltage
  • Documentation: Migrated to latest version of Doxygen (1.9.3).

Added

  • Sensor Added support for the YosemiTech Y551 COD Sensor, which makes a UV254 light absorption and translates it to estimates of Chemical Oxygen Demand (COD) (or Total Organic Carbon (TOC)) and Turbidity.
    • NOTE that this upgrade removes the earlier Y550 from the library, as it was never tested and is no longer available form YosemiTech. If anyone has a Y550 sensor, the Y551 commands should work. Let us know if they don't.
  • Sensor Added support for the YosemiTech Y560 Ammonium Probe, which is a mini sonde for three Ion Selective Electrode (ISE) sensors (pH, NH4+, K+) that together are used to provide a corrected estimate of total ammonium nitrogen (NH4_N) in mg/L.
    • NOTE that this release only includes outputs for NH4_N, pH, and temperature. A future release will also include estimates of potassium (K) and raw potential values from each of the electrodes.
  • Sensor Added support for the SDI-12 In-Situ Level TROLL 400, 500 & 700 Data Loggers
  • Sensor Added support for the Sensirion SHT40 relative humidity and temperature sensor
  • Sensor Added support for the Everlight ALS-PT19 ambient light sensor
  • Sensor Added support for the Bosch SensorTec BMP388 and BMP390 pressure sensors

Removed

Fixed

  • Fixed memory leak for AOSong AM2315 thanks to @neilh10