Closed ND00 closed 7 years ago
Of course you can. Though I am not convinced you should. homebridge-knx
is meant as a front end support for HomeKit, not as a replacement for a homeserver (like GIRA's e.g., or of any other make).
However, if you want to continue anyhow:
You'll need to use a Switch
or Lightbulb
service, with an handler that uses the LocalConstants
section in the knx_config.json to store the addresses (and probably the values) of the group addresses to be changed upon. LocalConstants are used in the handler code by the function getLocalConstant(). As the contants are transportet as-is, you can put any content in it you can store in a JSON structure. The handler simply needs to de-compose it.
To react to a bus value change, you need to have an active characteristic, such as the On
characteristic of a switch, or -alternatively- an KNXObjects
entry; both must have a Listen
group group address assigned, so that they get bound to the bus events.
To write any value to the bus, you need to use the knxWrite()
function. The addresses, DPT, and values can either be stored in your handler's code, or can be taken from the knx_config.json using the above-mentioned LocalConstants.
I definitely recommend reading the documentation and understanding the Sample first!
Good luck!
Thanks
Hi,
I'm trying to do the following task and I was wondering if it is possible to do that using a homebridge-knx plugin
I'm trying to use the handles framework in order to program the behavior of physical switches. So they can be used to perform complex scenes.
If possible, could you please indicate what needs to be done (handler / config) to achieve this?
Thanks ND