Brewblox release 2021/11/29

Relevant links:

Brewblox release 2021/11/29

firmware release date: 2021-11-29

On the firmware side of things, we have made progress hunting down the bug that causes hangups on the Spark 2/3. We’re still having problems consistently reproducing it, but have narrowed down the scope, and identified a likely fix.
The problem appears to be triggered by Wifi disconnects. This includes the router stopping or restarting, but also channel and repeater changes.

We improved the code that handles Wifi disconnects. The immediate effect is that the Spark no longer requires a fixed Wifi channel, but we’re not sure whether this resolves all hangups. Please let us know if you continue to experience them.

Apart from firmware bug hunts, we have also reworked the Tilt service to support custom and unique device names.
Previously, if multiple Tilt devices of the same color were detected, their data would be arbitrarily mixed.
Now, a unique name is generated for every Tilt. The default name is still the color, but after the first, it will increment the name.
For example, if you have three red Tilts, you will end up with the device names Red, Red-2, and Red-3. You can set custom device names for all Tilts in the UI.

Existing calibration files are compatible with the first generated name. If you only have a single Tilt, you do not need to make changes.

The field names in the Tilt history data have changed. You will need to update the used fields in Graph widgets.

  • Temperature[degF] / Temperature[degC]temperature[degF] / temperature[degC]
  • Specific gravityspecificGravity
  • Plato[degP]plato[degP]

Before, the Calibrated temperature and Calibrated specific gravity fields would be added if calibration data was present. Now, if calibration data is present, the default fields (temperature, specificGravity, plato) will show calibrated data, and the uncalibratedTemperature / uncalibratedSpecificGravity / uncalibratedPlato fields are added to show raw data.

The UI now also supports setting a preferred unit for Specific Gravity values: unitless Specific Gravity, or degrees Plato. The new Display: Tilt Builder part will show temperature and gravity in the preferred units. Values for all units are still included in history data.

For a comprehensive overview of changes, see Update spec for Tilt events to include unique addressing and improved property names · Issue #2 · BrewBlox/brewblox-tilt · GitHub.
For setup and calibration instructions, see GitHub - BrewBlox/brewblox-tilt: Brewblox service for the Tilt hydrometer.

Note: if Tilt data does not show up in the UI after updating, you may still be using the original third-party Tilt service. To fix this, run brewblox-ctl add-tilt -f.

Changes:

  • (feature) The Tilt service now generates unique names if multiple devices with the same color are detected.
  • (feature) The Tilt service now supports custom device names.
  • (feature) Added the Steam Condenser Builder part.
  • (feature) Added the Tilt Display Builder part.
  • (feature) Added Ground and Power Only channel types to the OneWire GPIO Module editor.
  • (feature) The last used action in Quick Actions is now highlighted.
  • (feature) Updated field names in history data published by the Tilt service.
  • (feature) Preferred Specific Gravity units are now configurable in the admin page. The choices are SG and Plato.
  • (feature) Blank lines and comments in docker-compose.yml will no longer be overwritten during brewblox-ctl update.
  • (feature) Added the brewblox-ctl termbin {FILE} command. This generates a shareable termbin.com URL for a given text file (as used in brewblox-ctl log).
  • (feature) Services and dashboards can now be hidden from view in the sidebar. You can toggle this setting in the admin page.
  • (improve) brewblox-ctl will now explicitly disable IPv6 in avahi daemon configuration.
  • (improve) brewblox-ctl no longer depends on nc being installed system-wide. This helps with running brewblox-ctl log on Synology systems.
  • (improve) The brewblox install script lists required Apt packages if apt-get is not detected.
  • (improve) brewblox-ctl no longer depends on netstat being installed system-wide.
  • (improve) Removed tio and net-tools from installed apt packages.
  • (improve) brewblox-ctl http {METHOD} {URL} --pretty now generates valid JSON.
  • (improve) Generated mounted volumes in docker-compose.yml and docker-compose.shared.yml now use the more explicit syntax.
  • (improve) Tilt data is now included when running brewblox-ctl backup save.
  • (improve) Renamed brewblox-ctl fix avahi-reflection to brewblox-ctl fix avahi.
  • (improve) The Tilt service now waits on startup until a Bluetooth dongle or chip is detected on the host.
  • (fix) Resolved firmware hangups in the Spark 2/3 when the Wifi access point switches channels.
  • (fix) Fixed a bug when importing a Builder layout that references a non-existent Spark service.
  • (fix) Service overrides in docker-compose.yml that do not have a image field do no longer cause Spark discovery to crash.
  • (fix) brewblox-ctl and the brewblox install script now use apt-get instead of apt to avoid conflicts on MacOS.
  • (fix) brewblox-ctl wifi now correctly uses pyserial-miniterm instead of miniterm.py. Same program, different name.
  • (fix) Tilt Bluetooth events no longer get drowned out by other non-Tilt Bluetooth Low Energy devices.
2 Likes

