Chair Harmony-like Remote

by helbrecht in Circuits > Gadgets

354 Views, 4 Favorites, 0 Comments

Chair Harmony-like Remote

remote1.jpg
remote2.jpg
parts.png

History


This project has origins on my attempts to replace my Logitech Harmony remote. First idea that came to mind was using Broadcom's RM4PRO with HomeAssistant and M5Store ATOM to capture voice and use voice recognition for commands. Ended up not working properly (voice recognition hates me), so I went for OMOTE for that purpose to have a open {software,hardware} 1:1 solution. It did work and I have 5 assembled ones to be future proof. Then I found openHASP and I decided to use it as way to send commands to HomeAssistant and have the RM4PRO sending all the commands to TV, receiver and HDMI switches. I've decided to go with a SeeedStudio SenseCAP Indicator D1 and openHASP and mounted it in the cabinet with the videogames and watched the kid get up and stand in the way of the TV or receiver while using it, blocking the IR from the RM4PRO. Then it clicked: alter the cup holder tray I made for the chairs to mount the same display.


Disclaimer


This guide is just putting pieces together, all the credit goes to people who wrote and support all these incredible projects.

Supplies

This project is of course very specific for my use, but I feel the documentation of all the steps might be useful to someone. What I used for this project:

  1. Respawn 900 gaming chairs: the tray mount is made for the cupholder to work as mount and hold the tray in place. If your chair is similar it might be the case to just need to adjust the .scad
  2. Broadcom RM4PRO: used to send IR to the TV, receiver, HDMI switches. You only need this if you plan to control IR devices. In theory you can use it to run any script on HomeAssistant.
  3. HomeAssistant: ties everything together. Likely you already have it running
  4. SeeedStudio SenseCAP Indicator D1: mainly because of the mount size. openHASP supports a bunch of hardware you can use and you can change the .scad to mount whatever you want
  5. Big printer: I've used a vzbot330 (330x330x400) for this which allows the trays to be big enough. If you have a smaller printer you might end with no tray space and just the screen mounted or split the tray
  6. Heat inserts: in order to mount the display you need to use M3 heat inserts to secure the display
  7. Long USB C cable to power the display. In case you can't get a cable there, you could use a powerbank but I have no clue how much power the display uses or how often you'd need to charge it. openHASP has a way to blank the screen after a period of inactivity, but it might not actually save power on the SenseCAP

Download, Customize and Print

screenshot-20250911-161213.png
screenshot-20250911-161150.png

You can download the stl and/or the .scad:

https://www.thingiverse.com/thing:7139923


Keep in mind that in order to use the .scad (and customize the models), you will need BOSL library:

https://github.com/revarbat/BOSL


Like stated in the thingiverse page, if you're planning to put hot things on the tray, you'll need to print in something that can withstand higher temperatures (regular PLA doesn't).


When loading the stl on a slicer you might want to split into different objects to make it easier to print. They're already oriented and can be printed without supports.


Once you're done printing, put the four heat inserts in the base: two in the front, two in the bottom on the back.

RM4PRO

screenshot-20250929-165606.png

This is step is about configuring your Broadlink RM4PRO to work with HomeAssistant. Make sure you glance over

https://www.home-assistant.io/integrations/broadlink

and keep it handy for reference. This device uses wireless so you can plug it away from the HomeAssistant server, preferrably with a good, unobstructed view of the TV and other devices you're controlling with IR. It also doesn't need cloud access and you can block any internet access after you get everything working.


Once you do the initial setup, you'll need to learn all the remote commands. Go on HomeAssistant web interface, on the left select "Developer tools" and "Actions". Enter "remote.learn_command" and it should show the same options as the picture. Select your rm4pro as target then name the device and button you want to learn. In the first run I'd recommend setting a timeout as well. You'll have to repeat this for every single button you care about in your remotes (I did every single button, just in case), so make sure you use a standard name so you can remember later. Something like: LG1234, button "power_toggle", "volume_up". In case you do forget what you did, you'll need to access the configuration file that lives on /config/.storage/. See:

https://community.home-assistant.io/t/access-storage-folder/190186


With all the commands learned, it's time to write the first script and test the rm4pro in the process.

Scripts

screenshot-20250929-171350.png
screenshot-20251001-150518.png

In this solution, the "activities" (e.g. "Play DVD" which could mean turning on the TV, setting it on HDMI2, then turning on receiver, setting it to input "AUX") in the harmony controller get translated to HomeAssistant scripts. Go on HomeAssistant's web interface, "Settings", "Automation & Scenes", "Scripts", and add a new script (bottom right blue button). Every step of the sequence will be remote commands, so it's time to get some information about your devices. You want to know how long each device takes to fully power on and be able to receive IR commands. In the picture I attached, I send commands to turn on the TV, the receiver, two HDMI switches then wait 2s for the receiver then send a change input command to it, then wait another 8s for the TV to be completely on before sending anything else. Don't mind the "set page" entries in the pictures, we'll get to that.


I recommend writing a full "activity" right off the bat, so it'll test all the devices are getting some of the IR codes right. Once you get one working properly with the correct delays, duplicate the script for each of the "activities" you have and make sure all of them work. Don't forget to create one to turn off everything.


As optional step, you can add entries on the HomeAssistant UI so you can run these scripts easily (e.g. "Turn off all videogames", to make sure the kid hears "dinner is ready"). The scripts can be added as entities with the name you set them.

OpenHASP

screenshot-20251001-152132.png

Now it's time for flashing and configuring the display. I used the Seeed Studio SenseCAP Indicator D1 for this but you can use whatever OpenHASP device you choose (provided you work the 3d printed parts to fit it). Here's the device's page in OpenHASP's site:

https://www.openhasp.com/0.7.0/hardware/seeed-studio/sensecap-indicator-d1/

Following instructions on

https://www.openhasp.com/0.7.0/firmware/esp32/

you'll need the nightly version (at the time I wrote this guide at least the device isn't supported yet on the regular release) and you should pick the full firmware (OTA is for when you already have OpenHASP installed and wish to update it). Plug the SenseCAP on the computer using a USB C cable and follow instructions on your operational system or use a compatible browser to install the firmware using the web installer.


