Skip to content

RBgrid v1.1.7

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 08 Nov 02:14
· 105 commits to master since this release

RBgrid v1.1.7

A release on top of v1.1.6. Energy and settings survive faults that used to lose them. The hub can now collect energy from remote nodes over ESP-NOW. The firmware moves to ESP-IDF 5.5.1.

Stored data survives faults

An independent code review looked for ways a fault could lose or double energy, or reset the hub's settings. Each fix was reproduced on the bench with injected faults, before and after.

  • A failed flash write no longer loses the hour. The hour's record is kept and written again at the next quarter.
  • A storage read error at boot no longer erases the settings. The settings store used to be formatted on any mount error. That also removed the API tokens and left the hub open. Now it is formatted only when it is really damaged or blank. On any other error the hub keeps the data and stays locked until the next restart.
  • Saving settings reports a failed write instead of OK, and the old value stays in place.
  • Restore point is all or nothing. An incomplete restore point is refused (409 BACKUP_INCOMPLETE) and nothing changes. A restore that fails part-way puts the previous settings back (500 RESTORE_FAILED).
  • Energy measured while the hub was off for more than a day is kept. It used to be dropped. It now goes into the totals and the current hour, which is flagged outage.
  • Quarter prices use the quarter's own time, also when it is processed late. A new tariff plan is applied in one step.

Tariffs and net metering

  • Clock not set yet (power-up without internet): quarters are priced at the plan's default zone.
  • Net metering switched off no longer collects the month's import and export.
  • A zone condition that is switched off no longer stops the whole zone from applying.

Security

  • MQTT reads need the read token when the hub has read and admin tokens, as HTTP reads do.
  • mqtts:// works with brokers whose certificate comes from a public authority (Let's Encrypt, DigiCert, …). A broker with a self-signed certificate still can't be used.
  • Live data without the token in the address: the app gets a one-time ticket (30 s) for the live stream.

New: remote nodes (ESP-NOW)

  • The hub runs the ESP-NOW radio for remote metering nodes. Each hub makes its own key the first time; no key is built into the firmware.
  • Pairing: open a pairing window (10–600 s) and power up the node. The node and the hub exchange keys, and the node's points appear at once with history from the first hour. No restart.
  • Node settings from the app: turn each node input on or off and pick its clamp. The card shows when the node has applied them.
  • Node health: signal, lost packets over the last minute, last heard. Over MQTT: a status topic per node and events; in Home Assistant, a signal sensor per node.
  • Energy lands in the right hour. A node closes each 15-minute quarter by its own clock and holds it while the hub is out of reach, up to 8 quarters. Each quarter is filed and priced by the time it closed, not by when it arrived.
  • Up to 6 nodes per hub and 4 inputs per node. Node points share the hub’s existing 12 history slots rather than adding to them.
  • Node firmware: its source is in node/, with build, flash and pairing steps in node/README.md. The node needs an ESP32 with 4 MB flash (no PSRAM) and rbAmp modules on I2C. The built image is attached as rbgrid-node_v1.1.7.bin (flash at 0x10000; bootloader and partition table in the same zip as rbgrid-node_v1.1.7_full.zip).

Platform

  • ESP-IDF 5.5.1 (was 5.4.1). The update over the air from v1.1.x works with the boot loader already on the hub. Rollback and going back to v1.1.6 were tested.
  • The metering core is separate from the web server and MQTT code. The API doesn't change.

Web app 1.1.7

  • The Nodes section on the Points page: radio on/off, pairing with a countdown, node cards, node settings.
  • The live stream uses the one-time ticket; the restore point panel says what happened.
  • Many fixes: the hub token is kept per hub; History by month and year follows the hub's calendar; CSV exports refuse failed reads and quote formula-like names; tariff zone checks match the hub.
  • Its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.7.zip. Full list: webapp/CHANGELOG.md.

Install the firmware and the app together: the node section and the new messages are in the app.

Full list: CHANGELOG.md. User guide: webapp/docs/user/.