Brewblox release 2020/05/04

Relevant links:

Brewblox release 2020/05/04

Firmware release date: 2020/05/03

Spark simulator

We now officially support Spark simulation on the Raspberry Pi.
This means that you can run a fully simulated Spark, instead of the actual hardware, to experiment with settings, or try before you buy.
The code used by the simulator is the actual firmware code running on the Spark, with some changes for simulation of course.

You can find instructions on how to add and use it at https://brewblox.netlify.app/user/adding_spark_sim.html.
From now on, the simulator is embedded in the devcon container. If you used the preview simulator, please update by running

brewblox-ctl add-spark --name spark-sim --force --simulation

New MDNS library (firmware)

We found out that one of the reasons for instability was running out of memory.
A big consumer of memory was a third party MDNS library. MDNS resolves .local addresses and automatically finds your Sparks on the network.

Elco refactored the MDNS library to use much less memory and cpu.
It is available here to use in your own projects.

PR #217

Interpolate values in output of slower filter stages (firmware)

Sensor data runs through max 6 filter stages. Each stage runs at a slower update rate as the previous.
This resulted in blocky output for slow filters.
I added linear interpolation between values of slower updated filters, for a smooth output.
See the image below for the before and after.

PR #225

PID improvements to make the derivative much more usable (firmware)

The PID reads the derative from a certain filter stage depending on the value of the Td time constant.
The default filter it selected was very slow, larger than Td, to not have much noise.
But this meant that the derivative used by the PID was also delayed a lot. Not helpful if you want to prevent overshoot!

With the new filter implementation, the PID can work with a lot less filtering, and the selected filter delay is now 25-50% of Td.
The derivate part will also only be active if it counteracts the proportional part (if it prevents overshoot).

You’ll find that the derivative part of the PID is now a lot more predictable and more effective.

PR #226

PWM improvements to look more towards the future (firmware)

The calculations for the achieved PWM value only looked back, not ahead. This meant the PWM value always lagged the setting.

  • The PWM now looks ahead for what it can achieve and limits how far it looks back.
  • When at 0% or 100%, the achived value now also slowly changes.
  • A minimal low/high time is introduced to prevent two short bursts when the setting increases quickly.

PR #217

Reduce memory used by filters in setpoints (firmware)

Another change to reduce memory use is to create filter stages on demand.
When you change the filtering in a setpoint, or the Td value of a PID, the setpoint will create only the needed filter stages.

PR #223

Fix fluctuations in mock sensors (firmware)

For testing, you can add periodic fluctuations in a simulated mock sensor.
I fixed some bugs and they now work as expected.

PR #224 and PR #218

Other changes

  • (feature) Added indicator icons for connection type (wifi | usb | simulation) in sidebar.
  • (feature) UI temperature units and display settings units are now settable in the same dialog. The dialog can be accessed from both the Display Settings block and the service actions.
  • (removed) Dropped support for Kelvin temperature units.
  • (removed) Time and LongTime units are no longer configurable.
  • (improve) Made Quick Actions editor less cluttered.
  • (fix) Fixed a bug where PID settings were not correctly editable in Quick Actions.
  • (feature) Setpoint Profile profiles now support import/export from and to file.
  • (feature) Quickstart wizards in simulation services now offer to create mock sensors.
1 Like

Post update cannot flash Spark.pi update.txt (4.7 KB)

Yes, the update process is still finicky. It usually works on a retry.

I’ll try it a 4th time :slight_smile:

Update.txt (22.3 KB)

Can you share your log? If it keeps failing, try it over USB.
If it still fails, use ‘brewblox-ctl flash’

This is USB. Looks like port now closes when closing the normal connection.
May need to introduce a short wait or some retries.

AFAIK it is usb. Unless it has switched without my knowledge or input. Anything I can do now?

If you’re on USB anyway, the most reliable approach would be to use brewblox-ctl flash.

I’m afraid, during update something went wrong. The update-process looked a bit different than usual. Brewblox is still running in the version before release 2020/05/04. Because of that I wanted to restart the update. But it seems like I have lost some files in the brewblox-directory.
I’ve got the message, that the command “brewblox-ctl” was not found.
I would’nt be happy if I had to reinstall everything. Do you have an idea, what happened and how to solve the problem?

I had the same issue attempting to flash through the GUI over USB. Never had an issue before. brewblox-ctl flash worked fine to flash.

Could you run the following commands:

pip3 install --user brewblox-ctl
brewblox-ctl --help

If that can’t find it, please run

echo $PATH
ls ~/.local/bin

Seems like you’re still suffering from a bug in the previous Raspbian version where .local/bin is not in PATH.
To fix this, run

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
exec $SHELL

brewblox-ctl should now be available. If it’s not, restart your Pi.

brewblox-ctl is available now. But the update-process ends with that problem:

pip3 install --user docker-compose

I’m guessing you interrupted the update after it uninstalled one version, and before it reinstalled using the --user flag.

Thank’s Bob. Everything works fine again.

Done. Needed a brewblox-ctl restart after that, then it worked.

I just updated; everything went fine except the services did not start up after it finished updating, but a quick brewblox-ctl up from the CLI and everything was fine. I also flashed the firmware via CLI and not the GUI.

That’s really nice. Thanks.

1 Like