BrewBlox Tilt Service

Sorry for being so slow on this. Getting things working has taken a little tweaking and I haven’t had much time recently.

I’ve just pushed a new version that uses the bluez library for bluetooth. It seems more reliable. You should be able to update in the usual way. Worth noting there’s a bug in brewblox atm that makes first load of the web page very slow. So people might want to wait until that’s sorted in the next brewblox release.

EDIT: Also worth noting, you’ll likely see some errors about publishing data on start up of the service. This seems to be while another service comes up and settles down after a short while.

Hello j616s

I updated to the latest build of Brewblox yesterday, which looks to have updated the Tilt service, too.

I have been running for nearly 24 hours and so far it all looks good!

I am still getting reading from both Tilts, which is much better than previously where they would drop after a very short while.

Thank you very much for your work! :smiley:

I spoke too soon! :frowning:

Tilt values are no longer being grabbed for either one of my Tilts (currently just in water in the fridge). It looks like it was around an hour after my post.

Bugger :frowning: Anything useful in the logs?

Not sure if this looks correct, but running:
docker logs brewblox_tilt_1

Gives: https://termbin.com/lca2

It looks like it stopped logging anything before the above post. I just retarted the Pi now and it is logging values from the Tilt agin.

Odd. There’s nothing in there at all. Not even the default brewblox service info. Unfortunately, my tilt’s battery seems to have gone so I can’t test on my end atm.

Yes, that is what I thought. Odd. :slight_smile:

Is there any specific testing you owuld like me to try? I am happy to test what I can. I have just put a beer in the chamber, so as long as I do not mess with the profile I can do whatever testing is required.

Jerry

Nothing in particular. But if you could grab any logs if you see it again, that’d be great.

Logging of the Tilt stopped again at 08:08 today.

Running:

docker logs brewblox_tilt_1

Gives similar output to last time, with repeated lines like:

2019/10/06 11:26:35 ERROR brewblox_tilt Error when publishing data AmqpClosedConnection()
2019/10/06 11:26:36 WARNING aioamqp.protocol only PLAIN login_method is supported, falling back to AMQPLAIN
2019/10/06 11:26:36 WARNING aioamqp.protocol only PLAIN login_method is supported, falling back to AMQPLAIN
2019/10/06 11:26:36 ERROR brewblox_tilt Error when publishing data AmqpClosedConnection()
2019/10/06 11:26:40 WARNING aioamqp.protocol only PLAIN login_method is supported, falling back to AMQPLAIN

(See https://termbin.com/yarg )

So in here there was nothing since 11:26 yesterday, so no indication of any reason for logging to have stopped this morning.

/var/log.kern.log ( https://termbin.com/9nwwh - tail of log: https://termbin.com/7j0j ) gives many lines complaining of frame reassembly failing, with a few like:

Oct 7 08:08:44 fridgepi kernel: [70995.712114] Bluetooth: hci0: SCO packet for unknown connection handle 304
Oct 7 08:08:44 fridgepi kernel: [70995.712136] Bluetooth: hci0: Frame reassembly failed (-84)
Oct 7 08:08:44 fridgepi kernel: [70995.712152] Bluetooth: hci0: Frame reassembly failed (-84)
Oct 7 08:08:44 fridgepi kernel: [70995.764749] Bluetooth: hci0: Frame reassembly failed (-84)
Oct 7 08:08:44 fridgepi kernel: [70995.764826] Bluetooth: hci0: advertising data len corrected

The last entry in the log for Bluetooth is:

Oct 7 08:08:58 fridgepi kernel: [71009.038529] Bluetooth: hci0: hardware error 0xa9

This corresponds to when I see the last entries logged from the Tilt:

Not sure if any of the entries in kern.log from start up until the frame reassembly errors shed any light on what is happening?

Again, thanks for all your work on this!

Ah. Think your links are missing something. The first link (and the one you posted last time) only has a message for what the escape key combination is.

The kernal logs might be useful. Would indicate problems in the stack on the host rather than in the docker container, though. Which might be harder to fix. Given restarting the container fixes things, I might look into weather I can add some sort of heartbeat to the container.

Strange, the below link does seem to show the message for hitting CTRL-C. I guess the output of that command is not going to std-out, but to stderr.

Running again (with both streams):

docker logs brewblox_tilt_1 -f 2>&1 | nc termbin.com 9999

Gives the output in https://termbin.com/3ygk

The links in the comment about kern.log do work for me, can you recheck them please? The first is from the start of the log, the second is the tail (as the output exceeds termbin’s maximum size).

All looking good now. I’ll try and put some time to this soon. Like I say, think the best approach is going to be some kind of heartbeat/healthcheck on the container.

@jerryp if you run brewblox-ctl log, it will automatically include a full log dump for containers (not sys or kernel logs).

@j616s the service is likely already running with a restart: always flag. Feel free to raise a SystemExit to force a service restart.

Those amqp errors seem off - normally it only logs errors about failing to connect, and then a single warning about the fallback to plain. I’ll run other services tomorrow without muting repeated errors, see how that looks like.

@Bob_Steers log uploaded https://termbin.com/jtqd
That is a clever feature. :slight_smile:

Finally bottled my belgian. Been trying the exit approach but testing has been hampered by the battery life being zilch atm. Anyone else had issues with battery life on the old Tilts or is it probably just my stash of batteries not storing well?

@j616s I have found the older tilt batteries to be dire, In the past I had put a new battery in at the beginning of fermentation and have it not working by the end. Like you I was not sure if it was fake batteries on Ebay that was the problem.

Upgraded to V2 Tilit and that has had the same battery now for over 3 months.

I am trying to install the brewblox-tilt service. The instructions on Github are not completely clear to me. I am stuck at deploying the tilt docker image. In the instructions it only says to deploy with ‘rpi-latest for the arm architecture (when deploying on a RaspberryPi)’
Can anyone help me out?

Unless you’re doing anything out of the ordinary, you can skip forward to https://github.com/j616/brewblox-tilt#alternative-install-script

Yes I now but where do I get the tilt_installer.py?
How to copy it to the breblox directory I don’t know either but that I can figure out :slight_smile:

tilt_installer.py is a script in the github repository. The simplest way to create and run it on your Pi is to run the following commands in the brewblox directory:

curl https://raw.githubusercontent.com/j616/brewblox-tilt/develop/tilt_installer.py > tilt_installer.py
python3 ./tilt_installer.py