Questions about using BAC0 #465
Replies: 7 comments 2 replies
-
Are you willing to test the new flavour of BAC0 now relying of bacpypes3 and asyncio ? This would be the best choice I think. No more threads and more stable. I can help you with the conversion if required |
Beta Was this translation helpful? Give feedback.
-
Dear Christian,
Thanks for your reply. I have updated to python3.12, bacpypes3 and BAC0.
Unfortunately, the main thread running the bacnet still gets stuck and
stops responding. Not sure if I need to do some conversions of the code as
mentioned in your previous email. Do you have any advice?
Thanks in advance.
Best regards,
Raymond
…On Thu, Aug 22, 2024 at 3:42 AM Christian Tremblay ***@***.***> wrote:
Are you willing to test the new flavour of BAC0 now relying of bacpypes3
and asyncio ? This would be the best choice I think. No more threads and
more stable.
I can help you with the conversion if required
—
Reply to this email directly, view it on GitHub
<#465 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOHA2MEEBFSCDGQZVTH7ADZSVF27AVCNFSM6AAAAABM3G5NGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBRGQZDONA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks and regards,
Raymond
|
Beta Was this translation helpful? Give feedback.
-
Are you willing to share your code ? |
Beta Was this translation helpful? Give feedback.
-
Dear Christian,
I will share the code with you soon.
Meanwhile, I found that I didn't run the async branch of BAC0 before and so
kept using bacpypes previously. After switching to the async branch of
BAC0, I encountered the following error.
[image: image.png]
Do you have any suggestions?
Thanks and regards,
Raymond
…On Sun, Aug 25, 2024 at 2:39 PM Christian Tremblay ***@***.***> wrote:
Are you willing to share your code ?
—
Reply to this email directly, view it on GitHub
<#465 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOHA2MEUXVWGEX7KQSTRCLZTHNBBAVCNFSM6AAAAABM3G5NGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBUGMYDCMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks and regards,
Raymond
|
Beta Was this translation helpful? Give feedback.
-
There is no image in the message.... but be sure to use
to start the REPL and start playing with it. This way, there will be an event loop active |
Beta Was this translation helpful? Give feedback.
-
Sorry that I am not aware the image hasn't been attached. Below is the
error message.
Traceback (most recent call last):
File "/root/bacnet/bacnet_main.py", line 19, in <module>
from EcoHVAC import EcoHVAC
File "/root/bacnet/EcoHVAC.py", line 4, in <module>
from BAC0.core.devices.local.models import (
File "/usr/local/lib/python3.12/site-packages/BAC0/__init__.py", line 27,
in <module>
from .core.devices.Device import DeviceLoad as load
File
"/usr/local/lib/python3.12/site-packages/BAC0/core/devices/Device.py", line
88, in <module>
class Device(SQLMixin):
File
"/usr/local/lib/python3.12/site-packages/BAC0/core/devices/Device.py", line
228, in Device
def df(self, list_of_points: List[str], force_read: bool = True) ->
pd.DataFrame:
^^
NameError: name 'pd' is not defined. Did you mean: 'id'?
Moreover, I can run "python -m asyncio" successfully.
***@***.***:~# python3 -m asyncio
asyncio REPL 3.12.5 (main, Aug 25 2024, 22:36:44) [GCC 10.2.1 20210110] on
linux
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>> import asyncio
>>
Could you please give me any clues?
Thanks and regards,
Raymond
…On Mon, Aug 26, 2024 at 1:21 AM Christian Tremblay ***@***.***> wrote:
There is no image in the message....
but be sure to use
python -m asyncio
to start the REPL and start playing with it. This way, there will be an
event loop active
—
Reply to this email directly, view it on GitHub
<#465 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOHA2O4VDX7VRLFRSST5DLZTJYJ5AVCNFSM6AAAAABM3G5NGKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBUGU3DMOA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Thanks and regards,
Raymond
|
Beta Was this translation helpful? Give feedback.
-
I try to run manual_test_create_device.py under the tests folder but it gives out errors in the log file. Do you have any advice? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I am testing the BAC0 and represent 20 devices as the virtual devices in the network in a Linux system running on NXP's iMX8MM. Below are the questions.
There are ~50 objects build in the devices. The time taken to build the point list for each device is ~10s, which is quite long. Since I am using the python version 3.10, is it beneficial to use python 3.12 or above, as they are asyncio based, to shorten this duration?
the thread of my software running the bacnet-related part will hang up after several hours, while other threads of the same software are normal. If only 3~4 devices in the network, it can run longer without any problem. If more than 10 devices in the network, the software may hang up after an hour. At that time, there is still sufficient RAM available. Does anyone experience the same problem?
I want to remove the corresponding virtual device from the bacnet network when the device is powered off. But I fail to do so with unregister_device(). Can anyone advise the correct procedure?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions