It is difficult to convert separate on and off commands to a single on/off toggle command if you have no state feedback to tell you if the amp is on or off. Particularly if the amp can be controlled by other remotes outside of Home Assistant.
Alternatives (best to worst):
If your amp has a network connection, see if there is an integration to control it over the network rather than IR.
Work out some way to determine if your amp is on or off (e.g. a power monitoring smart plug). Then write a script to toggle the amp power depending on the state of this sensor.
Keep track of the state of your amplifier in an input boolean and hide all the other remote controls. Can still get out of sync with power loss / failed transmissions etc…
Or just use separate on and off buttons, which I realise is not what you asked for so is not on the list but it is the easiest solution.
Can you send a snippet of your config.yaml showing the code? Don’t forget your proper coding. It will inform you when you paste it. If its multiple lines put this on the first and last line by itself: ```
What brand of amp is it. Are you trying to use the IR IN on the amp? I had issues with amps trying to use the IR in. BTW… The iTach, while I love them, is problematic on HA - i keep my Vera’s for this very reason and have HA call Vera.
I’ve gone right off IR control in Home Assistant. No state feedback is really annoying.
I’m waiting for a pull request to be merged for the Panasonic TV integration to support network control and then I can get rid of both my iTachs altogether. To do this I had to throw a bit of money at the solution. New networked Receiver/Amps, DIY ESPhome RS232 projector control (untested as yet but I have confidence), reverse cycle aircon network board, better smart lights etc…
I haven’t been successful, but only spent prolly 2 hours working on it. I know its an HA thing, just over trouble shooting and found a workaround… I set the amps to turn on/off when it detects sound and just turn on/off the AV via HA (Marantz via IP). The amps are Eclipse. I forget the master sell the guys got them from.
I downloaded another iTach package from HACs. Supposedly combines GC100s. I have a lot of those as well controlling gates, pergola, pool etc… That’s another pia to keep working as well as its not built into core and after each necessary update have to change out some of the python libraries.
Yea, the DIY automation projects can creep… I ended up upgrading to all managed switches (all unifi cept mikrotik gateway) and new APs and putting everything on their own VLANs, changing out 14 cameras, adding Blue Iris all bundled into HA. That and movie poster collecting was my Covid era project.
If anyone is interested… The HookUp on YouTube is hard to beat for a lot home automation and research on latest brands.
Thank you guys. I found a POWER TOGGLE IR command and that has fixed the on/off. I wish there was an integration for this amp but alas I’m stuck with IR for now. The Amp is an Emotiva XMC-1 that I am currently controlling through iRule. However, since iRule is no longer supported I’m trying to move away from it. My next issue is getting Volume Up/Down to work, possibly via a slider. Of course I have the IR commands already added to configuration.yaml and I’ve been searching for a media player that might work but I can’t see how to modify any of them to work. Do you have any suggestions on how I could manage a volume control through the Itach? Thx!
edit: No I’m not using IR in, just a stick on IR eye on the front of the amp.
Unfortunately, again, without feedback of where the volume is set on the amp it is next to impossible to control the volume with an input_number. Up and Down buttons are the best you can do.
I loved iRule… Actually still use it for a couple of things I haven’t moved over to HA. iRule was the bomb until they sold out.
good to hear your getting it all to work. Look into the broadlink rm pro as well. I haven’t bought one yet, but I know a lot of people that use them. Might be a solution for you.
Hi @thedishking you are the first post that I’ve found stating that you got an iTach IP2SL (Serial not Wifi) working with HA.
I have and old AV unit that I currently control via an iTach IP2SL and an iOS app (iRule) and it works perfectly. I would now like to integrate the IP2SL unit into HA and I haven’t found any solutions yet. This is the last integration I need to complete HA and I’ve been trying to find a solution for weeks.
Sending RS232 is the same; only the port has changed for the syntax of the command.
Here is an example of sending RS232 commands via a Global Cache IP2SL device:
Hi All, just a follow up that thanks to @thedishking I found a solution:
I realized that in iTest I was only successful communicating with my IP2SL when I was connected with Telnet.
Lightning struck and I realized that HA has a Telnet service. From there it literally took me minutes to write some code to send serial commands with the Telnet service to the IP2SL/Elan. I have it all set up and running perfectly. I even exposed it to Alexa and can now control it with voice commands.