Replies: 3 comments 3 replies
-
sorry that the code indenting got lost. This is python 3.12.3 on ubuntu 24..04. |
Beta Was this translation helpful? Give feedback.
0 replies
-
First thing I would try is getting rid of the time.sleep. It's a synchronous call and stop everything, Use asyncio.sleep instead import asyncio
import BAC0
import logging
import pandas as pd
import time
async def main():
BAC0.log_level(stdout=logging.DEBUG)
bacnet = BAC0.start(ip='172.18.1.29/24')
await bacnet.who_is()
await asyncio.sleep(2)
await bacnet.devices
print(bacnet.discoveredDevices)
if __name__ == '__main__':
asyncio.run(main()) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Sometimes I read too fast... you look into bacnet.discoveredDevices... but never call bacnet.discover (which is a different thing than whois) import asyncio
import BAC0
import logging
import pandas as pd
import time
async def main():
BAC0.log_level(stdout=logging.DEBUG)
async with BAC0.start() as bacnet:
await bacnet._discover()
await bacnet.devices
while True:
await asyncio.sleep(2)
print(bacnet.discoveredDevices)
if __name__ == '__main__':
asyncio.run(main()) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am new to BAC0 and am trying to get it to work for a simple case first. I have two bacnet/IP thermostats running. When I run bacpypes3, the whois works fine.
When I try the same in BAC0, wireshark shows the who-is go out and the 2 i-ams come back 20ms later, but BAC0 does not seem to recognize them. Any thoughts what is going on?
thanks,
jerry
code:
output debugging
Beta Was this translation helpful? Give feedback.
All reactions