homebridge-knx
homebridge-knx copied to clipboard
Import GA data from ETS
Might be possible with .knxproj file: See link (German)
https://knx-user-forum.de/forum/öffentlicher-bereich/knx-eib-forum/15914-ets4-export#post15914
Back-ref to ratzi82's post:
https://knx-user-forum.de/forum/öffentlicher-bereich/knx-eib-forum/36352-apple-homekit-schnittstelle-zur-heimautomation?p=921624#post921624
A friend of mine wrote a node script to do this...
Works like a charm. I have used it to generate a file for my home with 50 accessories in HomeKit.
Will ask if he wants to upload.
tss68nl tested this also on his home. Script might neede some generilisation but it does the job.
"A Friend" here ... I'm more than happy to share the script, if you tell me where I can commit it ...
The script does make a number of assumptions, of which maybe a couple can be generalized or configurable:
- .esf export file needed of ETS config
- it ignores group-addresses which lie beyond x/y/200. Because that's where we program group functions.
- the structure of group addresses (x/y/z) needs to be as follows (the names can be made configurable)
- x = "lights", "sockets", "screens and drapes", "values"
- y = depending on the type of X: "on/off", "on/off feedback", "dimming absolute", "dimming feedback", "open/close absolute", "open/close feedback", "direction feedback"
- z = name of controlled item. (f.e. "Living room")
You'll have multiple group addresses for a single dimmable light f.e.:
- 1/1/1: on/off
- 1/2/1: on/off feedback
- 1/3/1: relative dimming (not used for homekit, and thus not by the script)
- 1/4/1: absolute dimming
- 1/5/1: dimming feedback
The script will map all these together as long as the same name in the z part of the group address is used.
Everything has been tested, except for the "screens and drapes"
nothing keeps you from being a little creative with find and replace in MS Excel or Notepad++ ofcourse ;)
Saves you some time even if the script is not generalized...
Hi @hyperbart I played with that some time ago. My conclusion was:
- if you import all the GA's from ETS, you need some kind of fancy user interface to allocate the addresses to the objects
- if you do not have such an interface, you need to prepare the descriptions/names of the GAs to match a pattern for automatic allocation.
Tried both. First died of too little spare time, second is exactly as much work as doing it by hand in a config file. Which can be done in Excel as well.
Of course you are welcome to help with either alternative anyway. Currently I am trying to get more flexibility into the configuration, and allow users to write little service add-ins.
@snowdd1 completely correct.
Your overpriced competition at Thinka ;) has solved this by putting a web-GUI in front of it which allows you to map GA's to a function and I guess they generate a config file afterwards.
It's a complex matter nevertheless, you're right :) . I thought maybe it would be possible to "deduct" something out of the KNXPROJ file to get this to work but since I am a little bit more up to speed I do see the issues that might arise :) .
I lately found out about the improved GA export of ETS5 (compared to ETS4) which now spits out a properly formatted utf-8 encoded XML file, which can be parsed very nicely. Thinking about going the web UI way again.
This idea sounds great! Should be possible to derive the function of the GA from the name it has in the ETS Project. The web-GUI could propose the functions and the user just needs to check and adapt if any information has been interpreted wrong. User could then choose, which devices to add to the final config file for Homebridge.