I Built a Keypad to Control My Entire Desk Setup - OLED TV, USB Switch, Lights, Desk, Macros...

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
my desk setup has too many separate controllers I have one to control a screen one for the light on top one for the bias light in the back buttons for the USB switch and one for my standing desk and a lot of these controllers need to be used in conjunction with each other so it gets a little Annoying to reach here and there to switch each one individually to get the settings just right but what if I could program a single remote to control it all and even better make it smart enough to do multiple actions in a single press like switch the HDMI on the screen and the USB to my laptop and then switch it all back when I need to use my desktop PC in a single click or turn off both lights on the monitor at the end of the day along with the screen again a single click but why stop there why not also add macros to the keypad for example when managing my windows across my large screen I still mainly use fancy zones but even with that tool I still fumble around with manual resizing so I added keys that let me quickly expand shrink and move the current window around I also added even more keys for custom window sizes like my primary large center location a smaller floating window that I use for tools and notes and even one I use for YouTube videos that are too big to watch completely full screen but I'm free to add anything I need here like a mute button for video conferencing or a quick launcher for my most used application and I can even switch my motorized desk from sitting to standing hi I'm David and here's my wireless macro pad to control my entire computer desk setup so I started this journey a couple months ago and had the following requirements for a single controller for my desk setup one I wanted it to be Wireless for a clean setup because all my current devices are wire free so I had to match two I needed it to have very long battery life because I can't be bothered to charge this every day or even weekly which ruled out using something like a dedicated phone or tablet for controls three I wanted it to be quick and responsive to button presses I did try creating an esp32 to control it all over Wi-Fi which works but I couldn't get it to be as fast or reliable enough to connect to Wi-Fi from Deep sleeps and there's also the option to use Bluetooth units but again I tend to find Bluetooth slower than RF with the initial connection and a little less reliable and finally I needed it to be simple and intuitive to use so lots of buttons that I could label and easily see what does what alternatively you don't actually need a separate keypad to do all this you can make additional shortcuts on your existing keyboard and this works just as well but with the amount of shortcuts I'm using here I start forgetting what does what in the end I ended up with this implementation an RF wireless number pad from velocifier where swapped up the keycaps with these re-legitable ones where you can just print out new labels in here and then just pop them in place over the mechanical switches the USB dongle for the keypad is then plugged into a raspberry picot that's been flashed with an HID remapper firmware from jfood aware 2. links to it below this tool lets me remap all the buttons on this number pad to alternate key presses those commands are sent to my desktop PC through the Pico 5 USB connection and it's received by my auto hockey script some of the automation logic is programmed right into the script for example pressing the 7 key on the keypad is remapped to shift f23 that is caught by autohotkey to expand the current active window to the left by 200 pixels but for controlling things like my lights or the TV screen i instead initiate these by sending a post request to my home assistant server in home assistant I have all my smart devices integrated like the LG OLED TV and Ikea Trad free smart bulb so I can control them in a variety of ways and build scripts to automate multiple devices together that I'll mention more later on but for my non-smart devices like my monitor light bar I made it smart with the sonoff USB power switch to control turning it on and off and for the USB switch I found this 4n40 USB switch that also has an external controller and after some reverse engineering of what the pins over the micro USB connector do I was able to program an ESP microcontroller with some OCTA couplers wire it into a male micro USB connector to simulate the button presses and then control it in home assistant and similar with my fully standing desk it's not smart by default and is normally controlled with this touch panel but I found this GitHub Page by Phil Ward where he already did the hard work of reverse engineering the pin signals on the original controller and I just programmed that logic again within ESP Mica controller wired into a pair of RJ45 Keystone Jacks that pass through the signal so I can still use the original touch controller but now it also works in home assistant and all of this work so I can have the following controls starting with these buttons in the lower middle PC2 is for my laptop that switches the HDMI and USB inputs to it the PS5 button that switches the TV to the correct HDMI input and lowers the desks to the lowest setting for better Comfort while gaming and press the HDMI 4 button to wake up my test PC and switch the inputs accordingly and back to my main desktop PC I can also manually select the USB switch input by clicking the USB select button and the corresponding device for example switching between controlling my laptop and my desktop at the top I have my desk height controls for sitting height and standing at the bottom are my buttons for the lights like the bias light in the back and another for the monitor light bar on top right next to it is a quick toggle to black out the OLED screen and a large power button to turn on the screen and off with all the lights [Music] I also have a large button on the right that's easy to press with my pinky finger that I use for toggling the microphone in specific chat applications and the top section contains the various Windows management Keys like expanding and shrinking the current window I can also modify the keys by holding down the control button and have them instead shift the window to the left or right a shout out to will H who gave me the inspiration for this implementation and then buttons to quickly resize them to the center a smaller window size for my tools expand the current window vertically and one specifically for my preferred YouTube video size and lastly a couple quick launchers for my web browser and file explorer in the end I'm super pleased with the solution as it meets all my primary requirements when I first started on this path a couple months ago is the solution perfect no one big limitation is that the main desktop PC needs to be on all the time for this keypad to work and those macros will only work on the desktop PC it's connected to so in the feature I would like to find a way to get it to run independent of it another issue with my solution is that if you press too many keys quickly together they might activate the wrong function as Auto hotkey gets confused I had other Concepts and prototypes that I might revisit in the future like that esp32 device where I can add a screen or dedicate buttons or I was looking at the Pico W with its built-in Wi-Fi but I'm terrible at C programming and couldn't get my code to work a custom zigbee controller is another option but that's more stuff to learn and I even bought a 3D printer for this project to make those custom cases so I might reprint a nicer case for the keypad or make a completely custom one but anyways hope you got something out of this huge time sink I've been working on the last couple months you know what to do and I'll see you in the next video [Music]
Info
Channel: David Zhang
Views: 1,562,135
Rating: undefined out of 5
Keywords: macropad, desk setup automation, home assistant, automatic standing desk, controlling oled monitor, diy kvm
Id: DTJSREjWH7Y
Channel Id: undefined
Length: 8min 0sec (480 seconds)
Published: Fri Dec 23 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.