konradknitter / homebridge-philips-android-tv

Homebridge module for the Philips Android TV
Apache License 2.0
48 stars 6 forks source link

Failure in Setup. TV not responsive.. but does seem to be working kinda #39

Open durosity opened 3 years ago

durosity commented 3 years ago

Describe The Bug:

During startup after configuring plugin I'm getting this error: However a device does show up in Home app and a remote does show as well, although nothing gets populated for favourite channels or sources (I'm not sure if it should or not? I've tried adding in sources like HDMI manually but they don't seem to show, is this currently supported?) **To Reproduce:**

Setup config and add a TV Restart HomeKit View log Expected behavior:

No error Logs:

`[6/8/2021, 5:58:41 PM] Homebridge v1.3.4 (Homebridge F2BA) is running on port 51590.
[6/8/2021, 5:58:41 PM] [PhilipsAndroidTV] [Lounge TV1] TV state {"powerstate":"On"}
Got an error
{ error: { login: [ 'invalid_email_or_password' ] } }
[6/8/2021, 5:58:42 PM] [PhilipsAndroidTV] [Lounge TV1] Applications setup finished
[6/8/2021, 5:58:42 PM] [PhilipsAndroidTV] Failure in setup. TV not responsive.`

Plugin Config:

    "bridge": {
        "name": "Homebridge F2BA",
        "username": "0E:22:06:6D:5D:9F",
        "port": 51590,
        "pin": "388-05-913",
        "advertiser": "ciao",
        "bind": [
            "en0"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "none",
            "theme": "indigo",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": false,
            "sessionTimeout": 28800,
            "log": {
                "method": "native",
                "path": "/Users/Mike/.homebridge/homebridge.log"
            },
            "platform": "config"
        },
        {
            "platform": "SurePetcare",
            "email": "XXXX,
            "password": "XXXX",
            "poll_interval": 30,
            "pet_occupancy": false,
            "occupancy_flipped": true
        },
        {
            "name": "Lounge Television",
            "hubIP": "192.168.1.30",
            "hubName": "Lounge Television",
            "cleanCache": true,
            "publishAllTVAsExternalAccessory": true,
            "TVAccessory": true,
            "mainActivity": "Watch Apple TV",
            "otherPlatforms": [
                {
                    "name": "Master Bedroom Television",
                    "hubIP": "192.168.1.110",
                    "hubName": "Master Bedroom Television",
                    "TVAccessory": true,
                    "mainActivity": "Watch Apple TV"
                }
            ],
            "platform": "HarmonyHubWebSocket"
        },
        {
            "name": "Camera FFmpeg",
            "platform": "Camera-ffmpeg"
        },
        {
            "controllers": [
                {
                    "address": "192.168.1.1",
                    "password": "XXXX",
                    "username": "XXXXX"
                }
            ],
            "options": [
                "Enable.Doorbell.Trigger.XXXX",
                "Enable.Audio.Filter.Noise"
            ],
            "platform": "UniFi Protect"
        },
        {
            "platform": "BraviaOSPlatform",
            "name": "BraviaTVOS",
            "tvs": [
                {
                    "name": "Master Bedroom TV",
                    "ip": "192.168.1.113",
                    "port": 80,
                    "timeout": 5,
                    "appName": "Master bedroom TV",
                    "appUUID": "a4c1caf8-7c32-4cf2-b85a-34efcb739599",
                    "inputs": [
                        "extInput:hdmi",
                        "extInput:hdmi2"
                    ]
                }
            ]
        },
        {
            "debug": true,
            "configVersion": 1,
            "tvs": [
                {
                    "name": "Lounge TV1",
                    "ip": "192.168.1.30",
                    "macAddress": "1C:5A:6B:B8:F3:3E",
                    "apiUser": "XXXX",
                    "apiPass": "XXXX",
                    "apiVersion": 6,
                    "wakeUntilAPIReadyCounter": 100,
                    "alternativePlayPause": false,
                    "dedicatedMuteSwitch": false,
                    "dedicatedVolumeLightbulb": false,
                    "channels": {
                        "useFavorites": false,
                        "favoriteListId": "1",
                        "includeAll": true,
                        "channels": [
                            "HDMI"
                        ]
                    }
                }
            ],
            "platform": "PhilipsAndroidTV"
        }
    ],
    "disabledPlugins": [
        "homebridge-philipstv-enhanced-x",
        "homebridge-bravia-tvos",
        "homebridge-philips-tv6",
        "homebridge-zoe",
        "homebridge-harmony"
    ]
}

Screenshots:

Environment:

konradknitter commented 3 years ago

Hi,

_"Got an error { error: { login: [ 'invalid_email_orpassword' ] } } "

seems to be from other plug-in.

[6/8/2021, 5:58:41 PM] [PhilipsAndroidTV] [Lounge TV1] TV state {"powerstate":"On"}

confirms that api credentials works.

