NorthernMan54 / homebridge-alexa

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

Nuki Opener with Doorbell #443

Closed jannnfe closed 3 years ago

jannnfe commented 3 years ago

Hello,

im using the Plugin https://github.com/lukasroegner/homebridge-nuki#readme to get my Nuki Opener into HomeKit. The Opener also have a Doorbell function. Is it possible to add this opener and the doorbell to Alex with your plugin? At the moment no device is found by Alexa?

{
    "aid": 37,
    "services": [
        {
            "type": "3E",
            "iid": 1,
            "characteristics": [
                {
                    "type": "14",
                    "iid": 2,
                    "perms": [
                        "pw"
                    ],
                    "description": "Identify",
                    "format": "bool"
                },
                {
                    "type": "20",
                    "iid": 3,
                    "value": "Nuki",
                    "perms": [
                        "pr"
                    ],
                    "description": "Manufacturer",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "21",
                    "iid": 4,
                    "value": "Opener",
                    "perms": [
                        "pr"
                    ],
                    "description": "Model",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "23",
                    "iid": 5,
                    "value": "Haustür",
                    "perms": [
                        "pr"
                    ],
                    "description": "Name",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "30",
                    "iid": 6,
                    "value": "509555906",
                    "perms": [
                        "pr"
                    ],
                    "description": "Serial Number",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "52",
                    "iid": 7,
                    "value": "0.10.5",
                    "perms": [
                        "pr"
                    ],
                    "description": "Firmware Revision",
                    "format": "string"
                }
            ]
        },
        {
            "type": "45",
            "iid": 8,
            "characteristics": [
                {
                    "type": "1D",
                    "iid": 9,
                    "value": 1,
                    "perms": [
                        "ev",
                        "pr"
                    ],
                    "description": "Lock Current State",
                    "format": "uint8",
                    "minValue": 0,
                    "maxValue": 3,
                    "minStep": 1,
                    "valid-values": [
                        0,
                        1,
                        2,
                        3
                    ]
                },
                {
                    "type": "1E",
                    "iid": 10,
                    "value": 1,
                    "perms": [
                        "ev",
                        "pr",
                        "pw"
                    ],
                    "description": "Lock Target State",
                    "format": "uint8",
                    "minValue": 0,
                    "maxValue": 1,
                    "minStep": 1,
                    "valid-values": [
                        0,
                        1
                    ]
                },
                {
                    "type": "79",
                    "iid": 11,
                    "value": 0,
                    "perms": [
                        "ev",
                        "pr"
                    ],
                    "description": "Status Low Battery",
                    "format": "uint8",
                    "minValue": 0,
                    "maxValue": 1,
                    "minStep": 1,
                    "valid-values": [
                        0,
                        1
                    ]
                }
            ]
        },
        {
            "type": "121",
            "iid": 12,
            "characteristics": [
                {
                    "type": "73",
                    "iid": 13,
                    "value": null,
                    "perms": [
                        "ev",
                        "pr"
                    ],
                    "description": "Programmable Switch Event",
                    "format": "uint8",
                    "minValue": 0,
                    "maxValue": 2,
                    "minStep": 1,
                    "valid-values": [
                        0,
                        1,
                        2
                    ]
                }
            ]
        }
    ]
},
{
    "aid": 38,
    "services": [
        {
            "type": "3E",
            "iid": 1,
            "characteristics": [
                {
                    "type": "14",
                    "iid": 2,
                    "perms": [
                        "pw"
                    ],
                    "description": "Identify",
                    "format": "bool"
                },
                {
                    "type": "20",
                    "iid": 3,
                    "value": "Nuki",
                    "perms": [
                        "pr"
                    ],
                    "description": "Manufacturer",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "21",
                    "iid": 4,
                    "value": "Opener",
                    "perms": [
                        "pr"
                    ],
                    "description": "Model",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "23",
                    "iid": 5,
                    "value": "Haustür Settings",
                    "perms": [
                        "pr"
                    ],
                    "description": "Name",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "30",
                    "iid": 6,
                    "value": "509555906",
                    "perms": [
                        "pr"
                    ],
                    "description": "Serial Number",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "52",
                    "iid": 7,
                    "value": "0.10.5",
                    "perms": [
                        "pr"
                    ],
                    "description": "Firmware Revision",
                    "format": "string"
                }
            ]
        },
        {
            "type": "49",
            "iid": 8,
            "characteristics": [
                {
                    "type": "23",
                    "iid": 9,
                    "value": "Ring to Open",
                    "perms": [
                        "pr"
                    ],
                    "description": "Name",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "25",
                    "iid": 10,
                    "value": 0,
                    "perms": [
                        "ev",
                        "pr",
                        "pw"
                    ],
                    "description": "On",
                    "format": "bool"
                }
            ]
        },
        {
            "type": "49",
            "iid": 11,
            "characteristics": [
                {
                    "type": "23",
                    "iid": 12,
                    "value": "Continuous Mode",
                    "perms": [
                        "pr"
                    ],
                    "description": "Name",
                    "format": "string",
                    "maxLen": 64
                },
                {
                    "type": "25",
                    "iid": 13,
                    "value": 0,
                    "perms": [
                        "ev",
                        "pr",
                        "pw"
                    ],
                    "description": "On",
                    "format": "bool"
                }
            ]
        }
    ]
}
NorthernMan54 commented 3 years ago

The discovery fragment you shared is missing some information as the parser gives an error. Can you share the full accessory dump ? ( the parser is in the tools directory )

node newParseAccessories.js ~/Desktop/issue#443.json 
undefined:162
},
 ^

SyntaxError: Unexpected token , in JSON at position 4709
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (/Users/sgracey/Code/homebridge-alexa/tools/newParseAccessories.js:17:38)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
jannnfe commented 3 years ago

Hey, sorry for that i thought this section is enough for you. I attached the whole output. Thank you for looking into this! :) output

NorthernMan54 commented 3 years ago

Sorry for the delay in getting back to you

I loaded your accessory dump into my 'Test House' and everything came thru and this was visible to Alexa.

I would say that your Amazon region does not support doorbells yet, hence the issue. Have you checked this list

https://developer.amazon.com/en-US/docs/alexa/device-apis/list-of-interfaces.html

image

jannnfe commented 3 years ago

I just took a closer look at it. I have made a mistake. I did not enter the device name in the settings in the same way as in HomeKit. Therefore, the lock or the doorbell was not found by Alexa. Many thanks for your effort!

I have another question that has nothing to do with the lock but with the television. This should also be present in the dump. Is it possible to expand the television (Homebridge Samsung Tizen) with Netflix that you can say: Alexa start Netflix?

Thanks! :)

NorthernMan54 commented 3 years ago

Unfortunately not

Netflix is a reserved word inside Alexa and won’t work. I tried to get it working last year with my TV and I could get her to accept change channel commands but not Netflix. Things like change channel to CBC. For my local TV service.

With my TV / Apple TV I have it setup to pause and play, so you can say pause TV and she pauses Netflix or whatever is playing on the Apple TV

On May 3, 2021, at 4:10 PM, jannnfe @.***> wrote:

 I just took a closer look at it. I have made a mistake. I did not enter the device name in the settings in the same way as in HomeKit. Therefore, the lock or the doorbell was not found by Alexa. Many thanks for your effort!

I have another question that has nothing to do with the lock but with the television. This should also be present in the dump. Is it possible to expand the television (Homebridge Samsung Tizen) with Netflix that you can say: Alexa start Netflix?

Thanks! :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.