ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
899 stars 91 forks source link

communication error undefined #415

Closed Sturmhorst closed 5 years ago

Sturmhorst commented 5 years ago

Issue

After troubleshooting my MaranztAVR Plugin the Hue/Deconz Plugin which i never touched after successfully implementation its send this error message.

I use the Raspbee Stick and Deconz/Phoscon on the same Pie as Homebridge

Log Messages

Dec 25 04:14:45 phoscon homebridge[2063]: [12/25/2018, 4:14:45 AM] [Hue] 192...100:8080: bridge request 2: get /config Dec 25 04:14:45 phoscon homebridge[2063]: [12/25/2018, 4:14:45 AM] [Hue] 192...100:8080: bridge communication error undefined on 192...100

My Config: { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:35", "port": 51826, "pin": "031-45-135" }, "accessories": [

            {
                    "name": "AirRohr",
                    "accessory": "airrohr",
                    "json_data": "http://feinstaubsensor-8416868.local/data.json",
                    "public_temperature_json_data": "http://api.luftdaten.info/v1/sensor/4223/",
                    "public_airquality_json_data": "http://api.luftdaten.info/v1/sensor/2342/",
                    "sensor_id": "8416868",
                    "update_interval_seconds": 60,
                    "history": {"storage": "fs"}
            },
            {
             "name": "ATV WZ",
                    "ip": "192.168.1.95",
                    "defaultInput": "MPlAY",
                    "defaultVolume": 35,
                    "minVolume": 10,
                    "maxVolume": 75,
                    "doPolling": true,
                    "pollingInterval": 60
            },
            {
                    "accessory": "DenonMarantzAVR",
                    "name": "IRADIO WZ",
                    "ip": "192.168.1.95",
                    "defaultInput": "IRADIO",
                    "defaultVolume": 35,
                    "minVolume": 10,
                    "maxVolume": 75,
                    "doPolling": true,
                    "pollingInterval": 60
            },
            {
                    "accessory": "DenonMarantzAVR",
                    "name": "TV WZ",
                    "ip": "192.168.1.95",
                    "defaultInput": "TV",
                    "defaultVolume": 35,
                    "minVolume": 10,
                    "maxVolume": 75,
                    "doPolling": true,
                    "pollingInterval": 60
            },
            {
                    "accessory": "marantz-volume",
                    "name": "Julian AVR",
                    "host": "192.168.1.220:8080",
                    "maxVolume": 70,
                    "mapMaxVolumeTo100": true,
                    "controlPower": true
            },

{ "accessory": "SonoffTasmotaHTTP", "name": "Licht Aussen", "hostname": "192.168.1.216" }, { "accessory": "SonoffTasmotaHTTP", "name": "Steckerleiste", "hostname": "192.168.1.225" }

    ],

    "platforms": [{
                    "platform": "MaxCubePlatform",
                    "name": "MaxCube Platform",
                    "ip": "192.168.1.202",
                    "port": 62910,
                    "windowsensor": true,
                    "allow_wall_thermostat": true,
                    "only_wall_thermostat": true
            },
            {
                    "platform": "Hue",
                    "host": " 192.168.1.100:8080",
                    "users": {"00212EFFFF023B46": "C840FC10B1"},
                    "lights": true,
                    "sensors": true,
                    "excludeSensorTypes": ["Daylight", "CLIP", "Geofence"]
            }
            ]}
ebaauw commented 5 years ago

There seems to be an extra space in the host value.

Is the same error reported when you run homebridge with only homebridge-hue enabled? It wouldn’t be the first time that another illbehaving plugin breaks homebridge-hue.

Could you attach the debug log file and the debug dump file, see https://github.com/ebaauw/homebridge-hue#troubleshooting.

Sturmhorst commented 5 years ago

I’m a moron. The gap was the issue. Thank and merry merry Christmas. You made my day!

ebaauw commented 5 years ago

I would expect request to return an ENOTFOUND error for a non-existing hostname, but apparently it reacts in a funny way to the leading space, hence the undefined. Also, a trailing space results in a HTTP status 404 Not Found.

Note to self: Best do some more rigorous checking on config.json.

Sturmhorst commented 5 years ago

you helped me a lot.