I've tried adding in sources like HDMI manually but they don't seem to show, is this currently supported?)

Philips API do not support Input switch, only apps and TV Channels

although nothing gets populated for favourite channels or sources

and

                    "includeAll": true,

Should have all channels, but some error happen: [6/8/2021, 5:58:42 PM] [PhilipsAndroidTV] Failure in setup. TV not responsive.

I have to guess,

neonish commented 3 years ago

@durosity I had the same issue on my Philips 55PUS8505.

[02/07/2021, 07:43:34] [PhilipsAndroidTV] Initializing PhilipsAndroidTV platform...
[02/07/2021, 07:43:34] [PhilipsAndroidTV] Loading accessory from cache: Phillips TV.volume.lighbulb
[02/07/2021, 07:43:34] [PhilipsAndroidTV] Loading accessory from cache: Phillips TV.mute.switch
[02/07/2021, 07:43:34] [PhilipsAndroidTV] [
  {
    ## config gets printed ##
  }
]
[02/07/2021, 07:43:34] [PhilipsAndroidTV] Adding new accessory: Phillips TV
[02/07/2021, 07:43:34] [PhilipsAndroidTV] [Phillips TV] Connecting to TV to fetch current informations
[02/07/2021, 07:43:34] [PhilipsAndroidTV] [Phillips TV] TV state {"powerstate":"On"}    <-- your error
[02/07/2021, 07:43:35] [PhilipsAndroidTV] [Phillips TV] Applications setup finished     <-- your error
[02/07/2021, 07:43:36] [PhilipsAndroidTV] [Phillips TV] Channels setup finished         <-- your error
[02/07/2021, 07:43:36] [PhilipsAndroidTV] Configuration of dedicated Volume Lightbulb
[02/07/2021, 07:43:36] [PhilipsAndroidTV] Failure in setup. TV not responsive.

"Toggle ON/OFF" is not responsive in Home … regardless of whether the TV is turned on or off. (WoWLAN is activated on TV) "Volume" and "Mute Switch" controls aren't working either.

Bildschirmfoto 2021-07-02 um 07 35 12

This is my config:

{
            "platform": "PhilipsAndroidTV",
            "debug": true,
            "configVersion": 1,
            "tvs": [
                {
                    "name": "Phillips TV",
                    "ip": "###.###.###.###",
                    "macAddress": "AB:CD:EF:GH:IJ:KL",
                    "apiUser": "####",
                    "apiPass": "####",
                    "apiVersion": 6,
                    "wakeUntilAPIReadyCounter": 100,
                    "alternativePlayPause": true,
                    "dedicatedMuteSwitch": true,
                    "dedicatedVolumeLightbulb": true,
                    "channels": {
                        "useFavorites": false,
                        "favoriteListId": "1",
                        "includeAll": false
                    }
                }
            ]
        },

I found out that when I change "macAddress" from AB:CD:EF:GH:IJ:KL to ABCDEFGHIJKL (just remove the colons), at first the same behavior as above appears, but right afterwards:

Preparing Advertiser for 'Phillips TV 929B' using bonjour-hap backend!
Starting to advertise 'Phillips TV 929B' using bonjour-hap backend!
[02/07/2021, 07:43:36] Phillips TV 929B is running on port 34139.
[02/07/2021, 07:43:36] Please add [Phillips TV 929B] manually in Home app. Setup Code: 779-47-886
…
[02/07/2021, 07:43:41] [PhilipsAndroidTV] [Phillips TV] Start responding again.
[02/07/2021, 07:43:41] [PhilipsAndroidTV] [Phillips TV] TV has been turn on.
[02/07/2021, 07:43:41] [PhilipsAndroidTV] [Phillips TV] Current application has been changed to NA.
[02/07/2021, 07:43:41] [PhilipsAndroidTV] [Phillips TV] TV Channel has been changed to n-tv.

Now "Toggle ON/OFF" works. And Homebridge sees the TV's state changes:

[02/07/2021, 07:45:19] [PhilipsAndroidTV] Turn on TV:0
[02/07/2021, 07:45:21] [PhilipsAndroidTV] [Phillips TV] TV has been turned off.
[02/07/2021, 07:45:25] [PhilipsAndroidTV] Turn on TV:1
[02/07/2021, 07:45:26] [PhilipsAndroidTV] [Phillips TV] TV has been turn on.
[02/07/2021, 07:45:26] [PhilipsAndroidTV] [Phillips TV] TV volume has been changed to 20%.

I'm running homebridge (1.3.4) on a RaspberryPi3+ (Raspbian GNU/Linux 10 (buster)) with plugin version v0.10.9

@konradknitter Oddly enough, the "Volume" and "Mute Switch" controls in Home still aren't working. Any pointers? Also, is it normal that WoWLAN works, right after I turned off the TV, but stops working when the TV is turned off for a longer period (like over night)?