Creation of custom TV Remote

Basically im very new to all this topic, dont have even rpi yet, just doing all on vm.

However i was thinking about making somewhat more advanced control (than my skills allow) and i was looking for some ideas.

  1. Adding couple “switches” for TV / Music / Streambox
  2. Each switch should send series of commands. (for example TV: should send power on to tv + switch source for Onkyo + turning on evo box)
  3. Also would be nice to have same buttons (for example dialpad) changing its behaviour depends on the switch currently selected.

How do i even start doing it? Is it part of script or automation or whole integration? Sry if my naming is bad, as i said im pretty new to all that. Examples would be nice ;D

There’s a LOT of what if. What you want to do is pretty advanced in HA. If you’ve never done it you need to:

Learn how to integrate all of the devices you want to control.
Learn if each device has the ‘entities’ you want and how to work around gaps. (remember you can only control what the device provides. - maybe direct control doesn’t do something IR does. But maybe IR requires extra hardware. And a new integration - see the point? Each device must be evaluated on its own merit. Then wash rinse repeat for each device you intend to include.

Then you need to know/learn all the commands for all of the things you want to do and build scripts or automations for all of them. Then associate the scripts or automations or service calls (or whatever) into buttons that call them (and adding custom cards for buttons is yet another skill to learn.

If you’re doing it to learn it’s worthwhile but as you can see you have a long road before you ever get a remote.

You’ll also learn there’s a LOT of reusable code in the community store and that’s how lost of us do it. Someone created a great pluggable card that works for Android / fire / shield and appleTV devices. (Firemote card) And if you have those integrations setup its almost plug and play. People have done the same for LG and Samsung too.

So you can do it. But don’t get discouraged. Just realize you have not picked an easy start.

Yea i already figured out what can or cannot be done by similar integrations. I can turn on tv and change source (thats all i need). Then i know i can turn on Onkyo + switch sources - thats also all i needed from it. EVObox also has some integration already done, so i can control it (like prev/next channel or wake on lan + volume).
The biggest problem comes when i want to integrate it all together into one control. Thats the whole point of asking.

I mean, i know the steps of doing it, i just dont know the tools to do it. I was mostly wondering whats the best way of doing it. Like going through some own integration (which i dont think is needed if all functions needed are already implemented), or going through some stuff like python scripts or whatever. Could u maybe provide any examples that match of what im trying to do? I dont even know how to start searching for that stuff.

That’s my point it’s a LOT. (for a whole remote)

Custom button card or mushroom and card mod in HACS will be your best friends for buttons. If you already know how to control it it’s just arranging and gluing stuff together.

The other stuff is just flat out reading the docs and learning how to do the automations. So you’ll need to learn how to use vertical stack, horizontal stack and grid container cards. You may also need to learn how to use the custom layout card (for fine grain control of button placement - For that you’ll need to learn CSS Grid.)

I won’t do a full remote personally. Way too much work for something already solved for something like that I use Firemote. Also in HACS.

I started doing things like you describe by trying to create a compound control for something like a window shade that also had a window sensor and figuring out how to change the control to lockout the window roller when the windows are actually open. (that’s an exercise that will teach you trust me…) take what you learn from that and make the door lock work only when the door is closed. Etc. Then those skills translate to other custom buttons then next thing you’re gluing two or three of those together and… Poof remote. So increasingly complex construction.

If you’re looking at a controls you may also look at creating a template media player to consolidate the setup then drive yir remote from that.

To build the compound controls I always start in a test dashboard and pull in all of the entities I want to use see why I can do with them then draw out a representation of what I want it to look like. Rearrange, see how to use custom cards to represent better. Edit repeat.

1 Like

i totally agree with @NathanCu that starting with something and modifying it is a way to go. nathan said he uses firemote. i use this as a starting point (because i have fire tv) and extend it to control my yamaha amp and sony and lgtv’s:

i’d encourage you, like nathan, to start with something like this… pick either your tv or your streaming device as the starting point, and get the remote to control just the one thing.

then start adding code to change one of the buttons to do multiple things… personally i’d recommend replacing the power button from turning on/off the tv to turn on/off everything. in most of these canned remotes it lets you call into a service… i would put power on/off as a script… a script is a callable service.

in this way you can figure things out bit by bit.

2 Likes

Sooo correct me if im wrong, connecting series of commands from different devices is not possible without some advanced configuration like own integration or stuff?
I got remote.tv.power_on and remote.onkyo.power_on, and its not possible to create 1 button using these 2 commands in row?

Depends how the integration accepts commands, but in most cases if it’s not simply turning on or off a device, you can break everything down to custom button fires (the service to trigger) a script with the right parameters to do what you want. The way HA does things, you can’t store the actions in the buttons themselves. Whether your script does one thing or a dozen things is up to you.

1 Like

what @NathanCu describes is not “advanced” … don’t be afraid of it… just create a script and invoked the script. any of us can help…

being afraid of the dark has more validity than being afraid of scripts :smiley:

1 Like

Here is another informative thread. As @armedad stated, this is not as complicated as it appears when first starting.