Using Home Assistant to Create a Perfect Sauna App

Finns were eager to adopt all kinds of mobile applications especially during the heyday of Nokia about 20 years ago. The first SMS controlled stoves came around in late 90’s. After a few burned down saunas, we now have even a European standard SFS-EN 60335-2-53 for safety requirements of such appliances and applications.

But apart from stoves going from SMS controlled to WiFi controlled, IoT hasn’t really made its way to saunas.

But my friend Mo is in sauna automation. He has been working on different applications for a few years already and his first applications included temperature sensors as a backbone and then various applications like opening vents based on the temperature readings and such.

We sat down for a cold Lonkero and started ideating on different possibilities for a perfect sauna app. We quickly categorized our ideas in two buckets: applications that make life easier and provide information and then there was this idea of a sauna buddy, our virtual sauna assistant or friend, if you will. Mo had already been working a lot with the Home Assistant platform so that became the platform of choice.

Home Assistant

Home Assistant is a popular open source automation platform for low code or no code home automation. The beauty of it is the availability of integrations as well as ability to develop comprehensive mobile apps without any coding effort per se.

Integrations in the App

The most relevant integrations in the app are multiple temperature and humidity sensors: one for floor, one on the bench level, one on the top, and one measuring the temperature of rocks. Then there is a door sensor, led lights, and ventilation fans.

With Home Assistant, it is easy to automate common routines like switching the lights on when sauna is ready, or sending a notification in the app when the temperature exceeds certain temperature. The sensors write the status in a MariaDB that can be easily queried for further analysis.

It is also easy to create history graphs and create own measures in the configuration. We have calculated absolute humidity from relative humidity for example because that is a much more relevant metric when analyzing steam in a hot room. From RH, we can also define dew point, that is quite interesting metric to analyze the quality of the steam.

With history sensors, it is also easy to create things like sauna diaries. I track sauna use times and hours as well as the löyly time (time when absolute humidity is above 60 g/m3).

The Sauna Buddy Part

Probably the more interesting part of our app development is the Sauna Buddy part. Sauna Buddy is the virtual assistant that reacts to specific events in sauna.

We discussed the most common interactions in sauna and how to automate that so that we could outsource all that communication to the virtual assistant. It is pretty simple really – there are only five situations in sauna where talking has ever been necessary:
1. Someone keeps the door open (see The “Ovi Kii” Rule)
2. Someone pours water on the stove and you want to compliment the löyly
3. There is not enough steam and you want some
4. Water is out and you need more
5. You need to ask someone to make room for you

We figured that at least situations 1 – 3 can be automated. We started by installing a Google Home Mini speaker below the bench. This speaker integrates effortlessly with Home Assistant and provides multiple interfaces like text-to-speech and voice commands for our future use. It also costs just about $25 so not much harm is done if we need to replace the speaker every now an then.

The lowest hanging fruit was to control lights via speech. We just implemented voice command to switch on the Govee led lights.

The Ovi Kii Logic

The Ovi Kii logic is relatively is relatively easy to implement. We added a magnetic door sensor that detects the door opening event and transmits the status to the Home Assistant server. The automation is triggered when the door is kept open for three seconds and it simply plays an audio file from a predefined folder then.

As for the audio files, we recorded multiple friends’ authentic and friendly recommendations to close the door and the script randomly plays one of those mp3 files randomly.

Complimenting the Löyly

Finns know how to appreciate good steam in sauna. They often compliment whoever poured the water by nodding towards them or buy forming complex expressions like “huh”, “aisssss”, “on se kyllä”. The last one literally means “it is so yes” or something.

Now the task was to make the app be the guy that complements the steam so you don’t have to bother. It is perfectly fine if only one person complements the steam because others most definitely agree anyways.

I installed a few bluetooth thermo and humidity sensors in the sauna earlier to study, how the humidity changes in the sauna during löyly. I wrote the blogh posts Thermo Physics 101 – Sweating in Löyly and Humidity and the Löyly Index to explain, what actually happens in löyly. Utilizing this information, we were able to provide relatively reliable trigger for the app to compliment the löyly: one definition is that humidity increases very rapidly but in our saunas it seems that absolute humidity never exceeds 80 g/m3 unless you add steam and it almost always exceeds that threshold with one ladle of löyly.

The issue with bluetooth sensors is that they react to the humidity change with delay so we had to replace one of the sensors with a wired one that reports a new reading every 500 milliseconds. That is faster reaction time than most Finns have on Saturday evening in their saunas. There were not many wired options available that would integrate with Home Assistant out the box but Mo had a soldering iron and components handy.

Then we simply created a Home Assistant automation that triggers whenever absolute humidity exceeds 80 g/m3 for more than a second.

The Steam Escapes Logic

As discussed in the The “Ovi Kii” Rule post, keeping the door open is a big disgrace but opening the door during löyly is a murder so we copied the Ovi Kii automation and added humidity conditions there: if the humidity is low, then we just semi-politely ask to close the door but if the humidity is high, then the tone is more aggressive.

The More Steam Logic

This automation kicks in when absolute humidity drops below 60 g/m3. Currently the app just asks to add water on the stove if the stones are hot enough to generate the steam. We put a thermo sensor on the stones and said that the stones must be at least 150C hot. Ideally the stones should be above 200C but 150C is still enough to generate decent steam in my sauna.

Ventilation

I also implemented mechanical ventilation in my sauna. The fans are very simple: they turn on when you plug them in so I just needed to get smart plugs from Govee to integrate them with Home Assistant. Then it is easy to switch the fans on and off based on different events in sauna. I tried for example automation where the vents started running when the sensors detected steam. Currently it seems though that it is better to have the inflow on before you add steam for better air circulation. Maybe there is room for some predictive automation.

Future development

The next step is to implement a water dispenser that could be voice activated. This should be easy to do by adding a WiFi controlled valve (think Rachio but simpler) and then activate the valve via the Google Home speaker using voice commands.

The App In Action

The video below shows the app in action. Enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: