NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
446 stars 77 forks source link

How can I get rid of warnings? #452

Closed skatehouse closed 2 years ago

skatehouse commented 3 years ago

Hi! Installed a new clean homebridge with only 2 instances that are working. How can I get rid of other devices who want to connect? Deleting folders persist and accessories did not work -.-

2021-06-30T22:47:26.226Z hapNodeJSClient HAP Discover failed T8010 -> http://192.168.178.77:47766 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:47:41.084Z hapNodeJSClient Starting Homebridge instance discovery
2021-06-30T22:47:41.085Z hapNodeJSClient Ready
2021-06-30T22:47:41.085Z alexaActions alexaDiscovery
[2021-7-1 0:47:41] [Alexa] ERROR: HAP Discovery failed, please review config
2021-06-30T22:47:46.085Z hapNodeJSClient Ready
2021-06-30T22:47:46.085Z alexaActions alexaDiscovery
[2021-7-1 0:47:46] [Alexa] ERROR: HAP Discovery failed, please review config
2021-06-30T22:47:56.085Z hapNodeJSClient Starting Homebridge instance discovery
2021-06-30T22:47:56.089Z hapNodeJSClient HAP Device discovered homebridge D1BB
2021-06-30T22:47:56.136Z hapNodeJSClient HAP Device discovered Bridge Schalter 39B8
2021-06-30T22:47:56.145Z hapNodeJSClient Homebridge instance discovered homebridge with 14 accessories
2021-06-30T22:47:56.153Z hapNodeJSClient HAP Discover failed not configured -> http://192.168.178.72:45303 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:47:56.178Z hapNodeJSClient HAP Device discovered Sensoren Bridge B819
2021-06-30T22:47:56.180Z hapNodeJSClient HAP Device discovered iobroker 3A97
2021-06-30T22:47:56.196Z hapNodeJSClient HAP Discover failed not configured -> http://192.168.178.72:43267 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:47:56.218Z hapNodeJSClient HAP Discover failed not configured -> http://192.168.178.72:36289 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:47:56.220Z hapNodeJSClient HAP Device discovered Philips hue - 23B47E
2021-06-30T22:47:56.239Z hapNodeJSClient HAP Device discovered eufy HomeBase2-026C
2021-06-30T22:47:56.244Z hapNodeJSClient HAP Discover failed BSB002 -> http://192.168.178.34:8080 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:47:56.267Z hapNodeJSClient HAP Discover failed T8010 -> http://192.168.178.77:47766 invalid PIN or homebridge is not running in insecure mode with -I
2021-06-30T22:48:11.086Z hapNodeJSClient Starting Homebridge instance discovery
2021-06-30T22:48:11.086Z hapNodeJSClient Ready
2021-06-30T22:48:11.086Z alexaActions alexaDiscovery
[2021-7-1 0:48:11] [Alexa] ERROR: HAP Discovery failed, please review config
NorthernMan54 commented 3 years ago

Which devices are you referring too ? If you turn off debug level logging it will log less.

skatehouse commented 3 years ago

But Hap Discovery failed stays

[2021-7-5 21:35:03] Homebridge v1.3.4 (homebridge) is running on port 51832.
[2021-7-5 21:35:04] [MaxCube Platform] Connected to Max! Cube.
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Wohnzimmer (Wohnzimmer) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Flur (Flur) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Flur (Flur) - received new temperature 24.1
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Badezimmer (Badezimmer) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Küche (Küche) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Kinderzimmer (Kinderzimmer) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Kinderzimmer (Kinderzimmer) - received new temperature 24
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Schlafzimmer (Schlafzimmer) - computed new target mode 0
[2021-7-5 21:35:04] [MaxCube Platform] Heizung Schlafzimmer (Schlafzimmer) - received new temperature 22.3
[2021-7-5 21:35:14] [Homebridge UI] Homebridge Config UI X v4.41.1 is listening on :: port 8082
[2021-7-5 21:35:18] [Alexa] ERROR: HAP Discovery failed, please review config
[2021-7-5 21:35:23] [Alexa] ERROR: HAP Discovery failed, please review config
NorthernMan54 commented 3 years ago

That message is triggered when no home bridge devices are discovered. You do have plugins and accessories configured in Homebridge ?

https://github.com/NorthernMan54/homebridge-alexa/blob/142dfbac4d7ba2da39b2aeca4ebcc8e7ba8b32a0/lib/alexaActions.js#L121

skatehouse commented 3 years ago

you mean in config.json?

yes sure! maxcube, alexa and a dummy switch.....but not more. I also don´t want more, because these are working in iobroker.

{
    "bridge": {
        "name": "homebridge",
        "username": "xx:xx:7A:77:xx:09",
        "port": xxxx2,
        "pin": "xxx-39-944"
    },
    "description": "homebridge",
    "platforms": [
        {
            "name": "Alexa",
            "username": "xxxxx",
            "password": "xxxxxx",
            "pin": "xxxxx",
            "routines": false,
            "blind": false,
            "door": false,
            "debug": false,
            "refresh": 15,
            "filter": "192.168.178.34:8080",
            "deviceListHandling": "allow",
            "platform": "Alexa"
        },
        {
            "name": "Config",
            "port": 8082,
            "auth": "none",
            "theme": "red",
            "restart": "sudo -n systemctl restart homebridge",
            "temp": "/sys/class/thermal/thermal_zone0/temp",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": true,
            "log": {
                "method": "custom",
                "command": "journalctl -o cat -n 500 -f -u homebridge"
            },
            "platform": "config"
        },
        {
            "name": "MaxCube Platform",
            "ip": "192.168.178.30",
            "port": 62910,
            "windowsensor": true,
            "allow_wall_thermostat": false,
            "only_wall_thermostat": false,
            "platform": "MaxCubePlatform"
        }
    ],
    "accessories": [
        {
            "name": "Bewässerung dummy",
            "time": 1200000,
            "accessory": "DummySwitch"
        }
    ],
    "disabledPlugins": []
}
NorthernMan54 commented 3 years ago

This setting means that only devices found here are passed to Alexa

        "filter": "192.168.178.34:8080",

It should be the address and port of your homebridge instance

skatehouse commented 3 years ago

That was only a try to get rid of the annoying HAP discovery failed. If I delete it, it´s the same.

NorthernMan54 commented 3 years ago

This is enabling the device list name filter but you haven't specified a deviceList

        "deviceListHandling": "allow",

https://github.com/NorthernMan54/homebridge-alexa#devicelist--devicelisthandling

skatehouse commented 3 years ago

Starting to advertise 'homebridge D1BB' using bonjour-hap backend! [2021-7-5 23:35:47] Homebridge v1.3.4 (homebridge) is running on port 51832. [2021-7-5 23:35:47] [MaxCube Platform] Connected to Max! Cube. [2021-7-5 23:35:47] [MaxCube Platform] Heizung Wohnzimmer (Wohnzimmer) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Flur (Flur) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Flur (Flur) - received new temperature 24.1 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Badezimmer (Badezimmer) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Küche (Küche) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Kinderzimmer (Kinderzimmer) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Kinderzimmer (Kinderzimmer) - received new temperature 24 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Schlafzimmer (Schlafzimmer) - computed new target mode 0 [2021-7-5 23:35:47] [MaxCube Platform] Heizung Schlafzimmer (Schlafzimmer) - received new temperature 22.3 [2021-7-5 23:35:57] [Homebridge UI] Homebridge Config UI X v4.41.1 is listening on :: port 8082 [2021-7-5 23:36:01] [Alexa] ERROR: HAP Discovery failed, please review config [2021-7-5 23:36:06] [Alexa] ERROR: HAP Discovery failed, please review config

{
    "bridge": {
        "name": "homebridge",
        "username": "xxxx",
        "port": xxxx,
        "pin": "xxx-39-944"
    },
    "description": "homebridge",
    "platforms": [
        {
            "name": "Alexa",
            "username": "xxxx",
            "password": "xxxxx",
            "pin": "031-45-154",
            "routines": false,
            "blind": false,
            "door": false,
            "debug": false,
            "refresh": 15,
            "deviceListHandling": "allow",
            "platform": "Alexa"
        },
        {
            "name": "Config",
            "port": 8082,
            "auth": "none",
            "theme": "red",
            "restart": "sudo -n systemctl restart homebridge",
            "temp": "/sys/class/thermal/thermal_zone0/temp",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": true,
            "log": {
                "method": "custom",
                "command": "journalctl -o cat -n 500 -f -u homebridge"
            },
            "platform": "config"
        },
        {
            "name": "MaxCube Platform",
            "ip": "192.168.178.30",
            "port": 62910,
            "windowsensor": true,
            "allow_wall_thermostat": false,
            "only_wall_thermostat": false,
            "platform": "MaxCubePlatform"
        }
    ],
    "accessories": [
        {
            "name": "Bewässerung dummy",
            "time": 1200000,
            "accessory": "DummySwitch"
        }
    ],
    "disabledPlugins": []
}

I only like to get rid of "HAP Discovery failed...." I always have the feeling sth. goes wrong. Deleted the devices linst handling also in config.json

NorthernMan54 commented 3 years ago

Maybe we need to start again

HAP Discovery failed....

Is the plugin saying it can't find any devices from homebridge to pass to Alexa......aka its not going to work

Based on your last shared config, remove this

        "deviceListHandling": "allow",
skatehouse commented 3 years ago

I have removed the device list handling. Coming back to HAP Discovery failed: 3 plugins are installed and all of them expose to alexa. With other words: I can switch them on and off. Therefore there are devices that are handed over to alexa. Why the warning? Do I have to add them all to the config?

NorthernMan54 commented 3 years ago

When the system logs 'HAP Discovery failed:' it is not passing any devices to the Alexa backend, hence my comment on it not working.

But complicating the discussion is the Alexa backend, which caches the responses and will over write identical information, but it doesn't remove missing information. So at some point in time a number of devices were passed the Alexa backend and those you are seeing that they are working. If you look in the Alexa app you should see these.