ChristianTremblay / BAC0

BAC0 - Library depending on BACpypes3 (Python 3) to build automation script for BACnet applications
GNU Lesser General Public License v3.0
174 stars 99 forks source link

Say device is disconnect and can not find any point #228

Closed Alive2212 closed 3 years ago

Alive2212 commented 3 years ago

Hi Christian I connected to my network (with 192.168.1.x IP) and looking for devices as following:

        self.bacnet = BAC0.connect(ip=192.168.1.x/24)
        self.bacnet.discover(limits=(0, 4194303))
        self.bacnet.whois()
        bacnet = self.bacnet
        discovered_device = self.bacnet.discoveredDevices

And in discovered_device value (in python debug mode) has something like following:

defaultdict(<class 'int'>, {..., ('11:2', 1002): 1, ..., ('192.168.1.40', 1001): 3, ...})

when I discover points with following command every thing is Ok:

            controller = BAC0.device(address="11:2",
                                     device_id=1002,
                                     network=self.bacnet,
                                     segmentation_supported=False,
                                     poll=900,
                                     )

And I can get point of this device, but when I try to get another device (with IP), say device is Disconnect and can not find any point into it:

            controller = BAC0.device(address="192.168.1.40",
                                     device_id=1001,
                                     network=self.bacnet,
                                     segmentation_supported=False,
                                     poll=900,
                                     )

Thanks.

ChristianTremblay commented 3 years ago

I strongly suggest you work in the REPL to troubleshoot... then build your class. Also, open wireshark (filter on port 47808) and see what's happening.

When devices are not seen, it's almost always a network issue

github-actions[bot] commented 3 years ago

Stale issue message