Command logic based on Feedback from Device

I have issues with some commands such as when I tell something to power on, it doesn’t come on so subsequently I may have to send 5 power on commands, same issue for power off.

It would be nice to be able to ask the device are you on after you send the power on command, and if you get no response, send another power on command until the answer comes back, yes I’m on. Same for power off, if it senses that the device is still on, send off commands until it gets no response.

A couple of examples. Send WeMo wake on LAN and then Power On. It doesn’t have a consistent amount of time that it takes to wake up and then power on. Some days it’s immediate, sometimes I have to send the command 5 times.

Chromecast CEC power on with Samsung TV. It will power on and then switch to the Chromecast input. I then have to tell the TV to change inputs to the TiVO or Blu-ray, etc. input. Sometimes if some of my commands are off on the timing (since I have no feedback), I have to press the Watch TV button again, but then this makes the input switch back to Chromecast.) So it would be nice to see that the input is on chrome cast so the remote would send HDMI1 for instance until it knew that it’s on HDMI1 input then go onto the next command.

The option to set a timeout value would be good so that the remote doesn’t get stuck.

It would be nice to be able to add power sensors or video sensors as well so that besides IP queries to the device for programming logic, you could see if the device was drawing power or sending a signal down the video cable.