Skip to content

Releases

RBgrid v1.2.1

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 10 Nov 15:48

RBgrid v1.2.1

A fix for v1.2.0. Update if you use dynamic prices.

Fixed

  • With dynamic prices on, the hub could run out of settings memory. v1.2.0 kept the price stores in the small
    settings memory (NVS) that also holds the open hours and the energy counters' anchors. Once it filled up, the hub
    could no longer save them, so a restart could lose part of the current hour (event log: FAIL hour persist …: ESP_ERR_NVS_NOT_ENOUGH_SPACE).
  • The price stores now live in the file system. On the first start of v1.2.1 they are moved there and the settings
    memory is freed (event log: price: stores moved from NVS to the file system). Prices, settings and history are kept.

Everything else is as in v1.2.0 (dynamic prices, cheap windows with a price notification, import peaks). An update
over the air from v1.1.x or v1.2.0 keeps settings and history.

Files

  • ESP32 hub:
    • main_release.bin (OTA);
    • for a first USB install: bootloader.bin, partition-table.bin, ota_data_initial.bin, identical to v1.2.0.
  • ESP32-S3 hub (N16R8): main_release_s3.bin (OTA); the USB set is in rbgrid-hub-s3_v1.2.1_full.zip.
  • Node firmware 1.5 (unchanged): rbgrid-node_v1.2.1.bin; the USB set is in rbgrid-node_v1.2.1_full.zip.
  • Web app 1.2.0 (unchanged): rbgrid-ui_v1.2.0.zip.

The full list is in CHANGELOG.md.

RBgrid v1.2.0

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 10 Nov 15:16

RBgrid v1.2.0

Dynamic (spot) electricity prices, cheap windows with a price notification for other devices, and import peaks.
An update over the air from v1.1.x keeps settings and history.

Dynamic prices

  • The hub can follow a market price and price every 15-minute period with the price of that period. It is off
    until you turn it on. Your tariff plan stays the fallback, and its taxes, fees and VAT still apply to a spot price.
  • Sources:
    • Energy-Charts (Fraunhofer ISE, CC BY 4.0 zones);
    • Nord Pool;
    • Elpriset just nu (SE);
    • Hva koster strømmen (NO, hourly);
    • EnergyZero (NL, all-in);
    • Octopus Agile (UK, all-in);
    • Home Assistant, as a local source that pushes prices to the hub.
  • Fallback: a primary and a backup source, then the plan.
  • An all-in source is taken as it is, so nothing is counted twice.
  • Contract options: a factor and a markup, floors for buy and sell, three sell modes, and billing at the hourly
    mean for contracts settled per hour.
  • Negative prices are kept as they are, unless you set a floor.
  • Currency is not converted: the source's currency must be your plan's.
  • Every price the hub booked is logged per 15-minute period with its source, for 40 days (the Prices page, CSV
    export, GET /api/v1/price?log=1).
  • The history format is unchanged: clients need no change.

Cheap windows and the price notification

  • Up to 8 rules mark the cheap periods:

    • below a price (with hysteresis);
    • the N cheapest periods of a day or a time range;
    • N periods before a set time.
  • They work on a fixed time-of-use plan too.

  • The hub switches nothing itself. It publishes a notification that other devices and Home Assistant
    automations read:

    • the price now;
    • its rank in the day;
    • the open windows;
    • "cheap now" and "low sell" flags.

    It is available at GET /api/v1/signal and on MQTT rbgrid/<mac>/price (retained), refreshed every 15 minutes
    and on any change.

Import peaks

  • The highest 15-minute and hourly import at the grid input, and the top days, per billing cycle (start day
    1–28), for capacity tariffs. Metering only: no charge is added to the bill. They work without dynamic prices.

Other changes

  • Remote nodes going offline or back online are written to the hub's event log (the app's Journal).
  • The hub's own time zone decides tariff zones and days.
  • GET /api/v1/schema lists every route the hub serves.

Web app 1.2.0

  • The Prices page: price now, today and tomorrow; the source and the formula; cheap windows and flags; import
    peaks; the applied-price log with CSV.
  • Fixes:
    • History orders a site's points with the input first and draws late-starting hours on their own bar.
    • Economics counts generation in the balance.
    • The node panel warns when the hub isn't taking in node data.

Files

  • ESP32 hub:
    • main_release.bin (OTA);
    • for a first USB install: bootloader.bin, partition-table.bin, ota_data_initial.bin. They are identical to
      v1.1.8, so an OTA keeps everything.
  • ESP32-S3 hub (N16R8): main_release_s3.bin (OTA); the USB set is in rbgrid-hub-s3_v1.2.0_full.zip.
  • Node firmware 1.5 (unchanged since v1.1.8): rbgrid-node_v1.2.0.bin; the USB set is in
    rbgrid-node_v1.2.0_full.zip.
  • Web app: rbgrid-ui_v1.2.0.zip.

