senorshaun / homebridge-radiora2

Lutron RadioRA2 plugin for homebridge
MIT License
10 stars 5 forks source link

Can't Load Keypads #6

Closed ryseweryn closed 3 years ago

ryseweryn commented 3 years ago

Hello, not sure if I am doing this correctly, but here is my code. Just to start, I am trying to get one button on my keypad to show up on homekit, but it fails to do so.

    {
        "platform": "RadioRA2",
        "name": "Keypad",
        "repeater": "hiddenforprivacy",
        "username": "hiddenforprivacy",
        "password": "hiddenforprivacy",
        "keypads": [
            {
                "name": "Kitchen Keypad",
                "id": 23,
                "buttons": [
                    {
                        "name": "Goodbye",
                        "id": 6,
                        "led": 86
                    }
                ]
            }
        ]
    },

It looks like it successfully connects to the main repeater, but it fails to load up the keypad. What am I doing wrong? This is the warning I get.

[15/07/2021, 01:17:23] [Keypad] Connected to Lutron! [15/07/2021, 01:17:23] [Keypad] Loaded 0 fan(s) [15/07/2021, 01:17:23] [Keypad] Loaded 0 light(s) [15/07/2021, 01:17:23] [Keypad] Loaded 0 occupancy sensor(s) (node:30831) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at RadioRA2Platform.addKeypadButtonAccessory (/usr/local/lib/node_modules/homebridge-radiora2/index.js:134:81) at RadioRA2Platform. (/usr/local/lib/node_modules/homebridge-radiora2/index.js:281:34) at Array.forEach () at RadioRA2Platform. (/usr/local/lib/node_modules/homebridge-radiora2/index.js:272:26) at RadioRa2.emit (events.js:315:20) at incomingData (/usr/local/lib/node_modules/homebridge-radiora2/lib/radiora2.js:97:20) at Socket. (/usr/local/lib/node_modules/homebridge-radiora2/lib/radiora2.js:27:60) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) (Use node --trace-warnings ... to show where the warning was created) (node:30831) 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: 1) (node:30831) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

senorshaun commented 3 years ago

I see the issue, I'm not handling a missing serial number correctly. on your keypad accessory, add a line for "serial": "XXXXXXX",

ryseweryn commented 3 years ago

Thank you for the quick reply! It didn't work with just the serial number, I also had to add the model number and then it worked.

However, I have a Goodbye scene to turn off all the lights. When I ask Siri to activate it performs the scene by turning off all the lights. I see all the lights turn off in homekit, and I see the Goodbye scene icon turn on in homekit, but Siri tells me it is not responding. Siri tells me there is no response, and then the switch toggles. I know it is a minor detail, but it is kind of a big deal with voice since you would always have to double check to see if it happened.

The scene is not a toggle, it is a single room scene. Is that an issue?

senorshaun commented 3 years ago

Ok I’ll get both serial and model fixed.

That is a polling issue. I can’t get it to answer back fast enough on status for keypad presses

On Jul 15, 2021, at 10:51 AM, ryseweryn @.***> wrote:

 Thank you for the quick reply! It didn't work with just the serial number, I also had to add the model number and then it worked.

However, I have a Goodbye scene to turn off all the lights. When I ask Siri to activate it performs the scene by turning off all the lights. I see all the lights turn off in homekit, and I see the Goodbye scene icon turn on in homekit, but Siri tells me it is not responding. Siri tells me there is no response, and then the switch toggles. I know it is a minor detail, but it is kind of a big deal with voice since you would always have to double check to see if it happened.

The scene is not a toggle, it is a single room scene. Is that an issue?

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

ryseweryn commented 3 years ago

Absolutely nothing that can be done?

GitHubRR1867 commented 3 years ago

Hi there- I’m having the exact same issue. @ryseweryn could you elaborate on what you specifically added to your config code to get the keypads working? Thanks so much.

senorshaun commented 3 years ago

just pushed a bug fix for that issue