This is my first version of the IoT volume knob !
It is based on an ESP8266 devkit (D1 mini) and a rotatory encoder.
I've uploaded the fabrication files so you can 3D print the case. You'll then need to add the ESP8266 and the encoder to create your custom WiFi knob!
You can also add some neopixel LEDs scrapped from a strip to get a visual feedback of the commands.
I've uploaded an exploded view so you can have a look at how it is assembled.
The rotatory encoder is secured with its included bolt onto the top of the case. The ESP shield is glued on the small slot in the bottom cover. The four LEDs are sticked on the top of the case (arranged in a circle). And finally the bottom cover is secured in place with 2 M2.5 screws that fits in the heat set threaded inserts in the case.
I have a Bose cinemate 321 in my work area, the issue is that it is old and have no API for control.
I wanted to be able to turn it on/off and control the volume from my desk without having to turn around and grab the remote as it is hidden in a closet. So I put an ESP8266 flashed with ESP-Home in the Bose sound system, and wired up a GPIO to a transistor that drives the IR pin low when the GPIO is high.
I then used an Arduino to capture all the IR NEC codes from the remote and incorporated them into the ESP-Home script running on the ESP8266 within the sound system. (note: if anybody want to do the same on old Bose devices, it is mandatory to repeat the command twice and with a delay in between of at least 38ms. I hope I will save you some struggle)
So now I can control my home cinema with my HA server. So here comes the intersting part !
The volume knob's ESP8266 is flashed with a code that connects to my local WiFi network and subscribes to my Home Assistant MQTT broker.
When I click the knob it send a message via MQTT to HA ("click"). When I turn up or down the knob it also send a message ("up"/"down").
And finally there is a simple script on HA that performs the desired action as soon as the MQTT broker receive the message from the smart knob.