The full list is in CHANGELOG.md.

RBgrid v1.1.8

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 10 Nov 08:40

RBgrid v1.1.8

A release on top of v1.1.7. Remote nodes get node firmware 1.5. A point can be marked as measured inside another
point. The ESP32-S3 is supported.

Remote nodes and node firmware 1.5

  • Node data could stop being processed. When internal RAM was short at the hub's start, the task that books node
    data didn't start, and nothing said so: nodes read offline and their periods were not booked. The hub's node tasks
    now have memory reserved at build time; GET /api/v1/espnow shows inject_age_ms (-1 = not running).
  • A current-only node input books no energy. The hub doesn't turn current alone into energy from the nominal
    voltage, because that would not be real energy. Live values still show the current.
  • A node period longer than 15 minutes is kept. This is energy the node counted before it had the hub's clock.
    It goes into that period's hour, flagged OUTAGE.
  • Live values from all 4 inputs of a node (was 3). Node point edits (name, role, ratings, clamp orientation,
    inside) survive a restart.
  • Node firmware 1.5:
    • A node follows only the hub it is paired to. With two RBgrid hubs on one Wi-Fi channel, node 1.4 lost its clock
      sync, while energy kept arriving. A node paired under 1.4 needs no re-pairing: after the update it keeps the hub
      that answers it.
    • Periods are kept in flash until the hub has them, about 5 days, and they survive a power cut.
    • The first record covers boot → the first full 15-minute boundary.
    • All three inputs of a module are reported.
    • Moving a node to another hub needs no flash erase, also when the old hub is gone.
  • Node update: over USB with all three files. 1.5 adds a flash partition for the kept periods. The image is
    rbgrid-node_v1.1.8.bin; the boot loader and partition table are in rbgrid-node_v1.1.8_full.zip.

Points measured inside other points

  • A point can be marked as measured inside another one, e.g. a charger inside a metered sub-panel. The app then
    doesn't count that load twice in "unmetered".
  • The hub's own totals don't change: they are taken at the input.

Security

  • mqtts:// checks the broker certificate's dates. An expired certificate, or one not valid yet, is refused.
  • The hub opens a TLS broker connection only once its clock is set. Plain mqtt:// is not delayed.
  • Your own broker CA (e.g. Mosquitto in Home Assistant with its own certificate): POST /api/system/mqtt-ca with
    the PEM; it replaces the public CA bundle at the next restart. GET /api/system/mqtt-config → tls.state says why a
    connection is refused (expired, not_yet_valid, name_mismatch, unknown_ca, waiting_clock, …).

Platform

  • ESP32-S3 (module N16R8: 16 MB flash, octal PSRAM) is supported next to the ESP32-WROVER. It is a separate
    image, main_release_s3.bin; for a first USB install, take the four files in rbgrid-hub-s3_v1.1.8_full.zip.
  • ESP-IDF 5.5.1, as v1.1.7.
  • The ESP32 boot loader, partition table and OTA data are byte-identical to v1.1.7. An update over the air keeps
    settings and history.

API

  • GET /api/v1/system/events adds heap (internal RAM free / minimum / largest block, PSRAM free).
  • GET /api/v1/schema: quality_bits names every bit the hub sets (SRC_RESTART, SRC_FW, REVERSE_LOST,
    OUTAGE), and capabilities.pointNesting: true.
  • Telemetry: the input's src / present come from the real input point (an rbAmp input read adc / not present).

Full list: CHANGELOG.md. Node: node/README.md.

RBgrid v1.1.7

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 08 Nov 02:14

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

RBgrid v1.1.6

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 06 Nov 14:00

RBgrid v1.1.6

A release on top of v1.1.5. The time settings no longer get lost after a restart. A three-phase input metered per phase now has one history and one set of money figures for all three phases.

