lukasroegner / homebridge-apple-tv-remote

Plugin for controlling Apple TVs in homebridge.
MIT License
131 stars 13 forks source link

Follow on to issue #29 #42

Closed jwa1d62 closed 4 years ago

jwa1d62 commented 4 years ago

I set HomeBridge up on a new Raspberry Pi and was able to get paired, I set up the on/off switch, and it works.

I am now attempting to set up the 'up','down','left','right', and 'select' commands using commandSwitches. Although I am getting no syntax issues and the buttons are created, they do nothing when pressed. I am assuming their intent is to allow me to move around the Apple TV screens.

To be sure I have the config correct, would you mind creating for me the commandSwitches section of the config file showing the proper set up for the above 5 commands ?

Many thanks!

lukasroegner commented 4 years ago

14 provides good examples for the command switches feature. Please make sure to also check closed issues for possible solutions in the future.

Here is an example for your desired configuration:

"platforms": [
    {
        "platform": "AppleTvPlatform",
        "devices": [
            {
                "name": "XXXXXX",
                "credentials": "XXXXXX",
                "isOnOffSwitchEnabled": true,
                "isPlayPauseSwitchEnabled": true,
                "commandSwitches": [
                    {
                        "name": "Up",
                        "commands": [
                            {
                                "key": "up",
                                "longPress": false
                            }
                        ]
                    },
                    {
                        "name": "Down",
                        "commands": [
                            {
                                "key": "down",
                                "longPress": false
                            }
                        ]
                    },
                    {
                        "name": "Left",
                        "commands": [
                            {
                                "key": "left",
                                "longPress": false
                            }
                        ]
                    },
                    {
                        "name": "Right",
                        "commands": [
                            {
                                "key": "right",
                                "longPress": false
                            }
                        ]
                    },
                    {
                        "name": "Select",
                        "commands": [
                            {
                                "key": "select",
                                "longPress": false
                            }
                        ]
                    }
                ]
            }
        ]
    }
]