Skip to content

Instantly share code, notes, and snippets.

@Bouni
Created May 8, 2019 19:27
Show Gist options
  • Save Bouni/b7a77c2d1f84e1f7c3442ab9a396319d to your computer and use it in GitHub Desktop.
Save Bouni/b7a77c2d1f84e1f7c3442ab9a396319d to your computer and use it in GitHub Desktop.
Export KNX Adresses from Loxone project
#!/usr/bin/env python
import sys
import re
if len(sys.argv) != 2:
print("please pass .loxone file as argument")
sys.exit(1)
with open(sys.argv[1]) as lox, open("export.txt","w") as ex:
data = lox.read()
res = re.findall(r"Title=\"([\w\s\d\.]+)\".*EibAddr=\"(\d+.\d+.\d+):?\d?\"", data)
for r in res:
ex.write(f"{r[0]:<50}{r[1]}\n")
@Bouni
Copy link
Author

Bouni commented May 8, 2019

Don't ask why but I needed to know all the KNX addresses used in my Loxone project :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment