Relevant links:
- User guides: https://brewblox.netlify.app/
- Discord server: https://discord.gg/WaFYD2jaaT
- Previous release notes: https://brewblox.netlify.app/user/release_notes.html
- Project board: https://github.com/orgs/Brewblox/projects/1
- Code repositories: https://github.com/Brewblox
Brewblox release 2022/09/21
firmware release date: 2022-10-04
IMPORTANT: This update must be flashed over USB for all controllers
IMPORTANT: We recommend exporting your blocks before updating
Firmware development was becoming a bottleneck for new features.
To resolve this, Bob also picked up firmware work in addition to UI and services,
and we have thoroughly re-organized and cleaned up the firmware code repository.
This includes significant improvements to memory use, responsiveness, and communication.
Many of the implemented changes are under the hood, but they made it possible to introduce new blocks and more efficient API calls.
The Sequence block implements light-weight automation that runs on the Spark itself.
The Temp Sensor (External) block is a temperature sensor that does not interact with hardware, but is set externally. It’s now much easier to use a Tilt sensor as Spark input.
We introduced fast hardware PWM on the Spark 4.
This is available both as the new Fast PWM block, and as soft start setting on Digital Actuator blocks.
Digital actuators can now optionally use fast PWM to gradually transition between ON and OFF states.
This prevents inrush current from tripping the overcurrent protection on the Spark 4 GPIO module.
Any errors that occur still are shown in the GPIO module widget in the UI, and can be cleared.
For those interacting with the Spark service block API directly, we have introduced the concept of firmware patch
calls.
When making a patch call, all fields not explicitly present in argument data will be left unchanged.
Fast PWM block
Previously, if a period
value of < 1s was set in the PWM block, it would automatically jump to the 100Hz fast PWM implementation.
With the implementation of new fast PWM settings, this approach became too unwieldy.
PWM with periods of >1s are still handled by the existing PWM block,
but all <1s PWM is now done by the new Fast PWM block.
The Fast PWM block directly targets an IO channel (Spark 2 Pins, Spark 3 Pins, OneWire GPIO Module),
and supports 80, 100, 200, and 2000 Hz frequencies.
Not all frequencies are supported by all hardware. The Spark 2/3 pins only support 100Hz, and DS2408 / DS2413 extension boards do not support fast PWM at all.
Fast PWM blocks differ from PWM blocks in that they target an IO channel directly, and not a Digital Actuator.
Digital constraints (Mutex, Min ON, min OFF) are not supported.
If you have an existing PWM block with a 100Hz period, you will need to replace it with a Fast PWM block
Soft start inrush protection
Digital actuator blocks can now be configured to soft start. When switched on, they will briefly use fast PWM to ramp up.
This prevents inrush current peaks that can trigger the overcurrent protection mechanism in the OneWire GPIO module.
Sequence block
With the abandonment of the Automation Service
we identified desired features that we’d want to implement in some other way.
Primary among this was firmware support for mash steps.
The most basic implementation would look like:
- Set setpoint setting
- Wait until setpoint setting is reached
- Wait for X seconds/minutes/hours
With the new Sequence block, we’ve added this, and more.
You can use this block to define instructions that are executed in sequence.
Instructions can set block settings, wait for conditions to be met, or start other profiles or sequences.
For a complete overview of available instructions, see the reference page.
Temp Sensor (External) block
To improve support for third-party temperature sensors such as the Tilt,
we added a block that makes it easy and safe to work with external values that are written through the block API.
Simply put: it is a manually updated temperature sensor with a timeout.
If the external source of temperature values stops sending updates, the sensor will become invalid.
Example temperature update:
curl -sSk \
-X POST \
-H 'content-type: application/json' \
-d '{
"id": "tilt-sensor",
"type": "TempSensorExternal",
"data": { "setting[degC]": 25.6 }
}' \
https://brewblox-pi/spark-one/blocks/patch
UI sidebar folders
The UI sidebar now shows a collapsible tree structure with links to available pages (dashboards, builder layouts, and services).
New folders can be added to the tree, and folders can contain any desired combination of folders and pages.
This way, pages can be grouped by logical relation (eg. the dashboards and builder layouts for Fermentation Tank 2).
By default, all pages are placed in the default Dashboards, Layouts, and Services folders.
If the folder containing a page is removed, the page is moved back to the default folder.
To prevent unintuitive behavior, previously defined custom ordering of sidebar items is ignored,
and all folders and pages are sorted alphabetically.
Block claims
Previously, the UI showed indicators that block X was driven by block Y. Manual settings would be disabled on block X.
There were some inconsistencies and unintuitive corner cases in this system.
(Does a disabled block still drive its output? To what setting does a Setpoint revert when a Setpoint Profile is done?)
To make the system more predictable and robust, we introduced explicit claims.
- Setpoint Driver and Setpoint Profile blocks will claim their target Setpoint block.
- PID blocks will claim their target PWM or Fast PWM block.
- PWM blocks will claim their target Digital Actuator or Motor Valve block.
- Digital Actuator, Fast PWM, and Motor Valve blocks claim a single channel in their target IO Array.
Blocks or IO channels can only be claimed by one block at a time.
If you assign two Setpoint Profile blocks to the same Setpoint, the second Setpoint Profile will be inactive.
Blocks release their claim when disabled. In the above example, if you disable the first Setpoint Profile,
the second will immediately become active.
When a claim to a block is released, it does not immediately revert to its last user-defined setting.
It will remember its user-defined setting, but remains inactive until a new setting has been set.
Spark 4 network handling
On the Spark 4, we’ve solved a long list of issues with network handling and Wifi provisioning.
Some of the changes:
- Wifi is automatically disabled if ethernet is connected and available.
- Press the OK button for 5 seconds to start Wifi provisioning.
- Press the OK button for 10 seconds to clear stored Wifi credentials.
Changes:
- (feature) Added Sequence block.
- (feature) Added Temp Sensor (External) block.
- (feature) Added the Fast PWM block.
- (feature) Added optional soft start settings to Digital Actuator blocks.
- (feature) The Setpoint Driver settings now always show temperature values.
- (feature) Added the Metrics part to the Builder.
- (feature) GPIO module errors are now shown in the OneWire GPIO Module widget, with the option to clear the error state.
- (feature) Added options in Admin Page → General Settings to set date / time formatting
- Available date formats: YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, browser default.
- Available time formats: 24H, 12H AM/PM, browser default.
- (feature) Dashboards, Layouts, and Services in the sidebar can now be moved to folders.
- (feature) Dashboards, Layouts, and Services in the sidebar are now shown in a tree view with collapsable groups.
- (feature) On the Spark 4, hold the OK button for 5 seconds to start Wifi provisioning.
- (feature) On the Spark 4, hold the OK button for 10 seconds to clear all Wifi credentials.
- (feature) Added the
BREWBLOX_UPDATE_SYSTEM_PACKAGES
flag to brewblox/.env. If set toFalse
, updates will always skip apt updates. - (feature) Built-up PID values such as I (integrator) are now retained during controller software crashes or reboots.
- (feature) The Spark now automatically fetches system time from internet NTP time servers.
- (feature) Streamlined target channel selection for Fast PWM, Digital Actuator, and Motor Valve blocks.
- Target IO array and target channel are now combined into a single dropdown selection.
- The channel selection dropdown shows which block currently claims each channel.
- When a channel is selected, its current claimer is unlinked.
- (feature) The minimum downsampling step size is now configurable for history services using
--minimum-step
. - (feature) You can now always click on Builder text labels to edit them.
- (improve) The startup beep on the Spark 4 is now more polite.
- (improve) When disabling the Setpoint Driver block, a prompt is shown to confirm the new settings for the target Setpoint block.
- (improve) An error message is shown in the UI if the
history
service is not reachable. - (improve) Long-running Graphs automatically reload when the number of live points exceeds the maximum.
- (improve) History graphs now update every 10s (down from 30s).
- (improve) Improved the Troubleshooter widget for Spark services.
- (improve) To prevent confusion, the default snapshot archive name has been changed from
brewblox.tar.gz
tobrewblox-snapshot.tar.gz
. - (improve) The
spark-one
service is no longer present by default when Brewblox is installed. - (improve) Timezone is now mounted in Docker containers where possible.
- (improve) Auto-generated block IDs for existing blocks now always use the block type, and not an interface type.
- (deprecation) Removed the deprecated Extra hold time field in the Mutex block. Extra hold time should be set in individual mutex constraints.
- (docs) Added documentation for installing a Tilt service on a Pi zero W.
- (docs) Updated reference documentation for Spark communication protocol.
- (docs) Added documentation for alternative hardware options for the service host.
- (docs) Added reference documentation for Sequence instructions.
- (docs) Referenced WG-Easy as an alternative approach to installing Wireguard for remote access.
- (fix) Fixed controller slowdown and hangups when one or more OneWire devices were disconnected.
- (fix) Remove block and continue when block data is corrupted on the controller.
- (fix) Resolved block create errors when the firmware assigns a numeric ID which is already known to the service.
- (fix) Fixed various broken links in documentation.
- (fix) Fixed Spark 4 Over The Air (OTA) updates.
- (fix) Spark 4 OTA updates no longer use a placeholder signing key.
- (fix) The UI no longer incorrectly shows the firmware update prompt when the controller repeatedly reconnects.
- (fix) The Spark 4 no longer sometimes goes into Wifi provisioning mode on startup.
- (fix) Confirmed values in the Quick Actions widget are now applied and updated correctly.
- (fix) SSR (+ only) modes in the GPIO editor no longer revert to standard SSR when the editor is re-opened.
- (fix) The Spark relations page now always correctly re-renders when switching between services.
- (fix) Resolved an error when clearing all blocks on a Spark service.
- (fix) Fixed the “Disable all setpoints” Quick Action generated by the HERMS Quickstart wizard.
- (fix) The SysInfo widget now correctly shows the IP address for Spark 4 controllers.
- (fix) Brewblox configuration directories are now created if they do not exist, and will not cause startup errors.
- (fix) The Spark 4 is now better able to switch between ethernet, Wifi, and Wifi provisioning.
- (dev) Firmware dates are now expressed as ISO-8601 date string.
- (dev) Added firmware-side implementation for block updates with partial data (patching).
- (dev) Replaced the “driving” mechanism with claims.
- (dev) Updated the published Spark state to be more explicit about connection status.
- (dev) Reorganized the firmware repository.
- (dev) Simplified the dev env setup for firmware development.
- (dev) Generic system settings were moved from the Ticks and DisplaySettings blocks to SysInfo.
- (dev) Removed the Ticks system block.