Tasmota replaces the firmware of dozens of off-the-shelf smart plugs, bulbs and switches, cutting them off from their manufacturers’ clouds and putting full local control in MQTT and web commands. One of the great open-source home projects.
Flashing requires specific device models and some patience with wires or tools, and updates are on you. Every converted device is one less spy in the wall.