timschuerewegen / homebridge-nikobus

Nikobus platform plugin for Homebridge (https://github.com/nfarina/homebridge)
5 stars 6 forks source link

Clarification needed for pushbutton #5

Open pagaille opened 1 year ago

pagaille commented 1 year ago

Hi,

I'd like to be able to monitor my nikobus pushbuttons (model 05-064) in nodered using the node-red-contrib-homebridge-automation plugin. I added the following lines in the configuration file :

"modules": [
                {
                    "type": "pushbutton",
                    "name": "SAM1",
                    "address": "133AC4",
                    "model": "05-064",
                    "buttons": [
                        {
                            "number": "A",
                            "name": "SAM1_A",
                            "service": "switch"
                        },
                        {
                            "number": "B",
                            "name": "SAM1_B",
                            "service": "switch"
                        },
                        {
                            "number": "C",
                            "name": "SAM1_C",
                            "service": "switch"
                        },
                        {
                            "number": "D",
                            "name": "SAM1_D",
                            "service": "switch"
                        }
                    ]
                },

The 4 buttons appears as expected in homebridge's user interface and nodered, but no event is fired when I push on them. Looking at the log, one can see messages on the serial line but there seems to be no particular code to handle them :

[1/22/2023, 11:00:50 AM] [Nikobus] serial rx [#NC8D732] (cr)
[1/22/2023, 11:00:50 AM] [Nikobus] received command: #NC8D732
[1/22/2023, 11:00:53 AM] [Nikobus] serial rx [#N48D732] (cr)
[1/22/2023, 11:00:53 AM] [Nikobus] received command: #N48D732
[1/22/2023, 11:00:53 AM] [Nikobus] serial rx [#N48D732] (cr)
[1/22/2023, 11:00:53 AM] [Nikobus] received command: #N48D732
[1/22/2023, 11:00:54 AM] [Nikobus] serial rx [#N08D732] (cr)
[1/22/2023, 11:00:54 AM] [Nikobus] received command: #N08D732
[1/22/2023, 11:00:54 AM] [Nikobus] serial rx [#N08D732] (cr)
[1/22/2023, 11:00:54 AM] [Nikobus] received command: #N08D732`

What could be wrong ?

Txs

timschuerewegen commented 1 year ago

Correct. It only logs the received command and does nothing else. What do you expect it to do? I might be able to implement the "missing" functionality.

Some background: I made this homebridge plugin for someone else who wanted to control this nikobus switching module via homekit. I actually don't have/use nikobus myself.

pagaille commented 1 year ago

Thanks !

Actually the events are generated but only when a command is issued from Apple's HomeKit. I'd love to be able to monitor the switches without polling them.

Not sure homebridge is really meant for that however. Unfortunately you're the only one who developed a modern way to interface to a nikobus installation 😊

If you really have some time to loose you could develop a nodered module ;) I'm ready to help but I'm afraid that I'm not very fluent in java...