Repository navigation
Releases: TexhFexLabs/HydroNode-Library
Release list
1.7.0
One request per round: sendValues(values, count, codes, ageMs) sends all values of a reading to /api/webhook/sensor-values with the time they were measured, and falls back to sendValue() per value on older backends. Time from a built-in SNTP query to the millisecond, resync every 30 min (setTimeResyncInterval), survives ESP32 deep sleep; 401 "Invalid timestamp" triggers a resync and one retry. No NTPClient dependency anymore. See CHANGELOG.md.
1.6.0
1.5.0
- One command name, several types:
relay1 trueswitches,relay1 1400pulses (onBool + onUInt32 on the same name). - Keep-alive: all values of a round share one TLS connection;
closeConnection()ends it. ESP8266 resumes TLS sessions. syncTime()andepochMs(): fetch the time after ESP8266 light sleep, align readings to internet time.
1.4.1
Fixes
- ESP8266: TLS no longer runs out of memory. Only the three ECDSA root certificates are loaded on the ESP8266 (GTS Root R4, ISRG Root X2, SSL.com ECC). Cloudflare serves its ECDSA chain to BearSSL, and the RSA-4096 roots would have taken about 6 KB of the heap the handshake needs. The ESP32 keeps the full bundle.
- NTP falls back to other servers. If pool.ntp.org does not answer,
time.google.comandtime.cloudflare.comare tried before a send is given up.
1.4.0
Highlights
- ESP8266 support. NodeMCU, Wemos D1 mini and other ESP8266 boards (core 3.1.2). TLS runs over BearSSL with the same bundled root certificates, HMAC-SHA256 over BearSSL's hash. The API is the same as on the ESP32.
- Used by the HydroNode device builder for ESP8266 firmware and generated ESP8266 projects.
Compatibility
- ESP32 sketches compile and behave unchanged.
1.3.0
Highlights
- Typed commands. Register callbacks with the value type you pick in the HydroNode app:
onBool,onInt32,onUInt32,onInt64,onUInt64,onString. Hex like0x20124works for the integer types. - Declines with a reason. A command without a matching callback, with another type or with a value that does not fit is declined (
NO_HANDLER,TYPE_MISMATCH,INVALID_VALUE) instead of confirmed, and never runs. The apps show why. - Fewer dependencies. HMAC-SHA256 and Base64 now use the mbedTLS built into the ESP32 core.
Cryptoandbase64_arduinoare no longer needed. - ArduinoJson 7 without deprecation warnings; responses up to 8 KB (the backend's maximum of 8 commands).
- Input checks before sending.
ERR_INVALID_TYPE(-4) for types liketemperature,ERR_INVALID_VALUE(-5) for NaN or infinity. No TLS handshake is spent on them. - Default host
hydronode.tech.hydronode.texhfexlabs.destays reachable, devices in the field keep working.
Compatibility
- Sketches from 1.2.0 compile unchanged:
on()andbindCallbackstill work. - Requires the current HydroNode backend (already live).
Docs
- Rate limit is one value per sensor and type every 10 s; different types can be sent right after each other.
- 400 and 503 documented, free usage with up to 20 sensors, pump run-time clamp in
ActuatorControl.
Verified
- All examples compile for ESP32, ESP32-C3 and ESP32-S3 without warnings from the library.
- The unchanged library code ran on the host against a local HydroNode backend: signed uploads, per-type rate limit, and typed commands confirmed or declined exactly as expected.
- TLS 1.2 chain against
hydronode.techverified with the bundled root CAs.
1.2.0
HydroNode-Library 1.2.0
Companion release for the HydroNode backend command system. Sketch API unchanged — reflash and existing hydro.on(...) handlers keep working.
Command delivery & confirmation
- Backend commands now arrive as
{"commands":[{"id":"...","command":"pump","value":4000}]}in the response ofsendValue() - The library sends a signed acknowledgment (
/api/webhook/sensor-command-ack) before dispatching handlers — commands show up as Confirmed in the HydroNode app - ACK is sent before handler execution, so long-running callbacks (pump +
delay()) cannot push the ACK outside the backend's replay window
Changes
- Default JSON response buffer 128 → 1024 bytes (command deliveries include UUIDs)
- Shared signed-POST path for values and ACKs
- README: new command format, delivery-confirmation docs, security notes
1.1.0
HydroNode-Library 1.1.0
Existing devices must be reflashed once with this version — the backend replay window is now ±2 minutes and TLS roots rotated. After that, no reflash needed until at least 2035.
Security & reliability
- Bundled root CA set (Google Trust Services, ISRG, SSL.com) — survives Cloudflare Universal SSL certificate rotation without reflashing
- NTP sync before every send with retry; refuses to transmit with unsynced clock instead of sending a doomed request (backend replay window is ±2 min)
- System clock set from NTP so mbedTLS certificate validation works right after boot
API
sendValue()now returns the HTTP status code or a negative error code (ERR_WIFI_DISCONNECTED,ERR_TIME_NOT_SYNCED,ERR_CONNECTION_FAILED) — build your own retry logic- New
connectWiFi(ssid, pass, timeoutMs)helper — optional, the library stays WiFi-agnostic - New
setDebug(Stream&)for diagnostics,setHttpTimeout(ms)for transport tuning - NTP client is now a value member (no heap allocation in constructor)
Platform
- ESP32 only (declared via
architectures=esp32+ compile-time guard). The library always used the ESP32 TLS API; ESP8266 never actually compiled.
Examples & docs
- Four complete, compile-tested examples: QuickStart, WiFiManagerSetup, ExternalWiFi, ActuatorControl
- README rewritten: API reference, WiFi strategy guide, security model, troubleshooting, rate-limit documentation (min. 9 s between submissions)
keywords.txtfor Arduino IDE syntax highlighting
1.0.0
🚀 HydroNode Library v1.0.0
Initial release of the HydroNode Arduino library.
Features
- Simple API for sending data to HydroNodes backend and handling commands to control your devices
- Automatic JSON parsing of backend responses
- Minimal memory footprint, designed for WiFi MCUs
- Built-in support for HMAC-authenticated backend communication