NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
441 stars 77 forks source link

Apple TV 4k with Alexa #607

Open ArkhanDev opened 3 months ago

ArkhanDev commented 3 months ago

Current Situation

I'm trying to connect my Apple TV to Alexa because the Home Assistant Integration doesnt work well. I tried adding it with the Addons provided but the homebridge-apple-Tv addon spits out an error and isnt updated since 2018 and the homebridge-apple-Tv-remote is deprecated. I used homebridge-apple-tv-enchanced and it shows itself as an TV but I can't control volume or do anything else than turn it on or off. Can someone help me out?

Logs

[3/19/2024, 4:31:11 AM] [Alexa] alexaDiscovery - returned 1 devices
[3/19/2024, 4:31:21 AM] [Homebridge UI] Terminal session ended.
[3/19/2024, 4:31:29 AM] [Homebridge UI] [admin] Accessory layout changes saved.
[3/19/2024, 4:31:30 AM] [Homebridge UI] Starting terminal session
[3/19/2024, 4:41:02 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: off
[3/19/2024, 4:41:36 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: on
[3/19/2024, 4:41:48 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: off
[3/19/2024, 4:42:01 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: on
[3/19/2024, 4:49:55 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: off
[3/19/2024, 4:50:01 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Active State: on
[3/19/2024, 4:50:20 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: playing
[3/19/2024, 4:50:43 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: paused
[3/19/2024, 4:50:44 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: playing
[3/19/2024, 4:54:16 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: paused
[3/19/2024, 4:54:17 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: playing
[3/19/2024, 4:56:53 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: paused
[3/19/2024, 4:56:58 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: playing
[3/19/2024, 5:09:15 AM] [Apple TV Enhanced] [I] Apple TV Wohnzimmer (C0:95:6D:6A:CC:7C): New Device State: paused
[3/19/2024, 5:33:49 AM] [Homebridge UI] Terminal session ended.
[3/19/2024, 5:34:46 AM] [Homebridge UI] Starting terminal session
[3/19/2024, 5:35:43 AM] [Homebridge UI] Terminal session ended.
[3/19/2024, 5:35:53 AM] [Homebridge UI] [admin] Accessory layout changes saved.
[3/19/2024, 5:42:07 AM] [Homebridge UI] Starting terminal session
[3/19/2024, 5:43:11 AM] [Homebridge UI] Terminal session ended.

Configuration

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "This is an example configuration file with gui. You can use this as a template for creating your own configuration file containing devices you actually own.",
    "accessories": [],
    "platforms": [
        {
            "platform": "config",
            "name": "Config",
            "port": 8124,
            "sudo": true
        },
        {
            "name": "Alexa",
            "username": "pchelkaa",
            "password": "censored",
            "pin": "031-45-154",
            "refresh": 900,
            "keepalive": 5,
            "CloudTransport": "mqtts",
            "deviceListHandling": "none",
            "platform": "Alexa"
        },
        {
            "name": "Apple TV Enhanced",
            "deviceStateDelay": 0,
            "avadaKedavraAppAmount": 15,
            "disableVolumeControlRemote": false,
            "setTopBox": false,
            "discover": {
                "multicast": true
            },
            "forceVenvRecreate": false,
            "logLevel": 3,
            "updateCheckLevel": "stable",
            "deviceSpecificOverrides": [
                {
                    "overrideMediaTypes": false,
                    "overrideDeviceStates": false,
                    "overrideDeviceStateDelay": false,
                    "deviceStateDelay": 0,
                    "overrideRemoteKeysAsSwitch": false,
                    "overrideAvadaKedavraAppAmount": false,
                    "avadaKedavraAppAmount": 15,
                    "overrideCustomInputURIs": false,
                    "overrideDisableVolumeControlRemote": false,
                    "disableVolumeControlRemote": false,
                    "overrideSetTopBox": false,
                    "setTopBox": false
                }
            ],
            "platform": "AppleTVEnhanced"
        }
    ]
}

Environment

Process Supervisor

Docker (Mention image name in Additional Context)

Additional Context

No response

NorthernMan54 commented 3 months ago

I have pause / play / on / off control with this - https://github.com/NorthernMan54/homebridge-cmd-television

ArkhanDev commented 3 months ago

it says every block needs a platform. What is the platform i should use?

ArkhanDev commented 3 months ago

nvm i inserted to platforms

NorthernMan54 commented 3 months ago

In the config.json it goes into the accessories block

ie image

ArkhanDev commented 3 months ago

It says it cant find a plugin after npm installation. trough homebridge ui install it spits out an error

NorthernMan54 commented 3 months ago

A command line like this - npm i https://github.com/NorthernMan54/homebridge-cmd-television

Screen Shot 2024-03-19 at 9 56 17 AM