Fixed

  • Time settings lost after a restart. On v1.1.2–v1.1.5, changing the time zone in the app left the hub without a time zone and without an NTP server at its next restart. The clock then never synchronized again: tq: 0, no new history, tariff zones on an unsynchronized clock.
    • The hub now merges the settings it receives into the saved ones.
    • A hub already in that state recovers at its first boot on v1.1.6. The saved time zone is kept, and the NTP servers go back to pool.ntp.org / time.nist.gov.
    • After updating, open Settings → Time and check the time zone. If it was lost before the update, set it again.
  • Clock set from the browser on a hub without NTP. After Use this device's time, Settings → Time showed "not synchronized", and the setup wizard waited for a synchronized clock. A hand-set clock now stays synchronized (source MANUAL) until NTP takes over. The live data reports it as time_src: "manual", tq: 1.
  • Settings → Time failed to load now and then on a hub without NTP: about one request in three. It now always loads.
  • NTP settings out of range (resync interval outside 60–86400 s, timeout outside 1000–60000 ms, retries outside 1–10, an empty or malformed server name) are refused with a message. Before, they were saved, and the hub came up after the next restart with no clock sync. A value already saved out of range is brought into range at boot.
  • An update sent right after an update. For about a minute after an over-the-air update the hub is still confirming the new firmware. During that minute it refuses the next update with a plain "try again in about a minute" (HTTP 409) instead of "500 ota_begin failed".
  • A point created with the id of a deleted point no longer inherits that point's net-metering figures.
  • enable_dst in the time settings did nothing (summer time comes from the time-zone rule). It is now read-only: it shows whether the hub's time-zone rule has summer time.

New: the input's history and money as one series

  • With the input metered per phase, Overview (today by hour, vs yesterday, month, forecast) and Economics now cover all three phase points, not L1 only. This lifts the v1.1.5 limitation.
  • API: GET /api/v1/history?unit=input… and GET /api/v1/economics?unit=input return the input as one series, summed over its points. The schema has capabilities.inputAggregate: true.

Web app 1.1.6

  • The input history and money above.
  • Settings → Time checks the NTP servers and the resync interval before Save. To a hub on firmware 1.1.5 or earlier, Save sends the whole time configuration, so those hubs don't lose their NTP servers either.
  • Settings → Hub firmware explains the one-minute wait after an update.
  • Three-phase input switch: the result and Restart now show on the module card, and the buttons hide until the restart.
  • Its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.6.zip. Full list: webapp/CHANGELOG.md.

Install the firmware and the app together: the input history and the new messages are in the app.

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

Files

File What it is
main_release.bin Application image. Use it for an over-the-air update from the app (Settings → Hub firmware) or at 0x20000 for a USB flash.
bootloader.bin, partition-table.bin, ota_data_initial.bin The other three files for a USB flash of a blank hub.
rbgrid-ui_v1.1.6.zip The web app for the hub: kit/ + ui-manifest.json (built from webapp/ in this tag).
THIRD_PARTY_LICENSES.md Open-source packages bundled in the web app.

SHA256:

ccab593cab49ed1b6b53079580efb637bfdf73d5094c0ca13b8d9c14984d229a  main_release.bin
6b776b566fb4fc2d8ad04060d13c6e3662295eb501e7a2305a7a7592d60e5fb4  bootloader.bin
8fbeacb18a26ac27c6500c00c4dfcd5ee5aac4c237312174d0cce5b4781e38ce  partition-table.bin
7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f  ota_data_initial.bin
03dceeef97e511dcea128020f75fb4d5351fc258e9ed38664af97a8fb6a76710  rbgrid-ui_v1.1.6.zip

Update

  • Hubs on v1.1.x:
    • Update over the air from the app (Settings → Hub firmware) with main_release.bin. Wi-Fi, settings, points and history are kept.
    • Let the hub run for a minute after the update before restarting it: it confirms the new firmware after about a minute on the network. A restart before that rolls it back to the previous firmware.
    • Then install the new web app (below), and check Settings → Time.
  • USB flash (ESP32, 16 MB):
python -m esptool --chip esp32 -p <PORT> -b 460800 write_flash --flash_mode dio --flash_size 16MB --flash_freq 40m \
  0x1000 bootloader.bin 0x10000 partition-table.bin 0x17000 ota_data_initial.bin 0x20000 main_release.bin
  • Flashing the four files as above keeps the hub's settings, Wi-Fi and history.
  • To start clean, run python -m esptool --chip esp32 -p <PORT> erase_flash first.
  • A clean (or new) hub starts its own Wi-Fi rbgrid-xxxx (setup password RBGRID123). Open http://192.168.4.1/, choose your home Wi-Fi and enter its password.
  • Before installing an older firmware on a hub whose input is metered per phase, switch it back to one point (as for v1.1.5).

Install the web app on the hub

Unzip rbgrid-ui_v1.1.6.zip, then:

HUB=http://<hub-address>
cd kit
for f in $(find . -type f | sed 's|^\./||'); do
  curl -sf -X POST "$HUB/api/system/ui-upload?path=$f" -H 'Content-Type: application/octet-stream' --data-binary "@$f" || { echo "upload failed: $f"; exit 1; }
done
curl -sf -X POST "$HUB/api/system/ui-commit" -H 'Content-Type: application/json' --data-binary @../ui-manifest.json

If you have set an API token, add -H "Authorization: Bearer <token>" to both calls. Then open http://<hub-address>/. You can also use the hosted app at https://webapp.rbgrid.io.

