You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am new to this; I am dealing with an issue where I would want to connect to a JCI controller via BACNET using PyCharm. I am using a USB to ethernet dongle to connected to the controller, it is giving me an error message or saying that there is no discovered devices. Here is the code:
import BAC0
import asyncio
async def start_bacnet_server():
# Initialize a BAC0 BAC.lite server
print("Starting BACnet server...")
bacnet = BAC0.lite(ip= "192.168.10.7/0") #
#dev = BAC0.connect(ip= "192.168.10.12/0")
bacnet.discover()
print("discovered devices:", bacnet.discoveredDevices)
# Keep the server running
try:
while True:
await asyncio.sleep(1)
except asyncio.CancelledError:
print("Shutting down BACnet server...")
#bacnet.stop()
async def main():
# Start the BACnet server in an asyncio task
task = asyncio.create_task(start_bacnet_server())
try:
await asyncio.sleep(1)
except KeyboardInterrupt:
task.cancel()
await task
if name == "main":
asyncio.run(main())
I know there is a difference between BACnet IP and being able to connect to the controller through ethernet to program it. Is there something that I missing relating to connecting the controller or should I also invest in a BACnet IP router?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I am new to this; I am dealing with an issue where I would want to connect to a JCI controller via BACNET using PyCharm. I am using a USB to ethernet dongle to connected to the controller, it is giving me an error message or saying that there is no discovered devices. Here is the code:
import BAC0
import asyncio
async def start_bacnet_server():
# Initialize a BAC0 BAC.lite server
print("Starting BACnet server...")
bacnet = BAC0.lite(ip= "192.168.10.7/0") #
async def main():
# Start the BACnet server in an asyncio task
task = asyncio.create_task(start_bacnet_server())
try:
await asyncio.sleep(1)
except KeyboardInterrupt:
task.cancel()
await task
if name == "main":
asyncio.run(main())
I know there is a difference between BACnet IP and being able to connect to the controller through ethernet to program it. Is there something that I missing relating to connecting the controller or should I also invest in a BACnet IP router?
Thanks!
The text was updated successfully, but these errors were encountered: