kazcangi / homebridge-pioneer-avr

Pioneer AVR TV plugin for Homebridge
MIT License
9 stars 14 forks source link

Service does not start after installing Pioneer-AVR Plugin #16

Open Kinzal16 opened 4 years ago

Kinzal16 commented 4 years ago

Config:


    "server": {
        "port": 80,
        "origin": "*",
        "autostart": 0,
        "home_setup_id": "X-HM://00xxxxxY9xxx",
        "polling_seconds": 5
    },
    "client": {
        "default_route": "status",
        "inactive_logoff": 30,
        "theme": "hoobs-dark",
        "locale": "de",
        "temp_units": "celsius",
        "country_code": "xx",
        "postal_code": "xxxxx"
    },
    "bridge": {
        "name": "HOOBS",
        "port": xxxxx,
        "pin": "xxx-xxx-xxx",
        "username": "XX:3A:XX:8B:3A:XX"
    },
    "description": "",
    "ports": {},
    "accessories": [
        {
            "accessory": "pioneerAvrAccessory",
            "model": "SC-2023",
            "name": "My Pioneer AVR",
            "description": "AV Receiver",
            "host": "192.168.191.15",
            "port": 23,
            "plugin_map": {
                "plugin_name": "homebridge-pioneer-avr",
                "index": 0
            }
        }
    ],
    "platforms": [
        {
            "platform": "HarmonyHubWebSocket",
            "plugin_map": {
                "plugin_name": "homebridge-harmony"
            },
            "name": "HubHarmony",
            "hubIP": "192.168.191.14",
            "hubName": "Hub Wohnzimmer",
            "cleanCache": false,
            "publishAllTVAsExternalAccessory": false,
            "TVAccessory": false,
            "configureAccesscontrol": false,
            "playPauseBehavior": false,
            "publishGeneralMuteSwitch": false,
            "publishGeneralVolumeSlider": false,
            "linkVolumeControlToTV": false,
            "switchAccessories": true,
            "addAllActivitiesToSkippedIfSameStateActivitiesList": true,
            "publishSwitchActivitiesAsIndividualAccessories": true,
            "publishDevicesAsIndividualAccessories": false,
            "publishSequencesAsIndividualAccessories": false,
            "publishHomeControlsAsIndividualAccessories": false,
            "showCommandsAtStartup": false
        }
    ]
}```

Here the LOG:
```7.7.2020, 18:50:15 (node:1388) UnhandledPromiseRejectionWarning: ReferenceError: data is not defined
7.7.2020, 18:50:15 at PioneerAvr.sendCommand (/home/hoobs/.hoobs/node_modules/homebridge-pioneer-avr/pioneer-avr.js:265:5)
7.7.2020, 18:50:15 at processTicksAndRejections (internal/process/task_queues.js:97:5)
7.7.2020, 18:50:15 at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:66:3)
7.7.2020, 18:50:15 at Function.module.exports.loopWhile (/home/hoobs/.hoobs/node_modules/deasync/index.js:70:11)
7.7.2020, 18:50:15 at Function.sleep (/home/hoobs/.hoobs/node_modules/deasync/index.js:41:18)
7.7.2020, 18:50:15 at Socket.<anonymous> (/home/hoobs/.hoobs/node_modules/homebridge-pioneer-avr/telnet-avr.js:34:25)
7.7.2020, 18:50:15 at Socket.emit (events.js:310:20)
7.7.2020, 18:50:15 at TCP.<anonymous> (net.js:672:12)
7.7.2020, 18:50:15 at Function.module.exports.loopWhile (/home/hoobs/.hoobs/node_modules/deasync/index.js:71:23)
7.7.2020, 18:50:15 at Function.sleep (/home/hoobs/.hoobs/node_modules/deasync/index.js:41:18)
7.7.2020, 18:50:15 at pioneerAvrAccessory.getServices (/home/hoobs/.hoobs/node_modules/homebridge-pioneer-avr/index.js:317:28)
7.7.2020, 18:50:15 at Server.createAccessory (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:375:44)
7.7.2020, 18:50:15 at Server.loadAccessories (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:266:40)
7.7.2020, 18:50:15 at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:90:18)
7.7.2020, 18:50:15 at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
7.7.2020, 18:50:15 at Object.<anonymous> (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
7.7.2020, 18:50:15 at Module._compile (internal/modules/cjs/loader.js:1133:30)
7.7.2020, 18:50:15 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
7.7.2020, 18:50:15 at Module.load (internal/modules/cjs/loader.js:977:32)
7.7.2020, 18:50:15 at Function.Module._load (internal/modules/cjs/loader.js:877:14)
7.7.2020, 18:50:15 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
7.7.2020, 18:50:15 at internal/main/run_main_module.js:18:47
7.7.2020, 18:50:15 (node:1388) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 34)
7.7.2020, 18:50:15 [My Pioneer AVR] Error: connect ECONNREFUSED 192.168.191.15:23
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
    at Function.module.exports.loopWhile (/home/hoobs/.hoobs/node_modules/deasync/index.js:71:23)
    at Function.sleep (/home/hoobs/.hoobs/node_modules/deasync/index.js:41:18)
    at pioneerAvrAccessory.getServices (/home/hoobs/.hoobs/node_modules/homebridge-pioneer-avr/index.js:317:28)
    at Server.createAccessory (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:375:44)
    at Server.loadAccessories (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:266:40)
    at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:90:18)
    at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47 {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '192.168.191.15',
  port: 23
}```
Kinzal16 commented 4 years ago

@kazcangi Can you say something about it?

THX!

kazcangi commented 4 years ago

Hi, First you have to enable Network Standby option in configuration menu of your AVR. If this option is enabled, try to power cycle your AVR. The telnet server included in AVR allow only one connection at a time. If a connection is not cleanly closed, power cycling solves the problem

Kinzal16 commented 4 years ago

Hey @kazcangi , Now it works, thank you very much.

Is it also possible to have the inputs displayed as individual devices? I would suggest as a switch.

Can you also implement the inputs for the sound options? Stereo, Ext-Stero, Auto-Surround, Dolby PLII Movie, Music, Game ... and so on that would be excellent.

kazcangi commented 4 years ago

From now you can select input with force touch the AVR icon in Home app. I really prefer this rather than having many switches. For sound option, it’s an interesting idea. I will look out this

Kinzal16 commented 4 years ago

Hey @kazcangi!

It's great that you're looking at the sound options, I'm happy.

I would also appreciate individual switches. You could optionally activate it in the Config. If you want it, activate it. If you don't want it, don't activate it.

THX!

Kinzal16 commented 4 years ago

Hey @kazcangi ! May I ask when you'll renew it? What have we discussed here?

kazcangi commented 4 years ago

Hey I work on it on free time. And I have not so much free time for the moment, sorry!