Power Apps is a great no-code/low-code platform for home automation.

Home Automation powered by Power Apps

Remote Sauna project

Last weekend I added a new functionality into my home automation. Now the sauna can be turned on and off remotely.

This project had been in my todo list for a long time. I used to be able to turn the sauna on by phone. Just calling my son and asking him to turn it on and voilà, when I got home, it would be ready. Unfortunately, the automation stopped working once he went to high school.

DIY – Do It Yourself

I bought a long drill to drill the hole from sauna to technical room. Huhh. Finally. That was the first and most important step.

Drill the hole

The rest of the work are simple DIY - “Do It Yourself” tasks.

#1 Installing the one wire digital temperature sensor DS18B20.

digital temperature sensor DS18B20

#2 Installing the reed switch sensor + magnet for sauna door.

reed switch sensor + magnet for sauna door

#3 Installing a big ABB relay OKYM 0R40 into my home electrical panel that I found in my garage by luck.

ABB relay OKYM 0R40

#4 Already having a small reserve relay module to control the big relay.

relay module

#5 Already having the I2C to One Wire (DS2482-100) bridge device connected.

The One Wire system is a very nice solution as it can handle great amount of temperature sensors connected into it.

I2C to One Wire (DS2482-100)

#6 Eliminating the mechanical sauna heater timer.

After studying the schema I figured out that only one cable has to be reconnected.

Eliminating the sauna heater timer

#7 Connecting cables into Raspberry PI.

It used to look quite nice when I first started the project. From time to time, I decide to add to its functionalities, increasing the amount of cables by one or two.


#8 Connecting the sauna cables into the big relay.

ABB relay OKYM 0R40

Logic and programming

Every sauna automation has at least three important rules.

1. If sauna door is open then sauna can’t be turned on.

2. If sauna has been turned on already more than 3 hours then it turns off automatically.

3. If sauna temperature is extremely high (more than 110C) then it just turns off.

Implementation: the sauna button is disabled as the sauna door is open. Closing sauna door will enable the button immediately.

Home automation sauna control

Raspberry PI

Raspberry PI is the central hub of home automation. The base OS is Linux and on top of that is Azure IoT Edge, docker platform and containers. The code is inside the containers.

Visual Studio 2019 is the programming IDE. Code deployment and continuous delivery is fully automated by Azure DevOps and a self-hosted Arm32 deployment agent based on Raspberry PI.

A lot of Raspberry pin’s are already used but I have still some availability.

Raspberry PI pins

Power Apps as a user Interface

Home automation user interface is built on Power Apps. There are many reasons of choosing Power Apps over custom made web app.

#1 Power Apps is a no-code/low-code platform. Ready made components to just drag and drop them into place.

#2 Authentication is already done and it’s based on Office 365 security.

#3 Secure database connection to Azure CosmosDB is implemented by Azure Functions.

#4 Two-way communication between the app and Raspberry is secured by Azure IoT Edge.


Another step to make my home smarter using activity detection and human presence.

1. How IoT can modernize your home security? It will be human-centric, almost nonvisible.

2. Are you tired remember another PIN? You can forget your home-security pin forever.

3. Do you need remotely turn off home security? This is easy, you don’t need to do anything for it.

This picture presenting the full smart home concept, security is just a one part of my smart home environment. The main heart is Raspberry as an IoT device and Azure cloud for information processing, reporting and alerting.

Home IoT project

The idea is to use existing:

1) PIR (passive infrared sensor) and door magnetic proximity sensors to detect human movement by sliding window algorithm and

2) Wi-Fi sniffer to detect by phone MAC-address who is at home (assumption: phone Wi-Fi is turned on).

IR detectors and door proximity sensor together are used to automatically secure on unsecure entire home. It is based on sliding window algorithm as there are clear patterns for entry/exit activities.

The accuracy is not 100%, for example, if someone is leaving and doesn’t close the door afterwards, then you cannot say is he really left or just hanging somewhere close.

Wi-Fi sniffer is just listening what kind of Wi-Fi devices are close and by MAC-address you can easily match this information to names.

Secure/unsecure your home:

If algorithm detects exit pattern, then home is automatically secured. What does it mean “secured”?

“Secure” mean just active alerting by SMS/WhatsApp/e-mail.

Secured home mean that, if PIR or proximity sensors are detecting movement, then you will be alerted by SMS, WhatsApp, e-mail that someone is at your home. You can make whatever you like to do now, call neighbors, friends, police etc.

If the person is known by his/her phone MAC-address, then there will be no alerting and security is basically off.

If your phone Wi-Fi is not turned on and you will get alerted, then you must answer to SMS/WhatsApp/e-mail notification. System automatically recognizes you and taking off active alerting functionality.