eslavnov / pylips

Control Philips TVs (2015+) and Ambilight (+ Hue) through their reverse-engineered API (+ MQTT support!)
MIT License
342 stars 60 forks source link

[FEAT] Switching between sources works for G. Assistant, any remote service known? #81

Closed Dickoz closed 3 years ago

Dickoz commented 3 years ago

I have a Philips 43PUS8535. Switching between sources can be done through traversing a menu only, I think. The model does not accept the HDMI x IR discrete codes of my older 43PUS7304. Switching between sources is now bothersome.

I found that G. Assistant (embedded in the TV) does recognize voice input 'HDMI 1' (spelled) up to 4, and even in Dutch. And it switches rapidly. Does this mean that there is perhaps a hidden service or API to switch rapidly too?

I tried to scan the IR code on the remote of the G. Asssistant button. It seems however that butoon only activates the mic within the remote!. There is no IR signal.

How can I discover that hidden service/API if it indeed exists?

eslavnov commented 3 years ago

Hi @Dickoz,

On Android TVs there is definitely some kind of a hidden API/service to switch the sources, but I have not been able to actually find it and figure out how to use it. If you would connect a keyboard to your TV, then you can switch the sources by pressing F1-F5. Based on this, I've made a small wrapper around adb to send such commands remotely: https://github.com/eslavnov/android-tv-remote

It's not ideal, but as I said, that's the best I could do for now.

Dickoz commented 3 years ago

Thanks eslavnov. I managed to borrow a Bluetooth keyboard and paired it with my Philips TV. Unfortunately Android-TV apparently reacts differently. F1-F8 function as contrast and sound changes, and F10 activates an image correction menu. Thanks anyway, it was worth trying. If I find something else I'll let you know.

eslavnov commented 3 years ago

Thanks for the idea, @Dickoz - I was able to utilize one of the API methods to talk to google assistant, so starting from version 1.3.0 Pylips can switch input sources!