homebridge-vieramatic
homebridge-vieramatic copied to clipboard
Add new feature to include a custom command config to turn old TV on
I have an old Panasonic TV that does not have wake on lan functionality. Once the TV is turned on (with the physical remote), the plugin works flawless. Given that I have an IR blaster, it would be great if this plugin could include a fallback mechanism to execute a command line script if "turns on" fails.
[Panasonic TV] (setPowerStatus)/-> ON - unable to power cycle TV - unpowered ?
Then run command line from config.
var exec = require('child_process').exec;
In here https://github.com/AntonioMeireles/homebridge-vieramatic/blob/b40d36488e5cdd8e2c096f9b0601d351da6785af/src/accessory.ts#L433
it could be something like:
else if (nextState === this.Characteristic.Active.ACTIVE && this.userConfig.customTurnOnCommand){ exec(this.userConfig.customTurnOnCommand); await sleep(1000) await this.updateTVstatus(nextState) }
@AntonioMeireles thoughts?
i was just thinking the same thing, would be a cool feature.
I can turn on the tv indirectly via a URL. (Enigma2 STB -> turns TV ON)