grover / homebridge-dacp

Remotely control Apple TV and iTunes via HomeKit.
MIT License
151 stars 14 forks source link

Can't get macros to work #31

Open compupane opened 6 years ago

compupane commented 6 years ago

Here's my pertinent configuration information:

    {
        "platform": "DACP",
        "devices": [
            {
                "name": "AppleTV Remote from Homebridge",
                "pairing": "02210B1CFFAF4D98",
                "serviceName": "A8C95315B8AE7A3EE52167CAE8451B812F4204C4",

                "features": {
                    "no-volume-controls": true,
                    "alternate-playpause-switch": true,
                    "no-skip-controls": true
                }
            }
        ]
    }

When I change it to the following, Homebridge won't even start unless I remove the "pairing" & "serviceName" properties:

   {
        "platform": "DACP",
        "devices": [
            {
                "name": "AppleTV Remote from Homebridge",
                "pairing": "02210B1CFFAF4D98",
                "serviceName": "A8C95315B8AE7A3EE52167CAE8451B812F4204C4",
                "macros": {
                    "Test": [
                        "topmenu"
                    ]
                },
                "features": {
                    "no-volume-controls": true,
                    "alternate-playpause-switch": true,
                    "no-skip-controls": true
                }
            }
        ]
    }

Any ideas?

compupane commented 6 years ago

Here's what I get in my homebridge error log if it helps...I'd appreciate any help:

/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:150 if (service.subtype.toString() === existing.subtype.toString()) ^ TypeError: Cannot read property 'toString' of undefined at Accessory.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:150:59) at /usr/local/lib/node_modules/homebridge/lib/server.js:432:19 at Array.forEach () at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:412:14) at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:374:32) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19 at DacpPlatform.accessories (/usr/local/lib/node_modules/homebridge-dacp/src/index.js:195:5) at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:364:20) at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:308:16) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12)

grover commented 6 years ago

Is this still an issue for you? Could you please post the versions of node, npm, homebridge and homebridge-dacp you're using. Are there other plugins installed?

compupane commented 6 years ago

Seems to be working now. Maybe something changed in 0.9.2?

cades commented 6 years ago

I encounter exactly the same issue, but still the same after upgrading to 0.9.2

zabaya commented 5 years ago

I've figured out a work arround. I don't know why but somehow it can't work with one of the features. So i paired the appletv twice and gave one the macro's and the other the play-pause feature.