nstrelow / ha_philips_android_tv

Home Assistant custom component for the newer (2016+) Philips Android TVs
109 stars 28 forks source link

Can't get tv source and playing status #52

Closed Julien-Decoen closed 3 years ago

Julien-Decoen commented 3 years ago

I'd like to migrate from androidtv integration to ha_philips_android_tv to be closest to my 50PUS7354. So I install the ha_plilips_android_tv via HACS and add this the configuration below :

- platform: philips_android_tv
  name: Télé 2
  host: !secret philips_tv
  mac: !secret philips_tv_mac
  username: !secret philips_tv_username
  password: !secret philips_tv_password

After restarting, it looks like the integration can't update tv informations (source, play_status) and then all conditional actions not working as expected (play/pause/next_track/previous_track). No informations in logs...

This is the result when I'm playing media :

First lovelace's card show my TV with androidtv integration and second show the same TV with philips_android_tv integration

Capture d’écran 2021-01-26 à 15 46 57

Current status : on | Expected status : playing Current source : 📺 N/A | Expected status : 📱 YouTube

Capture d’écran 2021-01-26 à 15 46 57

Only changing volume working like a charm.

nstrelow commented 3 years ago

You already posted this in #49

I repost as well:

the androidtv component is more powerful in certain aspects.

the philips api can only do, what you can do with the philips remote app.

Please check out if that displays what you want, and if so, provide a screenshot or description and reopen the issue.

Julien-Decoen commented 3 years ago

Hello @nstrelow. Thanks for your amazing job and your answer !

I'm really disappointed ... I saw your message in #49. I open this issue because i'm thinking that there some issue for me. So i'll try to give you more informations about my issues. And you write the same answer as the previous post...

I saw in the sourcecode that features are included in your integration. For example, the function 'media_next_track' send different commands according to media_content_type value. Like I try to explain above, as my integration return a wrong value for media_content_type, it sends the wrong command to my TV (CursorUp instead of FastForward when i'm on youtube app).

    def media_next_track(self):
        """Send next track command."""
        if self.media_content_type == 'channel':
            self._tv.send_key('CursorUp')
        else:
            self._tv.send_key('FastForward')

So, for me there is an issue with the update function. My media_player are not updated : wrong _state value, N/A as _source...

When I saw your response above, I understand that its a normal behaviour. But I saw functions related to my issue in the code, so is it normal that this function doesn't work and not updated my TV sensors ?

Do you need more information about my hardware ? My api version ? Can you help me to clarify my situation please ?

nstrelow commented 3 years ago

Philip's API will display some values under some circumstances.

Sending an up button event is weird and probably has to do with your device not compatible or this plugin not being well enough adapted to handle all different models and versions.

I am also not actively using or developing this plugin.

What U remember adding, was the ability to open apps and to see which app is currently opened.

It will not display the video title in youtube or prime video. It only displays the TV channel name, if you are watching one.

What can you do?

Your best bet is to get it running for your TV, since I cannot test and your model and currently do not have the time.

You can also use a different plugin of course. Why do you not want to use thr androidtv component?

nstrelow commented 3 years ago

Also be sure to try using the philips remote app

https://www.philips.com/c-w/country-selectorpage/tv/tv-remote-app.html

This plugin is only built to enable stuff which the remote can also do.

nstrelow commented 3 years ago

Seems like they updated the app. It can now do even less.

Not even open apps.