Tilt hydrometer for temperature control

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

happyduke

Well-Known Member
Joined
Dec 11, 2017
Messages
50
Reaction score
17
I'm not sure if someone else has already done this so I decided to share this idea with you.
So once I bought a Tilt hydrometer which I'm very pleased with I started thinking of how else I can use it so that those 135 bucks are paid off. I came up with this idea of a fully wireless fermenter-agnostic temperature controller.

So what I did is I bought a Raspberry Pi 3 which has Bluetooth so that it can read a Tilt temperature readings. I also needed some kind of relay to switch on/off the heating/cooling device so I decided to make things simpler and bought a TP-Link HS 100 smart plug, this guy connects to your Wifi so that you can switch it on or off and since the Raspberry also connects to the same Wifi network it can control the plug as well. So I've written a small app that runs on Raspberry Pi and here's how it works – every 1 minute it reads the Tilt's current temperature and turns the plug on or off based on the setting I provided to it.

I've been using this thing for about 8 months for both summer and winter fermentation and to control my kegerator temperature. Overall I'm very pleased with the results.
According to Tilt FAQs it has up to 1F error so it's pretty accurate. You also get the readings from the inside of the fermenter/keg which is really nice since even commercial kegerators can't do that and you also don't need to mess up with those thermowells or duct tapes outside of the fermenters. And more importantly, it works with any vessel.

Here's the picture of my recently brewed batch (Raspberry is glued on the fridge door), I ferment in a keg so it's still in primary.

r3WWHfj1PXStjdlry8UuLjnkQnuOlPG5fuhtqqeehKd-FoQbzBhUf2aVoSLTgTUSkMfWtIBRx8EF8jSIn4dgiWNutqrTwfppUzTKGKOfaPqzoq0oCug09YIkeVkLr0KGJuskH66o8-unKNt9xB9vEyHnmIYqPzMSZQDcPzNxVtoR5YDBKv-kCFve1d4TWMqBqWHE1gqDla5No78zqbb0B2RR7KPPu5XPndbpq9-DaG4qUcTttQFiDNHBglrG8qy_ar4R8AbgNnssIvUfSuQ-C5_6C5w3LEspvlxFd4NJ19zYfWdcUZba6SKUnuRiz0oUDUFWHNNcmkoY_AR2DrTE73erdqYtgw1etkAgCRkAuP8JRkeot2fSKCVii7KrgbRdjGFyC_QQ-wHgw5BN7q2mqsK_EKx83Z7VdDTzIeJP8zph-bhJo2xbnS2aAUg3dI819p_IWDhjUjw055Fy-QVdHbBXexsGt4qKbK0VNy_N2VP7E9dWyLMBsOJqMujVr7s4b6RLEyFYRt3BxCWw2_q8YyUNClTgBIPbLufmGitm94OSRBm6zwxo-cMc98-qvOlTD-TVJBn2ggVHrR5kpO_2XaZXYQF6LXgOnjevlisZE5GSj0Ls1ZwhCqJdk7TR7Nd47CSkGpBhYU7erXNEGc_-6OsjZYxt_MM=w2582-h1938-no



Anyways, if you guys are interested I can provide more details and photos. Cheers.
 
Last edited:
Great idea, thinking outside the box for sure. Im on the fence with this raspberry pi thing trying to decide if I want to start learning about it. This is probably going to push me over into figuring it out.
 
Yeah, I probably wouldn't get into learning raspberry pi if I didn't work as a software engineer in the first place, anyway, it's not too hard (it's just linux) and everything else can be shared and installed as a package. I think even Tilt's guys have something like a webpage based dashboard for raspberry.
 
Last edited:
Looking at acquiring 1st tilt...

Can you set up SG targets & have it (or cloud data collection) alert u when those are reached? Is this easy to accomplish?

Thx in advance [emoji111]
 
Looking at acquiring 1st tilt...

Can you set up SG targets & have it (or cloud data collection) alert u when those are reached? Is this easy to accomplish?

Thx in advance [emoji111]
It's definitely easier to do than temperature control and I've actually done it. If you don't have coding skills the Tilt guys actually provide a complete Raspberry image which might be enough for your needs. Here's it.

I honestly don't find it particularly useful since I check my SG every day in any case. Also, Tilt tends to fluctuate at the active fermentation stage and the krausen might stick to it and you will get inaccurate readings. But once fermentation is over you get pretty accurate results.
 
Any concern that turning the compressor off and on too frequently will shorten its life?
Hmm, actually I didn't think about it but I can hear my regular fridge turning on/off regularly so I think it shouldn't be an issue in my case either. I've done 5 batches using that fridge so far, each batch is ~2 weeks of fermenting and 1-2 weeks of serving.
 
