BrewBlox Tilt Service

Fantastic news. Thanks for letting me know :slight_smile:

@j616s

Seeing lots of these ing the log file. still logging though…

2019/04/23 03:26:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:28:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:28:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:28:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:28:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:29:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:30:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:31:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:32:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:37:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:37:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:42:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:42:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:43:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:44:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:45:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:45:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:51:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:53:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:54:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:54:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:54:12 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 03:56:42 ERROR    brewblox_tilt                   Waiter already exists
2019/04/23 04:05:42 ERROR    brewblox_tilt                   Waiter already exists

Yep. I think it’s something to do with when multiple updates are received form the Tilt in one logging cycle. I don’t think it’s causing any issues but I will try and make these go away in a future update :slight_smile:

That is great, thanks @j616s. I had been checking occasionally to see about the Tilt integration for the newer version.

I need to not have a beer in the fermentation fridge long enough to be able to rebuild my BrewPi! (It seems like a bad idea to try to rebuild when I have a beer fermenting!)

@j616s,

Think this error is a bit more of a problem. Only a reboot fixed it. Tried stoping and starting the Brewblox docker containers but that didn’t fix it.

2019/04/24 06:59:39 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:40 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:41 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:42 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:43 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:44 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:45 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/24 06:59:46 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
``

That’s not good. Will take a look as soon as I can. Think I have an idea what it might be so will look at fixing this and the previous issue in one go. Thanks for all your help/feedback with this btw. I’ve not spotted this issue or the issues you and others had with the service finding devices. So it’s really helpful to have others trying it.

In other news, the calibration code seems to be working. I just want to do a little more testing before I release that into the wild.

Sounds Great, Happy to help with the testing, I have two Tilts so will try the other one in another brew a sometime.

I’ve added a fix alongside the calibration code. Give it 30mins for travis to do its thing and you should be able to update to it. Details on the calibration are in the readme at https://github.com/j616/brewblox-tilt

@j616s

Ok updated, will give it a try and let you know.

Had these errors at start up but it is logging.

2019/04/24 19:26:20 INFO     brewblox_tilt                   Loop running & device found (may not be a Tilt)
2019/04/24 19:26:21 INFO     brewblox_tilt                   Found Tilt: Green
2019/04/24 19:26:26 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/24 19:26:33 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/24 19:26:40 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/24 19:26:47 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/24 19:26:54 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/24 19:27:01 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)

Thanks. I’m seeing those on start up too. @Bob_Steers might have some thoughts but it feels to me like the Tilt service is starting to send data before all the services/containers have started up fully. I’m inclined to avoid silencing them as those errors could be useful in diagnosing a genuine problem.

1 Like

Those errors are to be expected. You’ll see them as well in spark service logs (one error, and a resume message later).

2 Likes

@j616s, Still getting previous errors, a restart of the Bluetooth service, service bluetooth restart seems to get it going again.

I’m using a Pi V3 B, if the makes any difference, I have a 3 B+ on order for another project but will try that one once it arrives.

2019/04/25 07:16:03 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/25 07:16:05 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/25 07:16:06 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/25 07:16:07 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/25 07:16:08 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)
2019/04/25 07:16:09 ERROR    brewblox_tilt                   Encountered an error: Failed to execute management command 'scanend' (code: 11, error: Rejected)

Just to double check you’re running the new code, are you getting any warnings about the calibration files just before the Started TiltScanner message?

Did the update 1hr after you posted last night so assume I am running latest.

Here is a log from just after a restart and there are messages about calibration.

2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [POST] <PlainResource  /tilt/_debug/subscribe>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [HEAD] <PlainResource  /tilt/_service/status>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [GET] <PlainResource  /tilt/_service/status>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [GET] <PlainResource  /tilt/api/doc>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [GET] <PlainResource  /tilt/api/doc/>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [GET] <PlainResource  /tilt/api/doc/swagger.json>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [GET] <StaticResource  /tilt/api/doc/swagger_static -> PosixPath('/usr/local/lib/python3.7/site-packages/aiohttp_swagger/swagger_ui')>
2019/04/25 07:44:42 INFO     brewblox_service.service        Endpoint [HEAD] <StaticResource  /tilt/api/doc/swagger_static -> PosixPath('/usr/local/lib/python3.7/site-packages/aiohttp_swagger/swagger_ui')>
2019/04/25 07:44:42 INFO     brewblox_service.service        Feature [<class 'brewblox_service.scheduler.TaskScheduler'>] <brewblox_service.scheduler.TaskScheduler object at 0x767eb9f0>
2019/04/25 07:44:42 INFO     brewblox_service.service        Feature [<class 'brewblox_service.events.EventListener'>] <EventListener for "172.17.0.1">
2019/04/25 07:44:42 INFO     brewblox_service.service        Feature [<class 'brewblox_service.events.EventPublisher'>] <EventPublisher for "172.17.0.1">
2019/04/25 07:44:42 INFO     brewblox_service.service        Feature [<class 'brewblox_tilt.tiltScanner.TiltScanner'>] <brewblox_tilt.tiltScanner.TiltScanner object at 0x74ceadb0>
2019/04/25 07:44:42 INFO     brewblox_service.events         Closing <EventListener for "172.17.0.1">
2019/04/25 07:44:42 INFO     brewblox_tilt                   Calibration file /share/SGCal.csv loaded for colours:
2019/04/25 07:44:42 INFO     brewblox_tilt                   Calibration file /share/tempCal.csv loaded for colours:
2019/04/25 07:44:42 INFO     brewblox_tilt                   Started TiltScanner
2019/04/25 07:44:42 INFO     brewblox_tilt                   Loop running & device found (may not be a Tilt)
2019/04/25 07:44:42 INFO     brewblox_tilt                   Found Tilt: Green
2019/04/25 07:44:48 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/25 07:44:55 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/25 07:45:02 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)
2019/04/25 07:45:09 ERROR    brewblox_tilt                   Encountered an error: [Errno 111] Connect call failed ('172.17.0.1', 5672)

OK. You’re definitely on the new code then. I’ll have a search later and see if I can find anything.

1 Like

There seems to be some instability in Bluez, the Linux bluetooth stack, on the raspberry pi. At least with the version distributed on Raspbian. This thread has more info https://github.com/zewelor/bt-mqtt-gateway/issues/59 . Someone on there has reported having success using installing a newer version, compiling it from source. If you want to try that there’s instructions at https://scribles.net/updating-bluez-on-raspberry-pi-from-5-43-to-5-50/ for upgrading bluez to v5.50. But that’s getting very much into “at your own risk” territory, tbh. The original post in the github issue talks about resetting the bluetooth interface in a cron job which is obviously a workaround not a fix. I don’t think I’m particularly happy recommending either approach to people without linux/software experience, though.

I might give the compile the new version a go, and understand this is at my risk.

Good news, I have updated the Bluez to version 5-50 and have not seen a single error.

1 Like

Cool. Thanks. I might add a section to the readme with details and a warning its at peoples own risk. Hopefully raspbian will catch up at some point…

I also notice that armhf debs are available for 5.50 for deban buster and at a quick glance it looks like all the deps are in wheezy. I might have a try at installing that deb on my pi later. Would be far happier with that solution, personally.