Yes, I agree with @boualleg sabrina. If RPi is running MQTT broker s/w and acting as an IoT Server. Then connect your home devices as a client and control them. This way you can avoid all third-party services. The only limitation is you won't have access from outside of your home network. There is a way out but I'd not recommend RPi to make it public access for security reasons.