Once flashed, you can use the USB C to power it from anywhere and you'll set up the wireless network directly on the SenseCAP. Everytime the device boots after that it'll show you its IP address. Use http://<ip>/ on a browser to configure the device. Once you go through preferences, it's time to create the interface you'll be using on it. Go to "File Editor" and pick "pages.jsonl". Bad news (for some) is that you'll create the objects by specifying each one and its position and size, so it'll be a edit/save/reload until you get something you like. As example:


{"page":1,"id":1,"obj":"btn","x":0,"y":0,"w":118,"h":94,"text":"PS3","value_font":22,"bg_color":"#006FCD","text_color":"#FFFFFF","radius":20, "border_side":0, "bg_grad_dir":0}
{"page":1,"id":2,"obj":"btn","x":120,"y":0,"w":118,"h":94,"text":"PS4","value_font":22,"bg_color":"#006FCD","text_color":"#FFFFFF","radius":20, "border_side":0, "bg_grad_dir":0}
{"page":1,"id":3,"obj":"btn","x":240,"y":0,"w":118,"h":94,"text":"PS5","value_font":22,"bg_color":"#006FCD","text_color":"#FFFFFF","radius":20, "border_side":0, "bg_grad_dir":0}
{"page":1,"id":4,"obj":"btn","x":360,"y":0,"w":118,"h":94,"text":"Retron5","value_font":22,"bg_color":"#14032A","text_color":"#FFFFFF","radius":20, "border_side":0, "bg_grad_dir":0}


You have 4 buttons, each 118x94 in size. Make sure to not repeat "id" as it'll be used by HomeAssistant later to figure out which one was pressed. Notice I used 2 units as spacing between the buttons. You can find more information on how to make the interface to your taste at:

https://www.openhasp.com/0.7.0/design/file-editor/


I strived to keep everything on the same page so it's always a single tap away. I also used two buttons for volume up/down. There's an issue that (I'm sure there's a way around in HomeAssistant) differently than a Harmony remote, you don't have the state memory, so you can't have the volume up/down map to the correct device. In my case the volume is always at the receiver, so I'm not affected.

OpenHASP and HomeAssistant

screenshot-20251001-162925.png

Now that you have the SenseCAP configured with the buttons the way you like, it's time to make it work with HomeAssistant.

https://www.openhasp.com/0.7.0/integrations/home-assistant/howto/


You might already have some of the requirements installed and configured. First requirement, you need to install and configure the MQTT integration:

https://www.home-assistant.io/integrations/mqtt

Make sure that if you set a password to have it handy.


Next requirement, you must have HACS which allows to add more integrations to HomeAssistant:

https://hacs.xyz/docs/use/

Then install OpenHASP's integration:

https://www.openhasp.com/0.7.0/integrations/home-assistant/howto/

Now it's time to go configure the MQTT on the OpenHASP:

http://<ip>/config/mqtt

Make sure you remember the hostname you set on OpenHASP, you'll need that. Back on HomeAssistant, if the MQTT didn't find out about OpenHASP, press a button on the display. Add it to HomeAssistant. Then head over to "File editor" on HomeAssistant and edit /homeassistant/configuration.yaml:

openhasp:
seeedpanel:
objects:
- obj: "p1b1"
event:
"up":
- service: script.playstation3_on
- obj: "p1b2"
event:
"up":
- service: script.playstation4_on
- obj: "p1b3"
event:
"up":
- service: script.playstation5_on
- obj: "p1b4"
event:
"up":
- service: script.retron5_on

Notice a few things: "seeedpanel" must match the hostname you set on OpenHASP; "pXbY" means "page X, button Y", where "Y" is the object id I mentioned when you were editing pages.jsonl. This is a very simple way to achive it: once the button up event is generated for page 1, button 1, call the script "playstation3_on" on HomeAssistant. Don't forget to save the file and restart.

Few More Tweaks

screenshot-20251001-164328.png
IMG_20251001_164718_357.jpg

First issue I had was that, because of the delays, there's no feedback when you press a button. So I came up with something for this:

{"page":2,"id":1,"obj":"label","x":10,"y":50,"w":460,"h":180,"align":"center","text":"Please wait..."}
{"page":2,"id":2,"obj":"spinner","x":140,"y":140,"w":200,"h":200,"bg_opa":0,"border_width":0,"line_width":6,"line_width10":6,"angle":80,"line_color":"white","line_color10":"green"}

This creates a new page on OpenHASP that does nothing but show a circle spinning with "Please wait...". You can then make use of this on HomeAssistant's scripts: Add an action at beginning of the script for device "seeedpanel" (or whatever name you used for your OpenHASP) to "Set value for <name> page number" to "2". This will make the script swap to the OpenHASP page we just created so it'll show a "please wait" message while the script runs. At the end of the script, add another action of the same type, but set page number back to "1". Changing pages like this prevents unaware people to keep hitting buttons because "nothing is happening". For scripts that don't have delays, you don't need to do this, as it'll work immediately (like "off").

Conclusion

That's it. It can be daunting having these many parts, but I found it worth the effort. Send me a message with comments, suggestions or questions.