normen / homebridge-bravia

Homebridge plugin for Sony Bravia TVs (AndroidTV based ones and possibly others)
139 stars 26 forks source link

Allow WOL to wake up TV #38

Closed ojoaosemtil closed 5 years ago

ojoaosemtil commented 5 years ago

Hello, First of all, thank u for this plugin!

I've always used the old homebridge-sonytvremote, the one your plugin is based on. When I tried to use yours, everything is fine, except that I can't turn on my tv.

I've made some research in the code, because apparently my TV can only "wake up" with wake on lan (I think it was used in the homebridge-sonytvremote plugin) since I can't use any plugin which requires a PSK because my Bravia doesn't have that.

I tried to implement wake on lan in your plugin index.js file using some code from the lombi plugin but without success, I'm a noob.

I know that you don't offer any sort of support to this plugin, but still, I would like to know if it is possible for you to give me some help on what to use from the previous code to work with wake on lan, or if you plan to implement this.

And, I apologize for sending this as an issue, but I didn't found any other way to contact you.

Thank you!

normen commented 5 years ago

Yeah, I removed the WOL function as it was pretty messy code and most TVs don't seem to need it. So you say can can neither set your TV to PSK nor set remote wakeup? But it can still receive HTTP commands? You absolutely sure you didn't just miss the menu?

Anyway, if you can show me a PR of what you were able to find or something like that - so I don't have to do the research etc. - then maybe it is now easy enough to add.

normen commented 5 years ago

Actually it wasn't that problematic, try if v1.1.0 does the trick. You have to add a "mac" parameter to your config, then WOL is used.

ojoaosemtil commented 5 years ago

Thank you very much! It worked! In my Sony Bravia I can set the remote wake up function, I just don't have the pre-shared key thing.

But it is completely working now, thank u!