Validation

The images in this release were validated on hardware (ESP32-WROVER, 16 MB, chip revision v1.1):

  • over-the-air update from v1.1.5, including a hub whose time settings v1.1.5 had lost (time zone kept, NTP servers restored, clock synchronized);
  • USB flash of all four files, keeping settings, totals, the tariff plan and the time settings;
  • API contract 96/96;
  • time settings: saving only the time zone, or only the resync interval, then a restart, keeps the rest; out-of-range values refused;
  • a hub with no NTP: clock set from the browser stays synchronized (source MANUAL), Settings → Time loads on every request;
  • an update within the confirm minute answered 409;
  • the web app on the hub: the three-phase input switched through the app both ways, Settings → Time save and restart, the input history as one series.

A build from source produces a different SHA256 than these images: the build embeds its date and time. That's expected.

RBgrid v1.1.5

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 06 Nov 08:51

RBgrid v1.1.5

A release on top of v1.1.4: the tariff plan now survives a restart, and a three-phase input can be metered per phase.

Fixed

  • The saved tariff plan was lost at every restart (power cut, reboot, firmware update). The hub fell back to its built-in placeholder plan "Test Day/Night" until the plan was saved again, and energy measured in between was costed at the placeholder's prices. The saved plan now comes back complete after a restart: name, zones, weekend days, per-kWh charges and VAT.
    • After updating from v1.1.4, open Tariffs. If it shows "Test Day/Night", save your plan once more; from now on it stays.

New: a three-phase input as one point, or one point per phase

  • A three-phase module (STD-U3I3) on the input can be metered:
    • as one point: the phases are netted every 15 minutes, like a meter that sums the phases. Export on one phase is offset by import on the others.
    • or as one point per phase: each phase has its own import and export, like a meter that counts each phase. Nothing is offset.
  • Choose it in the app: Points → the STD-U3I3 card that carries the input → One point per phase / One point, phases netted. The hub applies it after a restart; the app offers the restart.
  • The input point keeps its history on L1; L2 and L3 start from zero. Back to one point, the L2/L3 points are deleted and their totals move into the input, so the site's totals don't go down.
  • With the input per phase, the hub's system totals (power, energy in/out, cost, export value, and Home Assistant) are the sum of all phases.
  • Before installing an older firmware on a hub whose input is metered per phase, switch it back to one point: older firmware handles only one supply point.

Changed: Generation points

  • A point with role Generation now counts the flow in the direction of the sensor arrow (from the source to the consumers) as production: negative power, energy into Energy Out.
  • If you had set invert_sign on a Generation point to make it read production, clear it after updating (POST /api/v1/units/<id> {"invert_sign":false}).

Web app 1.1.5

  • The three-phase input switch above.
  • Tariffs: every zone shows its sell price whatever the net-metering setting (export-only tariffs such as SEG).
  • Time: southern-hemisphere zones with summer time; "today" and hour axes start at the hub's real midnight on clock-change days.
  • Car park: a three-phase charger bound as one point per conductor counts as one station when its points share a group.
  • Its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.5.zip. Full list: webapp/CHANGELOG.md.

Known limitation

  • With the input metered per phase, history and money per period in the app (Economics balance, Overview month and "vs yesterday", the energy chart) show the L1 point only. Live values and the hub's system totals are the full sum. A summed history is planned for the next release.

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

Files

File What it is
main_release.bin Application image. Use it for an over-the-air update from the app (Settings → Hub firmware) or at 0x20000 for a USB flash.
bootloader.bin, partition-table.bin, ota_data_initial.bin The other three files for a USB flash of a blank hub.
rbgrid-ui_v1.1.5.zip The web app for the hub: kit/ + ui-manifest.json (built from webapp/ in this tag).
THIRD_PARTY_LICENSES.md Open-source packages bundled in the web app.

SHA256:

82dfe3db145f627254ea788a5321d5b2789edc4e14664abff1aa015e98decea2  main_release.bin
3a50c4260bff0ce0aa0f909f230bdf7b11c2f3bfc1f62f40300f4cb49161da1b  bootloader.bin
8fbeacb18a26ac27c6500c00c4dfcd5ee5aac4c237312174d0cce5b4781e38ce  partition-table.bin
7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f  ota_data_initial.bin
f96add49392a69890b23bf4cce242aa0cbccdef9644c90f7f882262f69663c75  rbgrid-ui_v1.1.5.zip

Update

  • Hubs on v1.1.x:
    • Update over the air from the app (Settings → Hub firmware) with main_release.bin. Wi-Fi, settings, points and history are kept. Right after an update the hub accepts the next one after about a minute.
    • Then install the new web app (below).
  • USB flash (ESP32, 16 MB):
python -m esptool --chip esp32 -p <PORT> -b 460800 write_flash --flash_mode dio --flash_size 16MB --flash_freq 40m \
  0x1000 bootloader.bin 0x10000 partition-table.bin 0x17000 ota_data_initial.bin 0x20000 main_release.bin
  • Flashing the four files as above keeps the hub's settings, Wi-Fi and history.
  • To start clean, run python -m esptool --chip esp32 -p <PORT> erase_flash first.
  • A clean (or new) hub starts its own Wi-Fi rbgrid-xxxx (setup password RBGRID123). Open http://192.168.4.1/, choose your home Wi-Fi and enter its password.

Install the web app on the hub

Unzip rbgrid-ui_v1.1.5.zip, then:

HUB=http://<hub-address>
cd kit
for f in $(find . -type f | sed 's|^\./||'); do
  curl -sf -X POST "$HUB/api/system/ui-upload?path=$f" -H 'Content-Type: application/octet-stream' --data-binary "@$f" || { echo "upload failed: $f"; exit 1; }
done
curl -sf -X POST "$HUB/api/system/ui-commit" -H 'Content-Type: application/json' --data-binary @../ui-manifest.json

If you have set an API token, add -H "Authorization: Bearer <token>" to both calls. Then open http://<hub-address>/. You can also use the hosted app at https://webapp.rbgrid.io.

Validation

The images in this release were validated on hardware (ESP32-WROVER, 16 MB, chip revision v1.1):

  • over-the-air update from v1.1.4;
  • USB flash of all four files, keeping settings, totals and the tariff plan;
  • API contract 96/96;
  • the tariff plan kept across restarts and updates;
  • the three-phase input switched through the app both ways, each under load on the bench (one phase exporting): per phase, L1 and L3 counted import and L2 export; as one point, L2's export was netted against L1 and L3;
  • a Generation point under load: negative power, energy into Energy Out;
  • the web app on the hub.

A build from source produces a different SHA256 than these images: the build embeds its date and time. That's expected.

RBgrid v1.1.4

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 04 Nov 02:08

RBgrid v1.1.4

A fix release on top of v1.1.3.

Fixed

  • Renaming a point could make it disappear after a restart on ESP32 chip revisions before v3. The point and its history then dropped out at the next restart. Point names are now saved safely. If you held off renaming points on v1.1.3, you can rename them again after updating.
  • Mains voltage and frequency now come only from a module that actually sees mains. Before, a module whose voltage inputs aren't wired (for example an STD-U3I3 used for currents only) could override them, and the frequency read about 45 Hz.

Improved

  • Adding a module: a configured module that isn't answering, and that no metering point depends on, is now shown as an empty slot. The app no longer stops on it.
  • Web app 1.1.4:
    • clearer texts for deleting a point, MQTT with no broker set, and history;
    • the empty-slot step when you add a module.
    • Its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.4.zip.

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

Files

File What it is
main_release.bin Application image. Use it for an over-the-air update from the app (Settings → Hub firmware) or at 0x20000 for a USB flash.
bootloader.bin, partition-table.bin, ota_data_initial.bin The other three files for a USB flash of a blank hub.
rbgrid-ui_v1.1.4.zip The web app for the hub: kit/ + ui-manifest.json (built from webapp/ in this tag).
THIRD_PARTY_LICENSES.md Open-source packages bundled in the web app.

SHA256:

0a68c223119c6e0ab5d35306f6aceed77b8a584b7f819c9445c9bfd9de6dca83  main_release.bin
b3a5109c573d062861e79b5c765fcfb001257e304c8065fbe91eec111705f2d2  bootloader.bin
8fbeacb18a26ac27c6500c00c4dfcd5ee5aac4c237312174d0cce5b4781e38ce  partition-table.bin
7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f  ota_data_initial.bin
65aed92ed27b614ec4809885f87ea92ae56624fc647cc81c69b7199eb95771e4  rbgrid-ui_v1.1.4.zip

Update

  • Hubs on v1.1.x:
    • Update over the air from the app (Settings → Hub firmware) with main_release.bin. Wi-Fi, settings, points and history are kept.
    • Then install the new web app (below).
  • USB flash (ESP32, 16 MB):
python -m esptool --chip esp32 -p <PORT> -b 460800 write_flash --flash_mode dio --flash_size 16MB --flash_freq 40m \
  0x1000 bootloader.bin 0x10000 partition-table.bin 0x17000 ota_data_initial.bin 0x20000 main_release.bin
  • Flashing the four files as above keeps the hub's settings, Wi-Fi and history.
  • To start clean, run python -m esptool --chip esp32 -p <PORT> erase_flash first.
  • A clean (or new) hub starts its own Wi-Fi rbgrid-xxxx (setup password RBGRID123). Open http://192.168.4.1/, choose your home Wi-Fi and enter its password.