Really appreciate all the effort in hunting down these wifi related hangups.

1 Like

I updated and added the new tilt service (I think I was using the old one still). Now I do not see the Tilt service in my ui. Where did it go?

brewblox-ctl log output: https://termbin.com/izdp

Configuration looks good. I did once have a local problem that I had to resolve by enabling BLE on the host.

The solution here then resolved the problem (first stop the tilt service)

Unfortunately that did not work. I get “No default controller available”. Weird that is was working before I ran brewblox-ctl add-tilt -f

EDIT: I don’t know what changed, but now my RPi seems to be able to see BLE devices using the bluetoothctl tool. I tried removing and re-adding the tilt service, but I still am not seeing the tilt service on my brewlbox ui

Bluetooth adapters and their settings can be downright confusing and obtuse.

To enter the bluetoothctl menu:

brewblox-ctl down
sudo bluetoothctl

This will open a subshell to interact with bluetooth controllers.

To list controllers, use list
Example:

[bluetooth]# list
Controller B8:27:EB:49:54:3C washberry [default]

If your controller is not marked as default, use select {MAC ADDRESS}
Example:

[bluetooth]# select B8:27:EB:49:54:3C

To show detailed info, use show
Example:

[bluetooth]# show
Controller B8:27:EB:49:54:3C (public)
        Name: washberry
        Alias: washberry
        Class: 0x00000000
        Powered: yes
        Discoverable: no
        Pairable: yes
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0532
        Discovering: no

If Powered is no, then run power on

After that, go to the scan menu, enable Low Energy, and clear filters (if any). Use back to return to main menu.

menu scan
clear
transport le
back

Example:

[bluetooth]# menu scan
Menu scan:
...
[bluetooth]# clear
SetDiscoveryFilter success
[bluetooth]# transport le
[bluetooth]# back
Menu main:
...

Then use scan on to scan here.
Example:

[bluetooth]# scan on
SetDiscoveryFilter success
Discovery started
[CHG] Controller B8:27:EB:49:54:3C Discovering: yes
[NEW] Device 78:E5:35:78:0F:94 78-E5-35-78-0F-94
[NEW] Device C4:DD:57:66:BB:1A PROV_BREWBLOX_66BB18
[NEW] Device 7A:6D:06:DD:0A:B3 7A-6D-06-DD-0A-B3
[NEW] Device DD:7F:97:FC:14:1E DD-7F-97-FC-14-1E
[CHG] Device 78:E5:35:78:0F:94 RSSI: -77
[CHG] Device C4:DD:57:66:BB:1A RSSI: -24
[CHG] Device 7A:6D:06:DD:0A:B3 RSSI: -67
[CHG] Device C4:DD:57:66:BB:1A RSSI: -36
[CHG] Device 7A:6D:06:DD:0A:B3 RSSI: -79
[CHG] Device DD:7F:97:FC:14:1E RSSI: -77
[CHG] Device DD:7F:97:FC:14:1E ManufacturerData Key: 0x004c
[CHG] Device DD:7F:97:FC:14:1E ManufacturerData Value:
  02 15 a4 95 bb 40 c5 b1 4b 44 b5 12 13 70 f0 2d  .....@..KD...p.-
  74 de 00 44 04 1e c5

In this case, DD:7F:97:FC:14:1E is a Tilt, but pretty much as soon as devices show up, it’s fine.
Exit bluetoothctl by running exit, and start brewblox again.

Edit:

Did you refresh the UI? Is Tilt data showing up in graphs?

I will go through your detailed guide above. Thanks! To answer your question, yes I ran brewblox-ctl up, and have refreshed the page several times. The is no service titled “tilt” under my list of services. There is data in the graph, but is old data from before my tilt disconnected. No current data.

I went through the steps and I’m now able to see numerous bluetooth devices (including my neighbor’s TV?) but I’m not sure how to tell whether one is a Tilt. FYI, I use a Tilt Repeater–not sure if that makes a difference here. The puzzling thing is that there is still no Tilt service listed in my UI

I checked, and the Tilt service does not publish if it doesn’t see anything. I’ll probably add something for that, so you at least can see the service is online, even if it doesn’t spot anything.

If you run brewblox-ctl follow tilt, it’ll log something the first time it spots a Tilt.

I don’t personally have one, but I’m not aware of any issues with Tilt repeaters.

