Several xknx daemons
mralessio opened this issue · 4 comments
For my use case I need to monitor more than one KNX/IP connections (separate lines) and periodically send the telegrams.
Is it possible to establish several tunneling connections to different KNX/IP interfaces with deamon_mode=True
at the same time?
Thanks for help
Not sure if daemon_mode
works with multiple connections. Maybe in separate asyncio tasks. Just try it out.
Otherwise you can just call start()
and stop()
for every of your XKNX instance in a custom function where you wait for sigint.
Unfortunately, it doesn't. Next XKNX daemon will not start until the previous one has not finished.
Not sure that just start / stop would work for me in the full scope, as I need to monitor connections constantly.
Daemon mode doesn't do anything else than calling start() and waiting for sigint.
Line 148 in 58348de
Have you put your instances in Tasks? That should not block...
But it's probably a good idea to write a custom supervisor for your usecase. If Xknx would raise in daemon mode it would also return (quit) - this can eg. Happen on unsuccessful first Connection attempt.
Thank you for the giving the idea. I just have started using Python recently for knx purposes. I will try to implement.