grover / homebridge-dacp

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

Homebridge crashes when using alternate-input-controls with iTunes #68

Closed NextFire closed 2 years ago

NextFire commented 5 years ago

Hello, I couldn't find any workaround in previous issues so here's mine: when activating "alternate-input-controls": true, homebridge crashes on startup. I'm actually using the up-to-date Homebridge version and homebridge-dyson-link, homebridge-dacp plugins running on Ubuntu Ubuntu 16.04.6 LTS, node 12.9.1 and npm 6.10.2.

Here is my config.json:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "accessories": [],
    "platforms": [
        {
            "platform": "DysonPlatform",
            [...Dyson online credentials...]
        },
        {
            "platform": "DACP",
            "devices": [
                {
                    "name": "iTunes",
                    "pairing": "01D29A115F629288",
                    "serviceName": "37AE376B36A855CE",
                    "features": {
                        "alternate-playpause-switch": true,
                        "alternate-input-controls": true
                    }
                }
            ]
        }
    ]
}

And logs:

Aug 29 18:57:18 ubuntu-xenial-1 systemd[1]: Started Node.js HomeKit Server.
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Loaded config.json with 0 accessories and 2 platforms.
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] ---
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** Please fix your application to use the native API of Avahi!
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** Please fix your application to use the native API of Avahi!
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** Please fix your application to use the native API of Avahi!
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** Please fix your application to use the native API of Avahi!
Aug 29 18:57:19 ubuntu-xenial-1 node[5484]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Loaded plugin: homebridge-dacp
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Registering platform 'homebridge-dacp.DACP'
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] ---
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Loaded plugin: homebridge-dyson-link
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: homebridge API version: 2.4
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Registering platform 'homebridge-dyson-link.DysonPlatform'
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] ---
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Loading 2 platforms...
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] [DysonPlatform] Initializing DysonPlatform platform...
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] [DACP] Initializing DACP platform...
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] [DACP] DACP Platform Plugin Loaded - Version 0.9.2
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] [DACP] Found accessory in config: "iTunes"
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] [DACP] Initializing platform accessory 'iTunes'...
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] TypeError: Cannot read property 'toString' of undefined
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Accessory.addService (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:154:59)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at /usr/lib/node_modules/homebridge/lib/server.js:471:19
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Array.forEach (<anonymous>)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:451:14)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:413:32)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at DacpPlatform.accessories (/usr/lib/node_modules/homebridge-dacp/src/index.js:204:5)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Server._loadPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:403:20)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:341:16)
Aug 29 18:57:19 ubuntu-xenial-1 homebridge[5484]:     at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:90:36)
Aug 29 18:57:20 ubuntu-xenial-1 homebridge[5484]: [8/29/2019, 6:57:19 PM] Got SIGTERM, shutting down Homebridge...
Aug 29 18:57:25 ubuntu-xenial-1 systemd[1]: homebridge.service: Main process exited, code=exited, status=143/n/a
Aug 29 18:57:25 ubuntu-xenial-1 systemd[1]: homebridge.service: Unit entered failed state.
Aug 29 18:57:25 ubuntu-xenial-1 systemd[1]: homebridge.service: Failed with result 'exit-code'.
Aug 29 18:57:35 ubuntu-xenial-1 systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Aug 29 18:57:35 ubuntu-xenial-1 systemd[1]: Stopped Node.js HomeKit Server.

Thanks