snowdd1 / homebridge-knx

KNX platform shim for homebridge
https://github.com/nfarina/homebridge
GNU General Public License v2.0
97 stars 56 forks source link

Services & characteristics in config: I dont get it. #119

Open tss68nl opened 6 years ago

tss68nl commented 6 years ago

Must be my limited brain, but beyond the services and characteristics I can find samples for, I cannot config anything in homebridge-knx. For example: The service LightBulb is easy. Mandatory chars are 'Name' and 'On' according to the docs. But the config needs 'ServiceName' and 'On'? Also, 'On' is followed by a 'Set' and 'Listen' on the same level, but they are not mentioned in the docs?! And don't belong these Set & Listen to the 'On' characteristic? Why are they on the same level just comma separated?

Anyway, as said I can see from the examples how a lightbulb should be configged, but you probably see why I cannot config anything that I cannot find an example of. In my case: a Valve.

It needs Name, Active, InUse and ValveType. I am guessing Name will be only the ServiceName again, Active and InUse can take a Set & Listen.....but the ValveType is mentioned both with and without a space....and trying to set it to 1 results in errors.

An example of my efforts. Homebridge starts with it, sees them...but nothing shows in homebridge. And yes, I've added an Outlet as the third item, and it actually shows after I wipe the cache each restart:

               {
                    "ServiceType": "Valve",
                    "ServiceName": "HegDrie",
                    "Characteristics": [
                        {
                            "Type": "Active",
                            "Set":"16/4/11",
                            "Listen":"16/4/111"
                        },
                        {
                            "Type": "ValveType",
                            "Set": 1
                        },
                        {
                            "Type": "InUse",
                            "Listen": "16/4/111"
                        }
                    ]
                },
                {
                    "ServiceType": "Valve",
                    "ServiceName": "HegTwee",
                    "Characteristics": [
                        {
                            "Type": "Active",
                            "Set": [
                                "16/4/11"
                            ],
                            "Listen": [
                                "16/4/111"
                            ],
                "Valve Type": 1
                        },
                       {
                            "Type": "InUse",
                            "Listen": [
                                "16/4/111"
                            ]
                        }
                    ]
                },

                {
                    "ServiceType": "Outlet",
                    "ServiceName": "Heg",
                    "Characteristics": [
                        {
                            "Type": "On",
                            "Set": [
                                "16/4/11"
                            ],
                            "Listen": [
                                "16/4/111"
                            ]
                        }
                    ]
                }

Can someone please explain how this works?

tss68nl commented 6 years ago

Please. can someone explain how to use the characteristics list to make the config?

snowdd1 commented 5 years ago

Hi @tss68nl, sorry for answering that late, was busy with my day job.
I frankly do not understand the issue you have.

Did you read https://github.com/snowdd1/homebridge-knx/blob/master/knx_config.json.md ?