How to control appliances with arduino?

I have 12 ESp32's doing various things.

One ESP32 controls my HVAC. I go to my web site where I can operate the unit from a place with internet access.

I use a RPi loaded with MQTT Broker and runs a Python helper program that manages the traffic between the ESP32's.