Brewometer integration

thanks for the comprehensive explanation, but to be honest, for my meager capabilities, TMI. I am nowhere near experienced enough to do 1/2 of what you suggested. I am just glad that can download from github and install the software or the updates. Maybe in the future, I can take some time to learn more or teach myself.

But thanks anyway for showing how, I am sure there are others who can use this immediately.

Stefan

I would also be interested in your process for the dial display and battery gauge. But wouldn’t have a clue how to do what you described.

Nappy New Year Mr. Bowler,
Apologize that I have to inconvenience you during the holidays but I was trying to install your Tilt integration, finally, after receiving my Tilt this Christmas. I am really looking forward to getting this working, your changes to the standard BrewPi look really good. However, I am getting an error in one of the early steps in the read.me file in Github.

Then you need to enable python to query bluetooth without being root.

sudo setcap cap_net_raw+eip $(eval readlink -f which python)

Failed to set capabilities on file ‘/home/pi/whic’ (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not as regular (non-symlink) file

I am a total Linux noob, so have no idea where to start on correcting this. Any help that you (or any other forum members) can provide would be much appreciated.

Stefan

Stupid me, I am obviously a noob. I used ordinary ticks instead of back ticks. So now the setcap worked. But how and where do I load the files in @sbowler’s github? :confused:

apt-get install is not right, do I use git clone or another kind of git command?

@sbowler Maybe something to add to your read me?
:wink:

So I had my BrewPi all set up, added in the extra “security” features (to allow for Public/Private viewing) as well as hosting 2 web servers on my RaspPi. Below should be the steps to get you back up and brewing with the Tilt Hydrometer working.

  1. cd /home/brewpi

  2. sudo git clone https://github.com/sibowler/brewpi-brewometer.git

  3. sudo apt-get install bluez python-bluez python-scipy python-numpy libcap2-bin

  4. sudo setcap cap_net_raw+eip $(eval readlink -f ``which python)`

  5. python /brewpi-brewometer/tiltHydrometer-test/TiltHydrometerTest.py

  6. cd brewpi-brewometer/brewpi-web/

  7. cp index.php admin.php (this copy/pastes the index pages as the new admin page, due to Public/Admin setup; the goal is to replace the admin.php page [current] with this new page)

  8. rm -r index.php (this deletes the index.php page from the Tilt additional code, so it won’t overwrite the current index.php page)

  9. sudo cp -r * /var/www/html/BrewPi/ (This is because I am running 2 web servers and this is where BrewPi is at)

  10. sudo chown -R www-data:www-data /var/www/html/BrewPi/

  11. cd /home/brewpi/brewpi-brewometer/brewpi-script/

  12. sudo cp -r * /home/brewpi/

  13. sudo chown -R brewpi:brewpi /home/brewpi

  14. sudo shutdown -r

Thanks @lgbainbridge for your posting, it helped me get past my Linux noob block and get the files onto my PI (your line 2). I have also run lines 3,4 & 5. Unfortunately I do have a problem in 5, in that the test script does NOT see my Blue Tilt.

On the other hand, if I use hcitool lescan, the Tilt DOES show up. Anyone in the forum have any ideas on this issue, please (@sbowler?)

A very happy and brewy New year to all
Stefan

Glad it worked for you…If you have a Public/Admin setup I figured out how to update that as well (will be updated in the steps above)…it is VERY simple. I will also include it in my overall file on my blog but this may help you in the future… I will validate the setup when my tilt arrives in 3 weeks.

@beardy82 I posted at the bottom of this thread how to do it… (Jan 2017).

@Richard_Crump I noticed in the first pic all Tilt Hydrometers are listed and in the following post only the active one is listed? I currently am waiting on mine to arrive and I am hoping that the legend is displaying this way because there isn’t any data being collected and when one is hooked up it will only display that one…can you confirm this? If not any idea how to fix?

Once it’s all working ok and receiving the data. those extra ones disappear to leave only the active one(s) that are hooked up.

1 Like

Thanks for the reply, I am not using a Pub;ic/Admin setup (yet?); for the moment I use Chrome Remote Desktop to access the BrewPi from outside the home network.

Stefan

Now to get my Tilt properly connected, if someone can point me in the right direction :frowning:

Is it correct that the ‘sudo setcap…’ command returns without a message? I am able to run the TiltHydrometerTest script without sudo, but could it be that it cannot access the Tilt because the setcap did not work correctly? Is there a way to check?

Stefan

thanks @Richard_Crump

So another step in “Teach Yourself Linux”. I used the -v parameter on the setcap command, and got “OK”. So that is working.
Who of the erudite forum members can now help me determine why I can see the Tilt in the ‘lescan’ but not in Simon’s test script?

Stefan

Put my Tilt in a recent brew, so I can track the fermentation using my wife’s iPhone (my own Android is too old and does not have BLE). But it would be great if I can get the BrewPi integration working. Still hoping that someone in the forum can come up with some good ideas for me to try. :disappointed:

I think that I have to give up (or rebuild all of my BrewPi). I thought that, in spite of not connecting to the Tilt, what harm would it do to load @sbowler’s version it will not show anything until I get the Tilt connection working. But it cannot do any harm…

So I will have to restore my back up to use for now. And then maybe I will do a total rebuild :frowning:

Heh, that error is not very helpful.
The server returned ‘Could not connect to script’ or something similar, but when you try to parse that as JSON, you’ll get ‘Unexpected token C’.

Look in the log file to see why your script doesn’t run.

Probably because I was running without my controller connected.

Unfortunately, when I run connected to the controller I do not have a local HDMI screen. Also, for some strange reason the WiFi network does not seem to connect so I cannot use Putty to view either, So I might have to take a screen off my monitor stand, take it to the basement as see exactly what is going on.

Thanks for the quick reply and the support. I WILL get this working

Stefan

Hi All,

Apologies for the lack of participation over the last week, have been away with family in the country with minimal access to internet. I’ve only just arrived back so will try and read through and reply later today for any issues that haven’t been resolved (including your PM, @NottingHill).

Cheers,

Simon