Tea Sense

So, I drink tea. And by drink, I mean consume. It is at the point that I have a subscription service where sencha green tea is regularly delivered to my house. But do I stop there? No way! In the pursuit of the perfect cup, I have gone to the depths of measuring out the leaves by weight and even ensuring water temp is what I find optimal. However, to do this, I needed a tech solution. Enter Tea Sense!


Basically, it’s a way for me to alert myself when the water reaches 80 C, which is what I find is the optimal tea temperature. An apparatus was built up using Arduino, an RTD, and a little bit of elbow grease. The result is shown below:

Arduino based

Originally, this was Raspberry Pi Zero W based. However, it seemed like overkill and, given their recent political positions, decided to take it towards a different route. Thus, the usage of an Arduino MKR WiFi 1010. It provided the best part of both worlds. I could have a data collector hit the endpoint to get the temperature reading, do the necessary I2C communication from the AdaFruit MAX 31865, which has its own controversy, and support the open source movement in the process.

That was the easy part!

Data Collector

It’s nothing fancy. It’s a simple few lines of TypeScript that fetches from a set of preconfigured endpoints the data every so many milliseconds and stuffs it into a Mongo database. Like I said: nothing fancy. However, this is the backbone for the PWA and alerting mechanism.

The Alerts!

So, I needed a mechanism for alerting. The original tea sense used gotify to send my phone notifications. However, that requires updates, hosting space, and so on. Things that I don’t feel like setting up and maintaining. It was at this point that I wrote a PWA that would frequently poll the data collector every second. If it reaches the preconfigured setting, the PWA creates an alert on the loaded device and plays a jaunty air that sounds like an electric tea kettle boiling.

The Code

You can, too, make a nifty alerting mechanism. I would post the code that I use but, instead, I’ll provide links to the original source I modified to use HTTP GET to retrieve the sensor info. It can be found from AdaFruit GitHub.