I have a 3rd party device that provides an OS daemon to talk to it. It creates 3 named pipes, 2 are a command/response pair and the 3rd is read-only and reports async events.
I can handle reading and writing ASCII to/from the first two pipes via normal Indigo python scripts. No problem. Those script invocations run to completion and exit.
But I'm having trouble figuring out how to handle the async events. I need to open the event pipe and read from it in a long-lived loop (possibly parsing the events into setting a handful of Indigo variables). I can then automate things using triggers based on those variables changing state. The events could be several per second or one per week and I don't want to miss any.
My concern is the "long-lived loop" will be a problem. In my experience, Indigo doesn't like running scripts that don't terminate after a few seconds.
So how do I create a Python script with Indigo server access that runs indefinitely as a daemon?
Is this just a very simple Indigo plugin? I looked there but it seemed very focused on config and UI elements that don't apply to my case.
Thanks for any guidance!