I’ve been having a play and have managed to create a BrewBlox service for the Tilt Hydrometer (Thanks for the help @Bob_Steers!). Info about how to install it is available here https://github.com/j616/brewblox-tilt
It doesn’t have the calibration that the old BrewPi mod had yet but its on my todo. The data is also only available in graph widgets atm.
Give me a shout if you have any questions, comments, issues, etc.
I’ve just added some more logging. If you run the following to update your system & bring the services back up. brewblox-ctl update && brewblox-ctl up
Then I think you should be able to view the logs just for the Tilt service using: docker logs brewblox_tilt_1 -f
You should now see the following if the bluetooth scanner is running and sees any devices at all: Loop running & device found (may not be a Tilt)
And something like the following when it finds a Tilt: Found Tilt: Black
If the loop is running and can see devices but can’t find a Tilt, then I think the problem is with the Tilt or with the Pi being able to see it. It might be worth trying the app on your phone near to where your raspberry pi is located and seeing if it can see your Tilt.
If the loop isn’t seeing anything at all (assuming there’s other bluetooth devices in the area running at higher power, i.e. not a low energy device) then that suggests a problem on my end. It could be I’ve installed something on my Raspberry Pi without releasing it and I need to figure out what that is and add it to the docs
If the service finds your Tilt but no data is getting through then I’ll have to talk to @Bob_Steers to try and figure out whats going on
Just to confirm what you should expect to happen when things work. When you create a Graph widget, you go into the settings menu, into Metrics, and you should see an entry at the top level alongside spark-one etc called tilt. Under this you’ll each colour of Tilt detected and the values logged from it.
Have performed the update and still cannot see the block on a Graph widget. Here is the output of the logging.
2019/04/19 05:34:36 INFO brewblox_service.service Creating [tilt] application
/usr/local/lib/python3.7/site-packages/aiohttp_swagger/helpers/builders.py:71: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
swagger = yaml.load(swagger_base)
/usr/local/lib/python3.7/site-packages/aiohttp_swagger/helpers/builders.py:30: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml.load("\n".join(end_point_doc[end_point_swagger_start:]))
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [POST] <PlainResource /tilt/_debug/publish>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [POST] <PlainResource /tilt/_debug/subscribe>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [HEAD] <PlainResource /tilt/_service/status>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [GET] <PlainResource /tilt/_service/status>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [GET] <PlainResource /tilt/api/doc>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [GET] <PlainResource /tilt/api/doc/>
2019/04/19 05:34:36 INFO brewblox_service.service Endpoint [GET] <PlainResource /tilt/api/doc/swagger.json>
2019/04/19 05:34:36 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/19 05:34:36 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/19 05:34:36 INFO brewblox_service.service Feature [<class 'brewblox_service.scheduler.TaskScheduler'>] <brewblox_service.scheduler.TaskScheduler object at 0x7688a9d0>
2019/04/19 05:34:36 INFO brewblox_service.service Feature [<class 'brewblox_service.events.EventListener'>] <EventListener for "172.17.0.1">
2019/04/19 05:34:36 INFO brewblox_service.service Feature [<class 'brewblox_service.events.EventPublisher'>] <EventPublisher for "172.17.0.1">
2019/04/19 05:34:36 INFO brewblox_service.service Feature [<class 'brewblox_tilt.tiltScanner.TiltScanner'>] <brewblox_tilt.tiltScanner.TiltScanner object at 0x756aa270>
2019/04/19 05:34:36 INFO brewblox_service.events Closing <EventListener for "172.17.0.1">
2019/04/19 05:34:36 INFO brewblox_tilt Started TiltScanner
2019/04/19 05:34:37 INFO brewblox_tilt Loop running & device found (may not be a Tilt)
Thanks for this. The last line shows the main discovery loop is running and it is finding bluetooth devices. But it seems it’s not finding any Tilts as there’s nothing after that. Have you double checked your Tilt is working and you can see it through the Tilt app?
@j616s, I had checked before doing the update as I did think that maybe the battery had gone, but the Tilt is in a jug of water and sat near the Pi. The Tilt app shows the green tilt with the temp and OG.
Also if it helps here’s the output of a ‘hcitool lescan’
OK. That’s useful to know. It might be I’ve made some incorrect assumptions when reverse engineering certain aspects of the Tilt advertisements. I’ll take another look at my code and get back to you. Might be later on though as I’m laying a patio in my garden today
Just a quick update. The gardens taken up most of the past two days (angle grinder broke ) and heading to my local home brew group now so will look at this tomorrow. I have a few plans of action to try so will report back when I’m done
Pushed an update that now relies on the UUID for identifying Tilts rather than using the local name. You can try updating to the latest with brewblox-ctl update && brewblox-ctl up
It might take a min for data to actually make its way through. It can just take a while for the Raspberry Pi to pick up devices sometimes. I think there’s also a slight delay through the brewblox history service, though I’m not certain.
I think there’s also a slight delay through the brewblox history service, though I’m not certain.
Both reading and writing data is done in set intervals (default: 5s). When writing, the timestamp is the point at which history read from the eventbus, not when it writes the batch.
If you’re viewing data for longer timespans, it will take longer, as you’ll be viewing a downsampled data set. You can enable “Combined Influx Points” to check this: a value of 1 means you’re viewing the live dataset.
I seem to have to wait for multiple responses from the brewpi temp sensors before an update from the tilt service sometimes. But this might be down to it sometimes taking a while for the service to see updates over Bluetooth. I’ll investigate more when I get a chance.