Install the web app on the hub

Unzip rbgrid-ui_v1.1.4.zip, then:

HUB=http://<hub-address>
cd kit
for f in $(find . -type f | sed 's|^\./||'); do
  curl -sf -X POST "$HUB/api/system/ui-upload?path=$f" -H 'Content-Type: application/octet-stream' --data-binary "@$f" || { echo "upload failed: $f"; exit 1; }
done
curl -sf -X POST "$HUB/api/system/ui-commit" -H 'Content-Type: application/json' --data-binary @../ui-manifest.json

If you have set an API token, add -H "Authorization: Bearer <token>" to both calls. Then open http://<hub-address>/. You can also use the hosted app at https://webapp.rbgrid.io.

Validation

The images in this release were validated on hardware (ESP32-WROVER, 16 MB, chip revision v1.1):

  • over-the-air update from v1.1.3;
  • USB flash of all four files;
  • API contract 96/96;
  • point renames keeping the point across restarts;
  • mains frequency 50 Hz with a current-only three-phase module on the bus;
  • the web app on the hub (all screens).

A build from source produces a different SHA256 than these images: the build embeds its date and time. That's expected.

RBgrid v1.1.3

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 03 Nov 23:09

RBgrid v1.1.3

A small release on top of v1.1.2: browser access to the hub is now limited to an allow-list, and the RBgrid web app at webapp.rbgrid.io works with your hub out of the box.

