First discussed here:
The apps and drivers in this repository allows to do a few things, but at the core, it is combining a Broadlink remote based on https://community.hubitat.com/t/broadlink-ir-rf-remotes-integration-rm3-mini-rm-pro-rm4-mini-pro by @tomw, and a power meter. It defines a switch behavior to toggle on/off the device. The on/off status of the switch is calculated based on the power meter and a customizable power threshold. The on/off action of the switch is implemented by sending one (or multiple) IR commands through the broadlink remote.
In addition, the driver defines "up", "down", "custom1" and "custom2" commands to send customizable IR signals.
There is a second driver and child app which is meant for a TV and sound system combination. It allows to combine two power meters and two broadlink remotes, one for the TV and one for the sound system. It implements the TV capability (switch, channelUp, channelDown), as well as mute, volumeUp, volumeDown.
Examples of use cases for me (illustrated in the screenshots below):
- Controlling a TV + sound system. The "switch on" action sends two IR signals, one to power the TV on, one to power the sound system on. The "switch off" action turns off both devices. Plus, from the device page, you can directly call "channel up", "channel down", "volume up", "volume down", "input 1", "input 2", and it sends the corresponding IR signals to the correct device.
- Controlling a dumb robovac that has an IR remote. It shows itself as a switch, which starts the vacuum when I flip it on, and which flips back off when it is done.
- Controlling a dumb humidifier that has an IR remote. The "switch on" action sends a power signal + sets the humidity level and UV lamp on.
The two types of devices also support the "push" action, which allow to use it in a dashboard in the same way as you would do it with the bare broadlink remote.
The TV device also implements the "previousTrack" and "nextTrack" commands (corresponding to channel down and channel up), which allows it to be used as a "Music Player" dashboard widget as a control in a single tile.
The structure of the app is based on Advanced Virtual Thermostats by @nclark [RELEASE] Advanced vThermostat - Virtual Thermostat HVAC control