Openwrt, IoT devices and mqtt

I was given a Belkin F7C027 smart switch which I expected to just use a simple microcontroller that I could easily flash to remove it's cloud requirements and use it with my homeassistant setup. Unfortunatly it is more complex than I expected and uses a whole SoC.

OpenWrt does boot on the device and is described on the wiki here:

Although it does not have support anymore I don't really care. It would be a local device anyway.

My question is if I flash OpenWrt on the device can I use OpenWrt to communicate with Homeassistant via mqtt? There are plenty of guides on using mqtt with OpenWrt all of them describe using the router as a broker which I don't need.

I know that the device lacks current support due to lacking ram (32mb). With hot air can more be soldered on? I know this isnt really very economical but I won't be using the device without removing the cloud requirements so it could just be an interesting project.

I apprecate any advice.


I've got one of those and flashed OpenWrt on it using the guides below. It is quite a while ago and I only bought it since it was cheap on ebay. The relay can be switched on and off using a gpio. If you want to make it work with MQTT you would have to write some script / daemon that will listen for MQTT messages and then toggle the gpio. So I think it should be possible but does require some scripting to glue MQTT and the gpio together.

1 Like

Not sure what you have left for space, but if you have room - install both python and python3-paho-mqtt using opkg? That would certainly handle the GPIO and your logic to drive it as well.

Thanks for the guide! Super helpful. Will flash it up tomorrow probably. I think the device needs to broadcast a discovery message over mqtt to be detected then all it needs to do is recieve the messages? I'm not sure on the exact workings of mqtt but I'm sure I can figure it out.

I've not installed it yet but I can't imagine there will be much space left. Presumably I can remove some stuff to trim it down?