Relevant links:
- User guides: https://brewblox.netlify.app/
- 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 2020/08/26
Updates 2020/08/31
- (fix) Session log graph notes no longer incorrectly show an error that end date is before start date.
- (fix) Restored the pause/resume autoconnect button in the Spark troubleshooter.
- (fix) The
traefik
service now correctly restarts after a Pi reboot. - (feature) Added the
brewblox-ctl service pull
command, that can be used for updating single services without performing a fullbrewblox-ctl update
. - (improve) Added current status for Brewblox service containers to
brewblox-ctl log
output. - (improve)
avahi-daemon
is added to the list of apt packages installed bybrewblox-ctl install
.
firmware release date: 2020/08/24
This release is bigger (and took longer) than usual. We’re introducing new features, but we’re also working towards having a stable and well-documented API that can be used for hobby projects or third-party applications.
To make the automation service more flexible, we’re introducing scripted actions and conditions. These provide an alternative to the existing UI-based configuration.
Brewblox is gradually becoming more stable, and we decided now is a good time to add public documentation for block data types. This will help anyone who wants to listen in on block state events or use their own service, script, or application to read or write blocks.
Recently, we switched from AMQP events to MQTT. We’re very happy with how this turned out, and are now updating the eventbus
service to run Mosquitto. This lets us use some very useful MQTT features that were not available in RabbitMQ.
The infrastructure for Spark discovery over Wifi has been improved, resulting in the removal of the mdns
service.
We also added two more Quickstart wizards, and gave the block / block widget wizards an overhaul.
Automation scripts
While implementing automation functionality, the limitations of a fully UI-based configuration became noticeable. If the action or condition is repetitive, complicated, or uncommon, then it quickly becomes cumbersome or even impossible to configure.
Our solution is to implement an optional JavaScript sandbox for actions and conditions.
Some of the highlights:
- The scripting API is optional.
Scripts are not a replacement for UI-based configuration.
They are an extension of the Brewblox design philosophy, where we build everything to be flexible and accessible, but add shortcuts to make the popular easy.
Here, scripts provide the flexibility, and the UI-based options are the shortcuts.
- The UI code editor helps.
The script editor has multiple features to make it easier to write and test your scripts.
While editing, you can run the script in the automation service, and immediately see the output.
We also added snippet generators for common functionality. These snippets can ask you some questions, and will then generate code.
For example, the Get block field
snippet will show you a dropdown to select a block and field,
and will then add the getBlockField()
function call with the arguments already filled in.
- Helper functions are included.
There are functions to get and set block values, but also to help you check values.
For example, the qty(value, unit)
function helps you write conditions where unit conversion is handled automatically.
Block types
With the introduction of the automation scripting sandbox, users can now access the raw block data.
To help with that, we’re declaring blocks a public interface, and added reference documentation.
Starting with the next release, we’ll use a deprecation period if we have to make any breaking changes to block data types.
Eventbus migration
In the 2020/06/15 release, we started to migrate from the AMQP event protocol to MQTT.
This release we’re making the MQTT-only Mosquitto broker the default image for the eventbus
service.
We’re not aware of any third-party service still relying on AMQP, but you can switch back to using RabbitMQ if you want to.
To do so: add the following service override to your docker-compose.yml file.
eventbus:
image: brewblox/rabbitmq:${BREWBLOX_RELEASE}
Do note that the deprecation period for AMQP support ends 2020/09/15. After that, all AMQP events will be ignored.
mDNS changes
Previously, Brewblox used a separate service to do Wifi discovery of Spark controllers.
We’ve revisited this design, and replaced it with a change to the avahi-daemon configuration on the host.
This means we now have one less service, and no longer use port 5000.
For more details, see the decision document.
This change does depend on the host environment and network layout.
The change to Avahi settings is kept optional, and we mapped multiple alternatives. If you want to run Brewblox on a system without Avahi, or are having problems with the new settings, feel free to drop us a message.
Wizardry
This release includes two more Quick Start wizards: Brew kettle, and Fridge without beer sensor.
Brew kettle produces a control chain for a single input/output heater, comparable to the BK in a HERMS setup.
Fridge without beer sensor produces the same output as the Fermentation fridge wizard,
but without the beer mode controls.
This is useful if you wish to (temporarily) use your fermentation chamber as a normal fridge.
A common issue when running Quick Start wizards was that you’d arrive at the hardware step,
and then had to figure out if your beer sensor was New|TempSensorOneWire-1
or New|TempSensorOneWire-2
.
We can’t magically decide what the purpose is of a newly discovered sensor, but we can help with identification. Most wizards now start with a discovery step. Here you are shown the current status and measured value of available OneWire sensors and chips, with prominent “change block name” buttons.
Unplug a device, and one of these blocks will suddenly have a disconnected status.
Block (widget) wizards were somewhat clunky, so we reworked those, and added a New Block option to wizardry.
In the New Widget wizard you can create a widget that is based on either a new, or an existing block.
In the New Block wizard you can create a new block, and optionally add a widget for displaying your block on a dashboard.
Changes
- (improve) Changed the default eventbus broker from RabbitMQ to Mosquitto.
- (remove) Removed support for UI plugins.
- (feature) Added the New Block wizard to the Wizardry menu.
- (feature) Quick Start wizards now have a step for identifying and renaming discovered blocks.
- (feature) Added the Brew kettle Quick Start wizard.
- (feature) Added the Fridge without beer sensor Quick Start wizard.
- (feature) Added a Builder part for the Setpoint Driver block.
- (improve) If the PID is controlling a Setpoint Driver, values in PID and Setpoint Driver parts are automatically converted to user temp units.
- The underlying value is still unitless degC.
- (improve) Added a Setpoint Driver part to the Builder layout generated by the HERMS Quickstart wizard.
- (feature)
brewblox-ctl setup
andbrewblox-ctl update
enable reflection in the avahi-daemon config. This removes the need for a separatemdns
service. - (remove) Removed the
mdns
service. - (improve) The Spark service no longer relies on the
mdns
service for Wifi device discovery. - (improve) Spark device discovery in
brewblox-ctl
no longer requires pulling and running anmdns
container. - (improve) Removed the
--mdns-port
setting frombrewblox-ctl service ports
. - (documentation) Added documentation for the state/history events published by the Spark service.
- These events are now considered a public interface, meaning we’ll strive to make any changes backwards compatible. A deprecation period will be used if this is impossible.
- (documentation) Added documentation for block types. You can find it at https://brewblox.netlify.app/dev/reference/block_types.html.
- Blocks are now also considered a public interface spec.
- (improve) Updated traefik and traefik label syntax to v2.
- (feature) The DS2408 block can now toggle between Valve mode and Actuator mode.
- (feature) The last controller actions before shutdown are now logged when the Spark service connects. This will help us debug controller crashes.
- (improve) The UI now immediately shows updated status if the Spark service stops or crashes.
- (improve) If the Spark service is unable to connect to a controller, it will gradually increase the retry interval.
- The minimum interval is 2s, the maximum is 30s. After 20 failed attempts, the service increases the interval, and restarts.
- The retry interval is reset when a connection attempt succeeds.
- (improve) Generated (default) labels in Graph/Metrics widgets now support degree units other dan Celsius/Fahrenheit/Kelvin.
- For example:
sensor/value[degP]
will have the default graph label[sensor] value °P
. - This change is not applied retroactively. To update the default label, remove and re-add the field.
- For example:
- (feature) The legend in graphs now shows the latest value for each field.
- (improve) Improved dialogs for selecting blocks / block fields.
- (feature) In dashboard edit mode, you can now move selected widgets by using the arrow keys.
- (feature) In Brewery Builder, you can now move selected parts by using arrow keys.
- (feature) You can now double click on widgets to toggle between Basic and Full modes.
- (improve) Improved the block wizard and block widget wizard layout.
- (improve) Overlaid dialogs now show a “back” button instead of a “close” button.
- (feature) Added the
brewblox-ctl add-plaato
command to add a service for the Plaato digital airlock. - (feature) Added the
brewblox-ctl makecert
command to generate SSL certificates. - (feature) Added the
brewblox-ctl libs
command to reload the release-specific commands. - (improve) Tweaked Influx settings to reduce SD card wear and tear.
- (improve) Added
dmesg
to the log generated bybrewblox-ctl log
. - (improve)
brewblox-ctl add-spark
now shows a warning if an existing Spark service is found that has no--device-id
or--device-host
flag set. This prevents errors where both services attempt to connect to the same controller. - (improve)
brewblox-ctl setup
no longer creates the Home dashboard and spark-one service in the UI. Quick Start wizards and service autodiscovery made presets redundant. - (improve) Added the
--quiet
flag when installing Python packages inbrewblox-ctl update
. - (improve) If the digital actuator state is pending, the Valve part will now show a spinner. This mirrors behavior of the ON/OFF button shown in digital actuator / valve / pin array blocks.
- (improve) The enable/disable toggle in blocks is now more consistent, and mentions which block is (or isn’t) driven.
- (update) Updated device-os in firmware to 1.5.2, with fix for uninitialized variable in network handler.
- (improve) Improved test coverage tooling in firmware.
- (fix) Fix rounding errors when converting Celsius to Fahrenheit in firmware.
- (fix) Reduced impact of OneWire disconnects and communication errors in firmware, so they do not slow down the system.
- (fix) The history service now correctly discards invalid history event data.
- (fix) Fixed a bug where min/max range overrides in the Graph were converted to string values.
- (fix) Dashboard widgets no longer make sudden large jumps when being dragged.
- (fix) The Setpoint Profile graph is no longer sometimes initially rendered much smaller than the widget.
- (fix) Fixed a bug where Spark blocks were not correctly logged in
brewblox-ctl log
. - (fix) Moving widgets no longer causes a document update conflict in the datastore.
- (fix) The shelf height in the Fridge part is now editable again.
Automation changes
- (improve) Improved visibility for inactive automation elements.
- (improve) The title property is now editable when adding a new automation action/condition.
- (improve) The automation editor is now enabled on mobile or small screens.
- (fix) The automation editor now shows the correct template when loading a
/ui/automation/<template-id>
URL. - (feature) Added
Scripted action
. - (feature) Added
Scripted condition
. - (feature) Added code snippet generators to the script editor.
- (improve) Block value conditions now correctly convert quantity values (eg. degC/degF) if the condition and block use different units.
- (fix) HTTP Request action errors now show the error, and not just “request failed with status code XXX”.
- (fix) Changing block links in the Block change action no longer causes an error.