Highlights

  • The hosted web app works with your hub.
    • Open https://webapp.rbgrid.io and connect to the hub by its address on your network, for example 192.168.1.50.
    • The browser asks once to allow access to devices on your local network; allow it.
    • Checked in Chrome and Edge. Your computer must be on the same network as the hub.
  • Only the hub's own pages and the listed websites can use the hub from a browser. Before, any website could.
    • The RBgrid app (https://webapp.rbgrid.io, https://demo.rbgrid.io) is always allowed.
    • Add your own websites (up to 8) in the app: Settings → Browser access (CORS).
    • "Allow any website" brings back the old behaviour. If you chose it before, the hub keeps it.
  • Web app 1.1.3:
    • the CORS panel shows the always-allowed sites and your own list;
    • Economics and setup-wizard fixes.
    • Its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.3.zip.

Full list: CHANGELOG.md.

Files

File What it is
main_release.bin Application image. Use it for an over-the-air update from the app (Settings → Hub firmware) or at 0x20000 for a USB flash.
bootloader.bin, partition-table.bin, ota_data_initial.bin The other three files for a USB flash of a blank hub.
rbgrid-ui_v1.1.3.zip The web app for the hub: kit/ + ui-manifest.json (built from webapp/ in this tag).
THIRD_PARTY_LICENSES.md Open-source packages bundled in the web app.

SHA256:

338e45be51b81291f0dffe4cc7b785fd6b968f712cca7cc0cf2a630be6af35be  main_release.bin
3ebebcf91394ab20bdcf0813c440b357c4799c864233477dfdf88895b6e43f57  bootloader.bin
8fbeacb18a26ac27c6500c00c4dfcd5ee5aac4c237312174d0cce5b4781e38ce  partition-table.bin
7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f  ota_data_initial.bin
ea70c9e4dde216cab1e79ff9c28e385f52bb32e89d25f76395da62ab71c6d43f  rbgrid-ui_v1.1.3.zip

Update

  • Hubs on v1.1.x: update over the air from the app (Settings → Hub firmware) with main_release.bin. Wi-Fi, settings and history are kept. Then install the new web app (below).
  • USB flash (ESP32, 16 MB):
python -m esptool --chip esp32 -p <PORT> -b 460800 write_flash --flash_mode dio --flash_size 16MB --flash_freq 40m \
  0x1000 bootloader.bin 0x10000 partition-table.bin 0x17000 ota_data_initial.bin 0x20000 main_release.bin
  • Flashing the four files as above keeps the hub's settings, Wi-Fi and history.
  • To start clean, run python -m esptool --chip esp32 -p <PORT> erase_flash first.
  • A clean (or new) hub starts its own Wi-Fi rbgrid-xxxx (setup password RBGRID123). Open http://192.168.4.1/, choose your home Wi-Fi and enter its password.

Install the web app on the hub

Unzip rbgrid-ui_v1.1.3.zip, then:

HUB=http://<hub-address>
cd kit
for f in $(find . -type f | sed 's|^\./||'); do
  curl -sf -X POST "$HUB/api/system/ui-upload?path=$f" -H 'Content-Type: application/octet-stream' --data-binary "@$f" || { echo "upload failed: $f"; exit 1; }
done
curl -sf -X POST "$HUB/api/system/ui-commit" -H 'Content-Type: application/json' --data-binary @../ui-manifest.json

If you have set an API token, add -H "Authorization: Bearer <token>" to both calls. Then open http://<hub-address>/.

For developers

If you run the web app from your own computer (for example http://localhost:5173), add that address in Settings → Browser access (CORS). Or allow any website on a test hub.

Validation

The images in this release were validated on hardware (ESP32-WROVER, 16 MB):

  • over-the-air update from v1.1.2;
  • USB flash of all four files;
  • API contract 96/96;
  • https://webapp.rbgrid.io and https://demo.rbgrid.io reading from and saving to a hub in Chrome 156 and Edge 156;
  • the browser-access panel (add and remove a site).

A build from source produces a different SHA256 than these images: the build embeds its date and time. That's expected.

RBgrid v1.1.2

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 03 Nov 08:52

RBgrid v1.1.2

One cumulative release on top of v1.1.0. It includes the v1.1.1 fixes, which were never published on their own.

Highlights

  • Up to 8 rbAmp modules per hub (was 3), all on one bus.
    • Add them from the app: Points → Add a module.
    • Modules are found and added at whatever address they answer.
  • One STD-U3I3 as a three-phase input. On the module card choose Use as the three-phase input. After a restart the input is one point with per-phase readings and the phase-rotation check.
  • The web app is in this release: its source is in webapp/, and the built app is attached as rbgrid-ui_v1.1.2.zip. Install it on the hub as below; to build it yourself, see webapp/README.md. The hub's own pages now link to the app it serves.
  • History for up to 12 points (was 8). Points beyond 12 show live values and are marked "live only".
  • Home Assistant:
    • "Cost (Total)" and "Export value (Total)" can be used in the Energy dashboard: they are now state_class: total.
    • "Revenue" is renamed "Export value". Same unique IDs, so entities and history are kept.
  • Factory reset in the app really resets the hub: settings, points, tariff, Wi-Fi, tokens, and optionally history. The hub then starts as on first boot.
  • Hub access point: set your own password in the app (Settings → Network → Hub access point). The app warns while the setup password is unchanged and no API token is set.
  • Stability and diagnostics:
    • larger web-server stack;
    • clear messages when the module bus is held or stuck;
    • STD modules are no longer shown as "uncalibrated".

Full list: CHANGELOG.md.

Files

File What it is
main_release.bin Application image. Use it for an over-the-air update from the app (Settings → Hub firmware) or at 0x20000 for a USB flash.
bootloader.bin, partition-table.bin, ota_data_initial.bin The other three files for a USB flash of a blank hub.
rbgrid-ui_v1.1.2.zip The web app for the hub: kit/ + ui-manifest.json (built from webapp/ in this tag).
THIRD_PARTY_LICENSES.md Open-source packages bundled in the web app.

SHA256:

77d5f27027a4db98a39f092d8bf6ed8b50e130e705bcead4a81c78d261dd3817  main_release.bin
c5bdad5470bcf8c7ba8426667526d12d4a83af4c1564f4ea1a88b6253eabd43b  bootloader.bin
8fbeacb18a26ac27c6500c00c4dfcd5ee5aac4c237312174d0cce5b4781e38ce  partition-table.bin
7d2c7ac4888bfd75cd5f56e8d61f69595121183afc81556c876732fd3782c62f  ota_data_initial.bin
24964ff6a777078b74465e566f97180050c95043b62ccd0bef163b6121b555ba  rbgrid-ui_v1.1.2.zip

USB flash (ESP32, 16 MB)

python -m esptool --chip esp32 -p <PORT> -b 460800 write_flash --flash_mode dio --flash_size 16MB --flash_freq 40m \
  0x1000 bootloader.bin 0x10000 partition-table.bin 0x17000 ota_data_initial.bin 0x20000 main_release.bin
  • To keep the hub's settings, Wi-Fi and history, flash the four files as above. Hubs on v1.1.x use the same partition table.
  • To start clean, run python -m esptool --chip esp32 -p <PORT> erase_flash first.
  • On a clean (or new) hub, it starts its own Wi-Fi rbgrid-xxxx (setup password RBGRID123). Open http://192.168.4.1/, choose your home Wi-Fi and enter its password.
  • Hubs already on v1.1.x can update over the air from the app instead (Settings → Hub firmware). Their Wi-Fi and settings are kept.

Install the web app

Unzip rbgrid-ui_v1.1.2.zip, then:

HUB=http://<hub-address>
cd kit
for f in $(find . -type f | sed 's|^\./||'); do
  curl -sf -X POST "$HUB/api/system/ui-upload?path=$f" -H 'Content-Type: application/octet-stream' --data-binary "@$f" || { echo "upload failed: $f"; exit 1; }
done
curl -sf -X POST "$HUB/api/system/ui-commit" -H 'Content-Type: application/json' --data-binary @../ui-manifest.json

If you have set an API token, add -H "Authorization: Bearer <token>" to both calls. Then open http://<hub-address>/.

After you set up

  • Change the hub's access-point password and set an API token.
  • After adding points, restart the hub so they start keeping history.

Validation

  • The images in this release were validated on hardware (ESP32-WROVER, 16 MB):
    • fresh USB flash and setup;
    • API contract 94/94;
    • an over-the-air update from v1.1.0 through the app;
    • adding BASIC-UI3 and STD-U3I3 modules;
    • the three-phase input;
    • day records;
    • a 20-minute soak with no restarts.
  • A build from source produces a different SHA256 than these images: the build embeds its date and time. That's expected.

RBgrid v1.1.0

Choose a tag to compare

@robotdyn-dimmer robotdyn-dimmer released this 21 Oct 23:01

Firmware image

Attached: main_release.bin — the hardware-validated ESP32 application image (OTA app partition).

sha256  f9b5745feddacbadc9d83bcad150126eb0fe17ca1040cc6b5ee9e659542ae916  main_release.bin

For a fresh USB flash, build from source — see the README quickstart. A build from source produces a different sha256 than this image: ESP-IDF embeds the build date/time, so the hash changes every build. That is expected and not a sign of a problem.

Earlier v1.0.x archives are the previous firmware generation (native ESP32-ADC measurement) and are not interchangeable with v1.1.0.


First source release of the RBgrid hub firmware under the PolyForm Noncommercial 1.0.0 licence
(free for personal and non-commercial use; commercial use by licence — see COMMERCIAL.md).

Measurement

  • Measurement now comes from rbAmp I²C metering modules (true-RMS voltage, current, active power,
    power factor; reactive/apparent power where the module provides them). The hub collects, computes
    and stores; it has no analog front-end of its own. The native ESP32-ADC path of v1.0.x is removed.
  • BASIC modules with 1 to 7 current channels and STD modules (including three-phase U3I3).
  • Single-phase and three-phase supplies, validated on hardware.
  • CT model per channel (SCT-013 5–100 A presets; factory-paired CT-series modules are never rewritten).
    A user's CT choice is bound to the module it was made on; a replaced module keeps its own settings.
  • SCT-013 rating correction for BASIC modules (via the rbAmp ESP-IDF component).
  • Per-channel sensor load flags: near the sensor limit (ct_warn) and clipping (clip).
  • Any channel may be left unused; free channels are listed in /api/v1/sensors and can be bound later.
  • 15-minute energy taken from the module's own period accounting; a hub restart inside a quarter keeps
    the energy the module counted meanwhile.

Statistics, tariffs, export

  • Flash history from 3 s up to yearly records; record format v4 with a non-destructive migration.
  • Time-of-use tariffs: multiple zones, weekend/holiday rules, fees, taxes, VAT, net-metering with credit
    banking and progressive tiers; per-zone cost and revenue.
  • GET /api/v1/summary, GET /api/v1/export.csv, GET /api/v1/history with time ranges.
  • One build: every feature is in the published source (no separate closed edition).

API and integrations

  • REST + WebSocket API; telemetry frame v2 is the default (v1 on explicit request).
  • hw_rev in every telemetry frame: changes when hardware or configuration changes.
  • MQTT publish, command channel and Last Will; Home Assistant MQTT discovery.
    The hub has no default MQTT broker — set one in the app.
  • Event log GET /api/v1/system/events (persists across reboots).

Security and operation

  • Admin token for write requests (and an optional read token); HTTPS server with a development
    certificate generated at build time (components/rbpower/certs/gen_dev_cert.sh).
  • Hub access point rbgrid-<mac4>; the first-login password comes from the build's provisioning file.
    The user sets their own access-point password in the app (POST /api/system/ap); the hub never
    changes it by itself.
  • Over-the-air updates with two slots and automatic rollback of an image that does not confirm itself.
  • Configuration backup and restore.

Platform

  • ESP32-WROVER with PSRAM (required), 16 MB flash; ESP-IDF v5.4.1.
  • A patched copy of the ESP-IDF v5.4.1 I²C master driver (components/esp_driver_i2c, Apache-2.0,
    see NOTICE) fixes watchdog resets and an ISR fault seen under I²C load.

Build

  • Product configuration in sdkconfig.defaults; a development console is available with
    sdkconfig.dev.defaults.
  • The build needs the rbAmp ESP-IDF component; its public release follows this release.