Brewblox release 2021/08/02 + 2021/08/09

Relevant links:

Brewblox release 2021/08/09

firmware release date: 2021-05-27

This is a minor bugfix release as follow-up to the 2021/08/02 release.

Changes:

  • (improve) Slightly reduced memory usage for brewblox-ctl database from-influxdb
  • (improve) Improved efficiency when polling the Spark for history/state data.
  • (fix) Widgets can no longer exceed screen width on mobile devices.
  • (fix) Date to now mode for graphs no longer fails to yield data.
  • (fix) The PWM duty setting field in the Quick Actions widget no longer immediately resets values.

Brewblox release 2021/08/02

firmware release date: 2021-05-27

Our planning has been upset somewhat lately, with Elco taking parental leave a lot earlier than expected.
To compensate, we’ve shifted a non-firmware task forward: the replacement of our history database.

New history database

InfluxDB announced that they will drop support for 32-bit architectures on 1/1/2022.
This is a deal-breaker for us, as Raspberry Pi OS has a 32-bit architecture.

We decided to go with Victoria Metrics as replacement, as it had the best combination of features and small CPU/RAM/disk footprint. For a more detailed explanation, you can find the decision document here.

Database migrations are always a big step, but we’re pretty happy with this one. Broadly speaking, it’s twice as fast, and uses half the memory.

Where the InfluxDB data required some custom handling, the Victoria Metrics model is much simpler.
It’s simple enough that you can add a Grafana service, and have it work as expected out of the box.

Your system will be immediately functional after updating, and will log data into Victoria Metrics. Older data will have to be copied from InfluxDB to Victoria.
For this, we made a data migration command

You can run the migrate command in the background. Depending on how much data you have, the migration takes minutes to hours.
Migrations can safely be stopped and restarted or resumed.
After the migration is done, you’ll still have all your old history data in the brewblox/influxdb/ directory.

Tilt Service

James Sandford’s brewblox-tilt service has been very popular for some years now, and we’ve decided to make it official.
James was happy for us to take over development and maintenance, so we forked his service.
The new service comes with support for the Tilt Pro.

You can install the new Tilt service by running brewblox-ctl add-tilt -f.

Graphical config editor

For common configuration changes, we add commands to brewblox-ctl.
You’ll still sometimes have to edit the configuration files themselves.

Terminal text editors have a pretty steep learning curve, but by now the Remote - SSH plugin for Visual Studio Code is stable enough that we’re happy recommending it.
This way you read and edit text files from the comfort of your own computer.

You can find the install guide here.

Changes:

  • (feature) Changed history database from InfluxDB to Victoria Metrics.
  • (feature) Added /victoria endpoint. /victoria/api/v1 is compatible with the Prometheus HTTP API.
  • (feature) Added /history/timeseries endpoints. For an overview, see /history/api/doc
  • (feature) The “hide after” period for Graph and Metrics fields is now customizable. The default is still 1d.
  • (feature) The maximized Graph widget is now a separate page with its own URL.
    • Refreshing the page will no longer close the graph.
    • You can bookmark the page to instantly visit the maximized graph.
  • (feature) We now maintain the Tilt service.
  • (feature) The Tilt service now supports the Tilt Pro.
  • (feature) Added brewblox-ctl add-tilt.
  • (feature) Added brewblox-ctl database from-couchdb command.
  • (feature) Added brewblox-ctl database from-influxdb command.
  • (docs) Added user guide for VSCode with SSH Remote plugin.
  • (docs) Updated Troubleshooting guide.
  • (docs) Added Grafana service install guide.
  • (docs) Documented advanced usage of brewblox-ctl database from-influxdb.
  • (improve) Added Apple PWA headers to the UI.
  • (improve) brewblox-ctl service remove no longer requires the -n/--name option for services, and can remove multiple services at once.
    • OLD: brewblox-ctl service remove -n spark-one.
    • NEW: brewblox-ctl service remove spark-one.
  • (deprecation) Removed the brewblox-ctl service editor command.
  • (deprecation) Removed /history/history endpoints.
  • (fix) The side pane graph in block widgets now correctly re-renders when the duration is changed.
  • (fix) The builder layout is now always correctly centered when opening the widget dialog.
3 Likes

Thanks guys! I got some relevant history migrated to the new database. It did crash when I tried to migrate ALL my history data, but worked when I did a smaller amount. On the UI, there’s still a quirk on iOS where the page doesn’t actually fit the screen size. This is something I noticed beginning with the last update on 5/25. Previous to that release, there was no sideways scrolling required on iOS. Now the page just barely doesn’t fit side to side. Is there a way to fix this so that the page fits laterally on the screen?

Did it mention how many lines total there were, or did it crash immediately? There’s already some tuning to keep memory use down, but I’ll see about further improvements.

I’ll have a look at max dashboard width on small screens. There’s probably some widget slightly wider than the screen, and it’s dictating overall width.

There were approximately 55,000 lines. I know that because it said it was doing 500/55000, then a few mins later it crashed.

Weird. 55 000 is relatively little: we tested with the expectation of values in the 6 and 7 digits.
Now looking at further reducing memory usage anyway. The alternative is running the migrate with --target file while the rest of the system is off, but that has the obvious disadvantage of the rest of the system being inactive while it’s busy.

Edit: found the widget width issue. It’ll be part of the next release (or a hotfix, if it turns out we need one).

@Bob_Steers

Kicked off the update and all is working, started the DB migration but after coming back the season has expired to the ssh terminal.

Is there a way to tell if I’m now migrated or should start again?

Cheers

Make a graph to show the “combined influx points field” for all your services, for as long as you’ve had this install. (You may need to increase the “hide after” field to select it)

If there’s a big gap at the end, migration was not yet done.

1 Like

Upgraded today with 31000 lines converted. Overall seems to work just fine.

One problem I am having with the graps are that I get:
No data (yet) for selected period
When I select from Date to now. It works fine if I only use duration to now. So the data is there, but not visible. I am not sure if this might have something to do with how dates are presented in different regions. I’m in Sweden and we have 24h time. Brewblox presents it as AM/PM…

It serializes dates using a standardized format, so locale preferences for AM/PM vs 24h shouldn’t matter.
I’ll have a look at Date to now behavior.

@Bob_Steers I have a similar problem. Switching to Duration to Now works, but Date to Now does not

I found the problem with the dates. I can probably get a fix in tomorrow or so, and suspect there’ll be a small release with fixes for the handful of bugs that have popped up.

1 Like

Perfect! I have a temporary workaround, so it is not a big issue at the moment

@Bob_Steers Thanks for the fix. The dates works now. Another thing that I have noticed though… My Setpoint Profile widget disappears after a couple of minutes. Refreshing the page gets it back. It looks like only this widget is affected for me.

Thanks for letting us know. I’ll make an issue to look into this when I have some time.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.