-
|
I need to daemonize a bacpypes application running on Linux. Before I start trying daemon methods on my application that is based on the mini_device.py from /samples, I thought I would ask for the best method from the author and/or people more familiar. I am running under Python 3.10. I have daemon experience in Linux C but not Python. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Well, I got something that worked for me. I used: Made an subclass of Daemon before main() in my mini_device.py, adding the bacpypes.core.run() in the run method of the subclass: Replaced where the run() method is called in mini_device.py with: Just wanted to let the next person in need know what I found and keep someone from doing an unnecessary write up trying to help me. Keep calm and carry on. |
Beta Was this translation helpful? Give feedback.
-
|
If you are new to bacpypes I would jump right into the bacpypes3 repository
which is the latest and greatest version.
In fact there is a mini device here as well :-)
https://github.com/JoelBender/BACpypes3/blob/main/samples/mini-device-revisited.py
Unless you are maintaining some old driver framework dependency on old
outdated python versions … jump to the new stuff.
…On Tue, Jun 3, 2025 at 4:00 PM cadam01 ***@***.***> wrote:
Well, I got something that worked for me. I used:
http://web.archive.org/web/20131017130434/http://www.jejik.com/files/examples/daemon3x.py
Made an subclass of Daemon before main() in my mini_device.py, adding the
bacpypes.core.run() in the run method of the subclass:
class TheDaemon(Daemon):
def run(self):
run()
Replaced where the run() method is called in mini_device.py with:
daemon = TheDaemon('/tmp/daemon-example.pid')
daemon.start()
Just wanted to let the next person in need know what I found and keep
someone from doing an unnecessary write up trying to help me.
Keep calm and carry on.
—
Reply to this email directly, view it on GitHub
<#547 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHC4BHMXOMB5USKTOHL2OST3BYEGRAVCNFSM6AAAAAB6GITNGGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMZWGA2DKNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Well, I got something that worked for me. I used:
http://web.archive.org/web/20131017130434/http://www.jejik.com/files/examples/daemon3x.py
Made an subclass of Daemon before main() in my mini_device.py, adding the bacpypes.core.run() in the run method of the subclass:
class TheDaemon(Daemon):
def run(self):
run()
Replaced where the run() method is called in mini_device.py with:
daemon = TheDaemon('/tmp/daemon-example.pid')
daemon.start()
Just wanted to let the next person in need know what I found and keep someone from doing an unnecessary write up trying to help me.
Keep calm and carry on.