Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new feature to include a custom command config to turn old TV on #108

Open
CyberMrProper opened this issue Nov 2, 2022 · 2 comments

Comments

@CyberMrProper
Copy link

CyberMrProper commented Nov 2, 2022

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.

@CyberMrProper CyberMrProper changed the title Add new feature for custom command to turn TV on Add new feature to include a custom command config to turn old TV on Nov 2, 2022
@CyberMrProper
Copy link
Author

CyberMrProper commented Nov 3, 2022

var exec = require('child_process').exec;

In here

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?

@zobe123
Copy link

zobe123 commented Nov 25, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants