I am not sure what technologies to use in order to build an IoT system for my home.
I have a few sensors and some other devices that need to be controlled (like a doorlock) placed in my house. All of them have WiFi integrated. I want to see all the sensors data and be able to control my devices from my phone.
My idea was to connect all my devices to a local network and run a MQTT broker locally. Then I would build an application that connects to that broker, so it could be able to receive any messages the sensors and devices send and also publish a message on a specific topic, so a device can change a state (for example unlocking the door). I'm thinking that this application should be a webserver api because it would be easy to communicate with a mobile application.
Here's a simple representation of what I described:
Now, I'm not sure if this is a good approach. Are there any better methods? I would like to keep things locally, so an online service that does this for me wouldn't really help.