Bonus points IR Code Sleuthing for HDMI Box

I have an IR controllable HDMI switch box, it’s good, but the manufacturer seems to have stopped making it. I’d like to add the remote control to my HASS dashboard, and do away with the annoying clicky-bubble-button flimsy zapper that came with it. Bonus points: Discover undocumented additional discrete codes to switch to each HDMI channel, as the remote only has buttons for switch left/right.

The HDMI box itself is a ‘Fosmon 3x1 Optical Audio Switch’ and it looks like this:

The IR unit is completely unbranded, and looks like this:

Using my ESPEasy board with IRRX sensor, I can read the output from each button, easy. I can even fire them back out of the ESP with an IRTX setup. Job done, right?!

Not quite, I’d really love to be able to specify which input to jump to, for two reasons:
1: It’s annoying to have to hit multiple times to cycle inputs.
2: The box auto-switches to the active port when it picks up a new HDMI signal coming from that port, so It’s hard to do an ‘optimistic’ tracking of which input is active without seeing the box itself (buried in my garage).

Of course, after spending a longer time than I’d care to admit Googling, I was unable to find either codes for the box, or any details on the remote. So next step I guess is to pick a range of numbers, close to the ones I already have for the 10 buttons on the remote, and fire them at the switcher from ESP until something happens.

Has anyone done this and can recommend a way to take some of the labor-intensive guesswork out of it please? I appreciate there may well be no discrete codes available, but I’d like to at least be able to say I’m sure of that. Without a good starting point, I’m looking at some of the better supported Fosmon boxes (like the HD1996) to see if the codes are the same.

Any thoughts, guidance, scathing criticism and recycled memes are welcome :wink:

I’m guessing you’re looking for the code that changes from 1 to 3 or 2 to 1 directly without the forward and back?

I’ll be honest, your best bet is to just try codes till you find something to work. I did the same thing when I was trying to figure out roku remote codes. I just ran 10 at a time till something happened and then figured out which one it was. Set up a script and just ran it through.

Here’s a link that might be helpful too

2 Likes

A super janky horrible bodge suggestion I have…
When you turn the HDMI switch on after having power disconnected does it default to a particular input? (eg input 1)

If so, you may be able to have an input select on the front end for the various inputs and when you select a particular one it runs a script that will kill power to the switch (smart plug required obviously), turn it back on, wait until the box is ready for commands (if required), then send the required amount of ‘right’ or ‘left’ commands…?

Edit-
It really is worth mentioning just how ugly this automation would look to the end user.
You would ask alexa/whatever to change your input, your screen would go black for a second or two as the switch’s power is killed and recovers, then the input would skip a couple of times to the correct one.
Although if the box really is as dumb as you say this would be the easiest (though, ugliest) solution.
Otherwise I imagine you may need to crack that sucker open and throw in some RF relays. But then I’d have no idea how that would work and there is an obvious chance of frying it.

1 Like

Thanks for the link and advice. Any ideas how I would covert the code that I get out of EspEasy to the sort of codes they’re listing there? I found some other convertors but nothing that looks like the codes I’m getting here. (e.g: “16760895” - they’re all numeric, 8 digit codes).

This is my kind of hack! I love it :slight_smile: I might resort to that if I don’t get any joy finding a clean solution.

1 Like

Their 5 port switch has buttons numbered 1 to 5 … so they have discrete codes for that.
Might be the same ones … if you can find someone who has one of those and has learned the codes or maybe a code database for an IR blaster.
https://www.fosmon.com/other/tv-audio-and-home-theater/hdmi-switches/intelligent-5x1-5-port-hdmi-switch-switcher-with-ir-remote-and-1-5-meter-usb-power-cable-supports-3d

Fosmon might help via social media.

2 Likes

Didnt know about these direct switchable HDMI switches previously.

I’ve just ordered the one you’ve linked to. Hopefully my Broadlink will be able to control it after sniffing the each select button!

If this supports CEC properly (without breaking CEC for other devices like a previous cheap hdmi switch did) then this would be perfect.
Thanks for bringing this to my attention. :slight_smile:

I can confirm the 5 port version IR is not compatible with the old 3 port one. But I am now the owner of the 5 port one, with discrete codes for each port, yay!