pi@raspberrypi:~/brewblox $ brewblox-ctl follow tilt
Attaching to brewblox_tilt_1
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_tilt.names             Device names loaded from `/share/devices.yml`: {}
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_tilt.parser            Calibration values loaded from `/share/SGCal.csv`: keys=()
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_tilt.parser            Calibration values loaded from `/share/tempCal.csv`: keys=()
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.service        Service name: tilt
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.service        Service info:  @ Mon Nov 29 16:59:28 UTC 2021
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.service        Service config: {'host': '0.0.0.0', 'port': 5000, 'name': 'tilt', 'debug': False, 'mqtt_protocol': 'wss', 'mqtt_host': '172.17.0.1', 'mqtt_port': None, 'mqtt_path': '/eventbus', 'history_topic': 'brewcast/history', 'state_topic': 'brewcast/state', 'lower_bound': 0.5, 'upper_bound': 2, 'inactive_scan_interval': 5, 'active_scan_interval': 10, 'simulate': None}
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.mqtt           Starting <EventHandler for wss://172.17.0.1:443/eventbus>
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.mqtt           listen(brewcast/tilt/tilt/names)
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_service.mqtt           subscribe(brewcast/tilt/tilt/names)
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_tilt.broadcaster       Looking for Bluetooth adapter...
tilt_1       | 2021/11/30 20:42:17 INFO     brewblox_tilt.broadcaster       Found Bluetooth adapter hci0
tilt_1       | 2021/11/30 20:42:20 INFO     brewblox_service.mqtt           <EventHandler for wss://172.17.0.1:443/eventbus> connected

Here is the output I see when I run that command

That’s normal. It’s now scanning, but hasn’t seen anything. new logs will automatically show up until you press Ctrl-C.

In bluetoothctl, if you see this line, it’s an iBeacon

[CHG] Device DD:7F:97:FC:14:1E ManufacturerData Key: 0x004c

Not all iBeacons are Tilts, but it’s a pretty good indication.

ok, yeah I see that one!

If you see it, what is the value for ManufacturerData Value?
In the above example that’s

[CHG] Device DD:7F:97:FC:14:1E ManufacturerData Value:
  02 15 a4 95 bb 40 c5 b1 4b 44 b5 12 13 70 f0 2d  .....@..KD...p.-
  74 de 00 44 04 1e c5

This includes the UUID. Everything except the fourth byte in the UUID is the same for all tilts. The fourth byte (40 here) indicates the color.

.. .. a4 95 bb 40 c5 b1 4b 44 b5 12 13 70 f0 2d 74 de .. .. .. .. ..

Do you think any of these devices are Tilts?

[CHG] Device A4:C1:38:81:49:C8 ManufacturerData Key: 0xec88
[CHG] Device A4:C1:38:81:49:C8 ManufacturerData Value:
  00 03 12 dd 45 00                                ....E.          
[CHG] Device A4:C1:38:81:49:C8 ManufacturerData Key: 0x004c
[CHG] Device A4:C1:38:81:49:C8 ManufacturerData Value:
  02 15 49 4e 54 45 4c 4c 49 5f 52 4f 43 4b 53 5f  ..INTELLI_ROCKS_
  48 57 50 75 f2 ff c2                             HWPu...         
[CHG] Device 66:0E:6B:FF:97:75 ManufacturerData Key: 0x004c
[CHG] Device 66:0E:6B:FF:97:75 ManufacturerData Value:
  0c 0e 08 9e 35 33 e9 04 67 e7 82 79 23 8f 36 55  ....53..g..y#.6U
  10 06 4b 1d 1e d5 68 48                          ..K...hH        
[CHG] Device 7B:B4:7A:49:6C:65 ManufacturerData Key: 0x004c
[CHG] Device 7B:B4:7A:49:6C:65 ManufacturerData Value:
  10 05 43 1c d1 d0 0a                             ..C....         
[CHG] Device 45:5D:BD:4E:4A:59 RSSI: -74
[CHG] Device 45:3F:29:C6:88:36 ManufacturerData Key: 0x004c
[CHG] Device 45:3F:29:C6:88:36 ManufacturerData Value:
  10 06 73 1e 14 58 06 dd                          ..s..X..   ```

Doesn’t look like it.

weird. OK, once my Tilt is no longer floating in a fermenter I’ll try again and see what I come up with. Thanks for your help!

Can you get the MAC address for your repeater some other way, and see whether it shows up? I haven’t personally tested it, so can’t rule out it publishes somewhat unexpected data.

The repeater is currently turned off. I found the Tilt in the bluetoothctl scan:

[CHG] Device EB:D4:3D:FA:87:9E RSSI: -92
[CHG] Device EB:D4:3D:FA:87:9E ManufacturerData Key: 0x004c
[CHG] Device EB:D4:3D:FA:87:9E ManufacturerData Value:
  02 15 a4 95 bb 20 c5 b1 4b 44 b5 12 13 70 f0 2d  ..... ..KD...p.-
  74 de 00 49 03 fb 05                             t..I...         

I followed the steps and stopped brewblox, ran the bluetoothctl procedure, then restarted brewblox, and unfortunately, I’m still not seeing my Tilt in the UI

Your bluetooth adapter works fine, so you can skip the various bluetoothctl commands if it consistently finds devices with scan on.

RSSI -92 is an extremely weak signal. This is most likely the problem.

unfortunately not. I took the Tilt out of the tank and placed it right next to the controller. I now see RSSI -42. Still no Tilt service loading on the UI