Hmm, actually I didn't think about it but I can hear my regular fridge turning on/off regularly so I think it shouldn't be an issue in my case either. I've done 5 batches using that fridge so far, each batch is ~2 weeks of fermenting and 1-2 weeks of serving.

I keep flirting with the idea of doing this myself (tilt/pi) but haven't pulled the trigger.

If I were coding it, I think I might have it only switch the fridge on or off after multiple consecutive readings over/under the target. This should prevent stressing the compressor with too many on/off cycles.
 
Hi guys, I have an update on the topic.
So recently I was asked to share the code and I realized that it would be nearly impossible to set everything up for a person with no software engineering background and I came up with the solution that should be available for everyone. I used a Google spreadsheet provided by Tilt and modified it – here it is.
The original Tilt's solution just allows you to publish readings to Google Spreadsheets by either your smartphone or Tilt PI every 15 mins. So I extended that functionality to allow you to control the fermentation temperature using a smart plug.

Here's all you'll need to do:

1. Using my spreadsheet instead of Tilt's one follow their guide on how to post data to Google Spreadsheets. Once done you should see a new tab created with your latest readings. Tab name is the same as the beer name in the Tilt app.

upload_2020-1-17_13-52-9.png
2. Get a smart plug that has the possibility to be switched through the internet. This is the hardest part since different smart plugs manufacturers do it differently. But if you get an HS100 smart plug there's a great article on getting all the information needed. I tested it and it works well so I can guide you if needed.
Once you know how to control your smart plug through the internet fill in the corresponding values under `Thermostat Configuration` sheet.

upload_2020-1-17_14-4-13.png
3. Make sure that the plug is turning on/off by clicking TURN ON/TURN OFF buttons.
Screen Shot 2020-01-17 at 2.05.35 PM.png
4. Using `Thermostat Configuration` sheet put your desired temperature and mode.
`Turn off if disaster` config means that in case there was no data from Tilt for more than 30 mins the plug will be turned off.
5. The readings are published through Bluetooth so you need to either leave a dedicated device (smartphone or tablet) near the fermenter or get a Raspberry Pi and install Tilt PI on it.

And that should be it. If you need more help I'd be glad to help.
Cheers.
 
Found a small issue, it turns out that the triggers are not copied with the spreadsheet so for `Turn off if disaster` you need to follow the next steps:
 
@happyduke

Hi,

Sorry to trouble you, I've just got a Tilt and was scouring the internet on how to link it with the TP-Link smart plugs and came across this thread, exactly what I wanted, many thanks !!!

However it would seem the images in your last post here are missing, is there way you could possibly re-share these or even post, your original instructions ?

Again apologies and many thanks !

Me.
 
Hi,

I'm happy to help! Looks like the images do open when you click on them but anyway I'll reattach them so they won't get lost.
Let me know if you got it to work.
 

Attachments

  • 1.png
    1.png
    267.1 KB · Views: 81
  • 2.png
    2.png
    214.4 KB · Views: 83
  • 3.png
    3.png
    331.7 KB · Views: 78
  • 4.png
    4.png
    199.8 KB · Views: 75
Hiya,
You are the MAN !! :ban: Thanks for that REALLY appreciated, I've got a brew going at the moment, when thats finished I'm going to have a play...

Going to do some trials on a bucket of water to see what kind of control I'll be able to achieve, I've not got the luxury of the space required for a fridge so will just be looking at using a heat mat. May look and see if I can get / make some form or jacket to help stabilise things...

Again, thanks for posting your work and responding to the plea for help :)

I'll keep you posted..

Regards.
me.
 
I'm glad somebody uses it :)

If you're interested I can add support for temperature range to avoid switching on and off too frequently.
 
Hello HappyDuke,

Firstly I want to thank you for your work in this topic and making it available to us. I just finished my last two brews using my new Tilt hydrometer and I’m very happy with its ease of use and real time gravity and temp reports.

After reading your post I purchased the smart plug you recommend and am excited to give it a go for my next brew.

I do have two questions for you on this topic:

1) Does temperature readings every minute effect the battery consumption of the Tilt hydrometer? Can I change those readings to be sent on whatever interval I choose?

2) Does the code/spreadsheet that you wrote and made available for download automatically communicate with the smart plug that you recommended?

A web design class I took in college over 10 years ago pretty much sums up my code writing experience so I’m expecting some challenges but I’m motivated to get this system up and rolling for my next brew.

Thank you again for sharing your tech skills!

-Jay
 
Hi, you're welcome :)

1) No, it's your smartphone/tablet that sends the readings. You can select the interval in the Tilt app.
2) You will need to fill up a couple of variables in this section:
1607368193532.png


So you need to change ON/OFF URLs and replace `YOUR_DEVICEID_HERE` in ON/OFF Body columns.
  • First of all, you need to get you smart plug token
    • Open this online HTTP request tool
    • Set URL to https://wap.tplinkcloud.com
    • Set method to POST instead of GET
    • Set Content to:
      • {
        "method": "login",
        "params": {
        "appType": "Kasa_Android",
        "cloudUserName": "XXXXX",
        "cloudPassword": "XXXXX",
        "terminalUUID": "9ae3da38-eb5b-4a7a-ad4e-cfdcfd10c7bd"
        }
        }

      • And replace `XXXXX` with your actual Kasa app credentials.
    • It should look like this:
      • 1607368751195.png
    • You should get response like this:
      • {
        "error_code": 0,
        "result": {
        "regTime": "2017-01-06 08:42:35",
        "email": "XXXXX",
        "token": "YOUR_TOKEN_HERE"
        }
        }
    • Copy your token value
  • Now you can get everything else:
    • Open this online HTTP request tool
    • Set method to POST instead of GET
    • Set URL to https://wap.tplinkcloud.com?token=YOUR_TOKEN_HERE
      • Replace YOUR_TOKEN_HERE with the value from the previous step
    • Set Content to:
      • {"method":"getDeviceList"}
    • It should look like this:
      Screenshot from 2020-12-07 21-27-49.png
    • You should get a response like this:
      • {
        "result" : {
        "deviceList" : [
        {
        "appServerUrl" : "https://eu-wap.tplinkcloud.com",
        "isSameRegion" : true,
        "deviceMac" : "",
        "status" : 1,
        "hwId" : "XXXX....",
        "deviceId" : "XXXX....",
        "oemId" : "XXXX....",
        "fwVer" : "1.0.8 Build 151101 Rel.24452",
        "deviceType" : "IOT.SMARTPLUGSWITCH",
        "alias" : "My Smart Plug",
        "fwId" : "BFF24826FBC561803E49379DBE74FD71",
        "deviceName" : "Wi-Fi Smart Plug",
        "deviceHwVer" : "1.0",
        "role" : 0,
        "deviceModel" : "HS100(EU)"
        }
        ]
        },
        "error_code" : 0
        }
    • Copy `appServerUrl` and `deviceId` from the response
  • Once you've done all of the above then go to the spreadsheet and:
  • Test if everything works correctly by clicking TRUN ON/OFF buttons.
Let me know if you got it to work.
Cheers!
 
Ok - thank you again. I’m simply waiting for the smart plug to arrive. I’ll gonna try to tackle this project this weekend.

excited and will keep you posted. Thank you very much for all your help and your prompt reply 😃🍻
 
This is awesome, I thought about this last year when I got my blue tilt. Then I bought an orange tilt.
Can it monitor just one tilt and outlet or can it monitor two different tilts and control two different plugs?
I already use Tiltpi to monitor my fermentation. So you have already done the hard part, I was going to ask my Brotherinlaw to do what you have done.
Cheers
 
I would be afraid of a WIFI failure and the smart plug to stay on heating/cooling. Does the plug as some programmable timer that would work offline to shutdown?
 
Hey there again happyduke,

I‘ve read, and re-read your instructions many times. Each time I read them the information is much less “codey” and more understandable. I just got my smart plug yesterday and I’m gonna attempt to get this done tonight. I feel good that I can do it. Just one more question please:

when using the HTTP request tool, under “appType": "Kasa_Android"

does it make a difference that I will be using an iPhone and not an Android?

thank you again! I’m excited and optimistic
 

Attachments

  • 0CBBCC24-7D4E-4FAB-90EE-E9CCAD260315.jpeg
    0CBBCC24-7D4E-4FAB-90EE-E9CCAD260315.jpeg
    296.4 KB · Views: 7
SUCCESS!! I had a few challenges with the set up, but between happyduke's instructions and the article he provided on "how to control your smart plug" I got it up and running. STOKED!

I use a freezer for temperature control, I wrap the carboy with a heating fermWrap and place the carboy in the freezer. I originally used the inkbird temperature control to control the temp. If fermentation gets too hot, the temp control kicks on the freezer and if temperature got too cold the temp control kicks on the heating wrap. With that said, I have one more question for happyduke.

happyduke - If I'd like to set up a second smart plug to control the heater component of my fermentation freezer, would it be just as easy as copying/pasting your "Thermostat configuration" portion of the spreadsheet and repeating the same steps for the second smart plug?

thank you again for you work on this and making it available to us
 
I would be afraid of a WIFI failure and the smart plug to stay on heating/cooling. Does the plug as some programmable timer that would work offline to shutdown?
Yes, I added a trigger to GoogleDocs that basically just turns the switch off once in a while (you can configure how often). You can find how to configure that trigger in my previous posts. Let me know if you can't find it.

UPDATE:
Oh, you meant WiFi failure. So for this case you need to schedule a Turn Off action in Kasa app since it remembers all your scheduled actions even if there's no network. My trigger in turn will protect you in case there's something wrong with Tilt itself.
 
Last edited:
SUCCESS!! I had a few challenges with the set up, but between happyduke's instructions and the article he provided on "how to control your smart plug" I got it up and running. STOKED!

I use a freezer for temperature control, I wrap the carboy with a heating fermWrap and place the carboy in the freezer. I originally used the inkbird temperature control to control the temp. If fermentation gets too hot, the temp control kicks on the freezer and if temperature got too cold the temp control kicks on the heating wrap. With that said, I have one more question for happyduke.

happyduke - If I'd like to set up a second smart plug to control the heater component of my fermentation freezer, would it be just as easy as copying/pasting your "Thermostat configuration" portion of the spreadsheet and repeating the same steps for the second smart plug?

thank you again for you work on this and making it available to us
So you managed to make it work, great :)
Regarding the second smart plug, basically, yes but let me check that out to be sure.
 
Last edited:
Yep, you can just copy the spreadsheet and paste its url in the second Tilt settings.
 
Does this spreadsheet template still work? I was able to download the template and input the appropriate values to control my plug (turn on / turn off functioned as expected), deploy the web app, and get the appropriate URL from the Tilt menu. However when I put that URL into Tiltpi it does not seem to ever connect.
 
Yep, I just check it. Did you follow the Tilt guide on how to add a spreadsheet to the app? Google's changed the UI, though, so click a `User legacy editor` button. Then you'd asked to grant permission and it will say it's unsafe (ugh) so you need to click `Advanced` and proceed. Also, make sure your brew name in Tit's app is the same as a spreadsheet tab. Hope that helps.

Cheers.
 
Last edited:
Yep, I just check it. Did you follow the Tilt guide on how to add a spreadsheet to the app? Google's changed the UI, though, so click a `User legacy editor` button. Then you'd asked to grant permission and it will say it's unsafe (ugh) so you need to click `Advanced` and proceed. Also, make sure your brew name in Tit's app is the as a spreadsheet tab. Hope that helps.

Cheers.

Got it up and functioning, thanks!
 
Hi @happyduke

This post is a bit old, but is planning on getting Raspberry Pi Zero W to capture and post my Tilt's readings, but was wondering if it will have enough computing power to be able to control a wireless switch as per your original post before it was changed to the Google sheet?
I do like the idea of having the wireless switch controlled rather than from the Raspberry Pi as to the google sheet.
 
Hi @happyduke

This post is a bit old, but is planning on getting Raspberry Pi Zero W to capture and post my Tilt's readings, but was wondering if it will have enough computing power to be able to control a wireless switch as per your original post before it was changed to the Google sheet?
I do like the idea of having the wireless switch controlled rather than from the Raspberry Pi as to the google sheet.
Hi. It depends how you code it of course :) My original app is in java and I didn't pay attention to resources at all, I mean I could've optimized it a lot. Nevertheless, it still works like a charm. Raspberry Zero does have half as much RAM, though, but anyway I think you should be fine.
 
@happyduke thanks for this... followed your instructions and just got this setup with a couple of HS-103 plugs. Seems to be working! Will give it a go on a bucket of water soon see how it performs.

I assume there's no way to get the reading more frequent than 15 minutes with the spreadsheet approach? I wonder if the 15 minute latency is going to create larger than desired fluctuations.
 
@happyduke thanks for this... followed your instructions and just got this setup with a couple of HS-103 plugs. Seems to be working! Will give it a go on a bucket of water soon see how it performs.

I assume there's no way to get the reading more frequent than 15 minutes with the spreadsheet approach? I wonder if the 15 minute latency is going to create larger than desired fluctuations.
Glad to hear! Yes, unfortunately, 15 mins is the Tilt app's minimum latency. I think you should be fine, check the readings on the on water and assume that it'd slower to cool down the active wort.
 
Water test looks pretty good! +/-1 deg F and no over/undershoot on transitions, despite the 15 minute refresh.

Going to try this on an actual beer tomorrow.
1621570976937.png
 
Back
Top