Error reading point values from bacnet device





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















import BAC0

bacnet = BAC0.connect()

my_obj_list = [('file', 1),
('analogInput', 1002),
('analogInput', 1),
('analogInput', 1006),
('analogInput', 1011),
('analogInput', 1010),
('analogInput', 1001)]


# # Provide it as an argument
fx = BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)
p=fx.points
for point in p:
print(point)


The code is returning the point values as expected, but throwing an exception. Can not figure out what I'm doing wrong.



error




2018-11-26 17:45:51,864 - INFO | Starting BAC0 version 0.99.944 (Lite)
2018-11-26 17:45:51,908 - INFO | Using ip : 192.168.0.16
2018-11-26 17:45:51,909 - INFO | Starting app...
2018-11-26 17:45:51,910 - INFO | BAC0 started
2018-11-26 17:45:51,910 - INFO | Registered as Simple BACnet/IP App
2018-11-26 17:45:54,529 - INFO | Changing device state to DeviceDisconnected'>
2018-11-26 17:45:54,726 - INFO | Changing device state to RPDeviceConnected'>
2018-11-26 17:45:54,928 - INFO | Device 1610219:[device1610219] found... building points list
2018-11-26 17:45:57,674 - INFO | Ready!
2018-11-26 17:45:57,676 - INFO | Polling started, values read every 10 seconds
Exception in thread rpm_poll:
Traceback (most recent call last):
File "C:Program Files (x86)Microsoft Visual StudioSharedAnaconda3_64libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 45, in run
self.process()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 52, in process
self.task()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksPoll.py", line 77, in task
self.device.read_multiple(list(self.device.points_name), points_per_request=25)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 452, in read_multiple
self.read_single(each,points_per_request=1, discover_request=discover_request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 459, in read_single
return self.properties.network.read(request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 87, in read
args_split, arr_index=arr_index, vendor_id=vendor_id, bacoid=bacoid))
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 310, in build_rp_request
addr, obj_type, obj_inst, prop_id = args[:4]
ValueError: not enough values to unpack (expected 4, got 2)




device1610219/ai_2 : 2.30 noUnits
device1610219/zone_temp : 45.00 degreesFahrenheit
device1610219/ai_6 : 75.00 degreesFahrenheit
device1610219/ai_11 : 1.00 65535
device1610219/ai_10 : -53.30 degreesFahrenheit
device1610219/ai_1 : 0.00 noUnits



Process finished with exit code 0










share|improve this question























  • The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

    – bunbun
    Nov 27 '18 at 1:30











  • I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

    – PyWoo
    Nov 27 '18 at 1:36













  • bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

    – PyWoo
    Nov 27 '18 at 1:43













  • You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

    – Christian Tremblay
    Dec 6 '18 at 0:16


















0















import BAC0

bacnet = BAC0.connect()

my_obj_list = [('file', 1),
('analogInput', 1002),
('analogInput', 1),
('analogInput', 1006),
('analogInput', 1011),
('analogInput', 1010),
('analogInput', 1001)]


# # Provide it as an argument
fx = BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)
p=fx.points
for point in p:
print(point)


The code is returning the point values as expected, but throwing an exception. Can not figure out what I'm doing wrong.



error




2018-11-26 17:45:51,864 - INFO | Starting BAC0 version 0.99.944 (Lite)
2018-11-26 17:45:51,908 - INFO | Using ip : 192.168.0.16
2018-11-26 17:45:51,909 - INFO | Starting app...
2018-11-26 17:45:51,910 - INFO | BAC0 started
2018-11-26 17:45:51,910 - INFO | Registered as Simple BACnet/IP App
2018-11-26 17:45:54,529 - INFO | Changing device state to DeviceDisconnected'>
2018-11-26 17:45:54,726 - INFO | Changing device state to RPDeviceConnected'>
2018-11-26 17:45:54,928 - INFO | Device 1610219:[device1610219] found... building points list
2018-11-26 17:45:57,674 - INFO | Ready!
2018-11-26 17:45:57,676 - INFO | Polling started, values read every 10 seconds
Exception in thread rpm_poll:
Traceback (most recent call last):
File "C:Program Files (x86)Microsoft Visual StudioSharedAnaconda3_64libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 45, in run
self.process()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 52, in process
self.task()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksPoll.py", line 77, in task
self.device.read_multiple(list(self.device.points_name), points_per_request=25)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 452, in read_multiple
self.read_single(each,points_per_request=1, discover_request=discover_request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 459, in read_single
return self.properties.network.read(request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 87, in read
args_split, arr_index=arr_index, vendor_id=vendor_id, bacoid=bacoid))
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 310, in build_rp_request
addr, obj_type, obj_inst, prop_id = args[:4]
ValueError: not enough values to unpack (expected 4, got 2)




device1610219/ai_2 : 2.30 noUnits
device1610219/zone_temp : 45.00 degreesFahrenheit
device1610219/ai_6 : 75.00 degreesFahrenheit
device1610219/ai_11 : 1.00 65535
device1610219/ai_10 : -53.30 degreesFahrenheit
device1610219/ai_1 : 0.00 noUnits



Process finished with exit code 0










share|improve this question























  • The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

    – bunbun
    Nov 27 '18 at 1:30











  • I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

    – PyWoo
    Nov 27 '18 at 1:36













  • bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

    – PyWoo
    Nov 27 '18 at 1:43













  • You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

    – Christian Tremblay
    Dec 6 '18 at 0:16














0












0








0








import BAC0

bacnet = BAC0.connect()

my_obj_list = [('file', 1),
('analogInput', 1002),
('analogInput', 1),
('analogInput', 1006),
('analogInput', 1011),
('analogInput', 1010),
('analogInput', 1001)]


# # Provide it as an argument
fx = BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)
p=fx.points
for point in p:
print(point)


The code is returning the point values as expected, but throwing an exception. Can not figure out what I'm doing wrong.



error




2018-11-26 17:45:51,864 - INFO | Starting BAC0 version 0.99.944 (Lite)
2018-11-26 17:45:51,908 - INFO | Using ip : 192.168.0.16
2018-11-26 17:45:51,909 - INFO | Starting app...
2018-11-26 17:45:51,910 - INFO | BAC0 started
2018-11-26 17:45:51,910 - INFO | Registered as Simple BACnet/IP App
2018-11-26 17:45:54,529 - INFO | Changing device state to DeviceDisconnected'>
2018-11-26 17:45:54,726 - INFO | Changing device state to RPDeviceConnected'>
2018-11-26 17:45:54,928 - INFO | Device 1610219:[device1610219] found... building points list
2018-11-26 17:45:57,674 - INFO | Ready!
2018-11-26 17:45:57,676 - INFO | Polling started, values read every 10 seconds
Exception in thread rpm_poll:
Traceback (most recent call last):
File "C:Program Files (x86)Microsoft Visual StudioSharedAnaconda3_64libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 45, in run
self.process()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 52, in process
self.task()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksPoll.py", line 77, in task
self.device.read_multiple(list(self.device.points_name), points_per_request=25)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 452, in read_multiple
self.read_single(each,points_per_request=1, discover_request=discover_request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 459, in read_single
return self.properties.network.read(request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 87, in read
args_split, arr_index=arr_index, vendor_id=vendor_id, bacoid=bacoid))
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 310, in build_rp_request
addr, obj_type, obj_inst, prop_id = args[:4]
ValueError: not enough values to unpack (expected 4, got 2)




device1610219/ai_2 : 2.30 noUnits
device1610219/zone_temp : 45.00 degreesFahrenheit
device1610219/ai_6 : 75.00 degreesFahrenheit
device1610219/ai_11 : 1.00 65535
device1610219/ai_10 : -53.30 degreesFahrenheit
device1610219/ai_1 : 0.00 noUnits



Process finished with exit code 0










share|improve this question














import BAC0

bacnet = BAC0.connect()

my_obj_list = [('file', 1),
('analogInput', 1002),
('analogInput', 1),
('analogInput', 1006),
('analogInput', 1011),
('analogInput', 1010),
('analogInput', 1001)]


# # Provide it as an argument
fx = BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)
p=fx.points
for point in p:
print(point)


The code is returning the point values as expected, but throwing an exception. Can not figure out what I'm doing wrong.



error




2018-11-26 17:45:51,864 - INFO | Starting BAC0 version 0.99.944 (Lite)
2018-11-26 17:45:51,908 - INFO | Using ip : 192.168.0.16
2018-11-26 17:45:51,909 - INFO | Starting app...
2018-11-26 17:45:51,910 - INFO | BAC0 started
2018-11-26 17:45:51,910 - INFO | Registered as Simple BACnet/IP App
2018-11-26 17:45:54,529 - INFO | Changing device state to DeviceDisconnected'>
2018-11-26 17:45:54,726 - INFO | Changing device state to RPDeviceConnected'>
2018-11-26 17:45:54,928 - INFO | Device 1610219:[device1610219] found... building points list
2018-11-26 17:45:57,674 - INFO | Ready!
2018-11-26 17:45:57,676 - INFO | Polling started, values read every 10 seconds
Exception in thread rpm_poll:
Traceback (most recent call last):
File "C:Program Files (x86)Microsoft Visual StudioSharedAnaconda3_64libthreading.py", line 916, in _bootstrap_inner
self.run()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 45, in run
self.process()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksTaskManager.py", line 52, in process
self.task()
File "C:_websiteBacTestvenvlibsite-packagesBAC0tasksPoll.py", line 77, in task
self.device.read_multiple(list(self.device.points_name), points_per_request=25)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 452, in read_multiple
self.read_single(each,points_per_request=1, discover_request=discover_request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coredevicesmixinsread_mixin.py", line 459, in read_single
return self.properties.network.read(request)
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 87, in read
args_split, arr_index=arr_index, vendor_id=vendor_id, bacoid=bacoid))
File "C:_websiteBacTestvenvlibsite-packagesBAC0coreioRead.py", line 310, in build_rp_request
addr, obj_type, obj_inst, prop_id = args[:4]
ValueError: not enough values to unpack (expected 4, got 2)




device1610219/ai_2 : 2.30 noUnits
device1610219/zone_temp : 45.00 degreesFahrenheit
device1610219/ai_6 : 75.00 degreesFahrenheit
device1610219/ai_11 : 1.00 65535
device1610219/ai_10 : -53.30 degreesFahrenheit
device1610219/ai_1 : 0.00 noUnits



Process finished with exit code 0







python bacnet






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 27 '18 at 1:17









PyWooPyWoo

1




1













  • The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

    – bunbun
    Nov 27 '18 at 1:30











  • I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

    – PyWoo
    Nov 27 '18 at 1:36













  • bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

    – PyWoo
    Nov 27 '18 at 1:43













  • You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

    – Christian Tremblay
    Dec 6 '18 at 0:16



















  • The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

    – bunbun
    Nov 27 '18 at 1:30











  • I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

    – PyWoo
    Nov 27 '18 at 1:36













  • bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

    – PyWoo
    Nov 27 '18 at 1:43













  • You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

    – Christian Tremblay
    Dec 6 '18 at 0:16

















The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

– bunbun
Nov 27 '18 at 1:30





The error message mentions expecting 4 values but only getting 2. Seems like 2 of these four are missing: build_rp_request addr, obj_type, obj_inst, prop_id Will need more information from you to figure out

– bunbun
Nov 27 '18 at 1:30













I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

– PyWoo
Nov 27 '18 at 1:36







I saw that too but i sent four BAC0.device('16102:19', 1610219, bacnet, object_list = my_obj_list)

– PyWoo
Nov 27 '18 at 1:36















bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

– PyWoo
Nov 27 '18 at 1:43







bac0.readthedocs.io/en/develop/controller.html# The documentation for BAC0 does not say how to retrieve the data. I cause the error trying to print the items in the list.

– PyWoo
Nov 27 '18 at 1:43















You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

– Christian Tremblay
Dec 6 '18 at 0:16





You should just use print(fx.points) To print all points. Or accessone point using for example : fx[‘zone_temp’] Your specific issue is weird though. Can you try the same thing but removing the file object in your list. (BAC0 does not support this object anyway) I would be curious to know what is the device you are connecting to.

– Christian Tremblay
Dec 6 '18 at 0:16












1 Answer
1






active

oldest

votes


















0














I've made some tests trying to replicate your bug and I think you may be fighting with a weird device.



Using the exact same script I succeed reading all points.



If I may suggest though, declaring your device using default "poll" parameters will assure reading of all points every 10 seconds.



Using points will force a reading of points (one by one) when called which will slow the process. For that, I would use point.lastValue



When the device polls its point list, internally, it'll use a ReadPropertyMultiple that will read a bunch of points and properties at the same time. It is more efficient.



Something like (playing with format...) :



import BAC0

bacnet = BAC0.lite()

# # Provide it as an argument
fx = BAC0.device('2:5', 5, bacnet)

for name in fx.points_name:
if fx[name].units:
val = '{:>10.2f}'.format(fx[name].lastValue)
units = fx[name].units
else:
units = '({})'.format(fx[name].properties.units_state)
val = '{:>10}'.format(fx[name].lastValue)
print('{:<20} : {} {:<10}'.format(fx[name].properties.name, val, units))


(Extract of result)



2018-12-06 20:43:17,167 - INFO    | Starting BAC0 version 0.99.944 (Lite)
2018-12-06 20:43:17,283 - INFO | Using ip : 192.168.210.11
2018-12-06 20:43:17,285 - INFO | Starting app...
2018-12-06 20:43:17,292 - INFO | BAC0 started
2018-12-06 20:43:17,292 - INFO | Registered as Simple BACnet/IP App
2018-12-06 20:43:19,295 - INFO | Changing device state to DeviceDisconnected'>
2018-12-06 20:43:20,156 - INFO | Changing device state to RPMDeviceConnected'>
2018-12-06 20:43:20,716 - INFO | Device 5:[FX14 0005] found... building points
2018-12-06 20:43:32,691 - INFO | Ready!
2018-12-06 20:43:32,696 - INFO | Polling started, values read every 10 seconds
nvoAI3 : -1.17 degreesCelsius
nvoAI4 : 42.33 percent
nvoAI6 : 354.00 kilopascals
nvoAI5 : 1.85 percent
nvoAI1 : 22.05 degreesCelsius
nvoAI2 : 20.84 degreesCelsius
[...]
nciOvrdDO5.State : 1 (['AUTO', 'ON', 'OFF'])
nvoAlarmPompe : 1 (['OFF', 'ON'])
nvoAlrmGravePompe : 1 (['OFF', 'ON'])
nvoTempOccup : 1 (['OFF', 'ON'])
nciModeOperation : 2 (['ARRET', 'AUTO', 'CHAUFF', 'REFROID', 'ELECTR'])
nciOvrdDO2.State : 1 (['AUTO', 'ON', 'OFF'])
nciOvrdDO3.State : 1 (['AUTO', 'ON', 'OFF'])
nciOvrdDO4.State : 1 (['AUTO', 'ON', 'OFF'])
nciOvrdDO1.State : 1 (['AUTO', 'ON', 'OFF'])
nciModeDeshum : 1 (['Aucune', 'Ventilation', 'Rechauff'])
nciOvrdAO1.State : 2 (['AUTO', 'MAN', '100', '0'])
nciOvrdAO2.State : 1 (['AUTO', 'MAN', '100', '0'])
nvoDI7 : inactive (('Off', 'On'))
nvoDI8 : inactive (('Off', 'On'))
nvoDI10 : inactive (('Off', 'On'))
nvoDI9 : inactive (('Off', 'On'))
nvoDI6 : inactive (('Off', 'On'))
nvoDI4 : inactive (('Off', 'On'))


If you keep getting issues, please post one here : https://github.com/ChristianTremblay/BAC0/issues






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53491437%2ferror-reading-point-values-from-bacnet-device%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I've made some tests trying to replicate your bug and I think you may be fighting with a weird device.



    Using the exact same script I succeed reading all points.



    If I may suggest though, declaring your device using default "poll" parameters will assure reading of all points every 10 seconds.



    Using points will force a reading of points (one by one) when called which will slow the process. For that, I would use point.lastValue



    When the device polls its point list, internally, it'll use a ReadPropertyMultiple that will read a bunch of points and properties at the same time. It is more efficient.



    Something like (playing with format...) :



    import BAC0

    bacnet = BAC0.lite()

    # # Provide it as an argument
    fx = BAC0.device('2:5', 5, bacnet)

    for name in fx.points_name:
    if fx[name].units:
    val = '{:>10.2f}'.format(fx[name].lastValue)
    units = fx[name].units
    else:
    units = '({})'.format(fx[name].properties.units_state)
    val = '{:>10}'.format(fx[name].lastValue)
    print('{:<20} : {} {:<10}'.format(fx[name].properties.name, val, units))


    (Extract of result)



    2018-12-06 20:43:17,167 - INFO    | Starting BAC0 version 0.99.944 (Lite)
    2018-12-06 20:43:17,283 - INFO | Using ip : 192.168.210.11
    2018-12-06 20:43:17,285 - INFO | Starting app...
    2018-12-06 20:43:17,292 - INFO | BAC0 started
    2018-12-06 20:43:17,292 - INFO | Registered as Simple BACnet/IP App
    2018-12-06 20:43:19,295 - INFO | Changing device state to DeviceDisconnected'>
    2018-12-06 20:43:20,156 - INFO | Changing device state to RPMDeviceConnected'>
    2018-12-06 20:43:20,716 - INFO | Device 5:[FX14 0005] found... building points
    2018-12-06 20:43:32,691 - INFO | Ready!
    2018-12-06 20:43:32,696 - INFO | Polling started, values read every 10 seconds
    nvoAI3 : -1.17 degreesCelsius
    nvoAI4 : 42.33 percent
    nvoAI6 : 354.00 kilopascals
    nvoAI5 : 1.85 percent
    nvoAI1 : 22.05 degreesCelsius
    nvoAI2 : 20.84 degreesCelsius
    [...]
    nciOvrdDO5.State : 1 (['AUTO', 'ON', 'OFF'])
    nvoAlarmPompe : 1 (['OFF', 'ON'])
    nvoAlrmGravePompe : 1 (['OFF', 'ON'])
    nvoTempOccup : 1 (['OFF', 'ON'])
    nciModeOperation : 2 (['ARRET', 'AUTO', 'CHAUFF', 'REFROID', 'ELECTR'])
    nciOvrdDO2.State : 1 (['AUTO', 'ON', 'OFF'])
    nciOvrdDO3.State : 1 (['AUTO', 'ON', 'OFF'])
    nciOvrdDO4.State : 1 (['AUTO', 'ON', 'OFF'])
    nciOvrdDO1.State : 1 (['AUTO', 'ON', 'OFF'])
    nciModeDeshum : 1 (['Aucune', 'Ventilation', 'Rechauff'])
    nciOvrdAO1.State : 2 (['AUTO', 'MAN', '100', '0'])
    nciOvrdAO2.State : 1 (['AUTO', 'MAN', '100', '0'])
    nvoDI7 : inactive (('Off', 'On'))
    nvoDI8 : inactive (('Off', 'On'))
    nvoDI10 : inactive (('Off', 'On'))
    nvoDI9 : inactive (('Off', 'On'))
    nvoDI6 : inactive (('Off', 'On'))
    nvoDI4 : inactive (('Off', 'On'))


    If you keep getting issues, please post one here : https://github.com/ChristianTremblay/BAC0/issues






    share|improve this answer




























      0














      I've made some tests trying to replicate your bug and I think you may be fighting with a weird device.



      Using the exact same script I succeed reading all points.



      If I may suggest though, declaring your device using default "poll" parameters will assure reading of all points every 10 seconds.



      Using points will force a reading of points (one by one) when called which will slow the process. For that, I would use point.lastValue



      When the device polls its point list, internally, it'll use a ReadPropertyMultiple that will read a bunch of points and properties at the same time. It is more efficient.



      Something like (playing with format...) :



      import BAC0

      bacnet = BAC0.lite()

      # # Provide it as an argument
      fx = BAC0.device('2:5', 5, bacnet)

      for name in fx.points_name:
      if fx[name].units:
      val = '{:>10.2f}'.format(fx[name].lastValue)
      units = fx[name].units
      else:
      units = '({})'.format(fx[name].properties.units_state)
      val = '{:>10}'.format(fx[name].lastValue)
      print('{:<20} : {} {:<10}'.format(fx[name].properties.name, val, units))


      (Extract of result)



      2018-12-06 20:43:17,167 - INFO    | Starting BAC0 version 0.99.944 (Lite)
      2018-12-06 20:43:17,283 - INFO | Using ip : 192.168.210.11
      2018-12-06 20:43:17,285 - INFO | Starting app...
      2018-12-06 20:43:17,292 - INFO | BAC0 started
      2018-12-06 20:43:17,292 - INFO | Registered as Simple BACnet/IP App
      2018-12-06 20:43:19,295 - INFO | Changing device state to DeviceDisconnected'>
      2018-12-06 20:43:20,156 - INFO | Changing device state to RPMDeviceConnected'>
      2018-12-06 20:43:20,716 - INFO | Device 5:[FX14 0005] found... building points
      2018-12-06 20:43:32,691 - INFO | Ready!
      2018-12-06 20:43:32,696 - INFO | Polling started, values read every 10 seconds
      nvoAI3 : -1.17 degreesCelsius
      nvoAI4 : 42.33 percent
      nvoAI6 : 354.00 kilopascals
      nvoAI5 : 1.85 percent
      nvoAI1 : 22.05 degreesCelsius
      nvoAI2 : 20.84 degreesCelsius
      [...]
      nciOvrdDO5.State : 1 (['AUTO', 'ON', 'OFF'])
      nvoAlarmPompe : 1 (['OFF', 'ON'])
      nvoAlrmGravePompe : 1 (['OFF', 'ON'])
      nvoTempOccup : 1 (['OFF', 'ON'])
      nciModeOperation : 2 (['ARRET', 'AUTO', 'CHAUFF', 'REFROID', 'ELECTR'])
      nciOvrdDO2.State : 1 (['AUTO', 'ON', 'OFF'])
      nciOvrdDO3.State : 1 (['AUTO', 'ON', 'OFF'])
      nciOvrdDO4.State : 1 (['AUTO', 'ON', 'OFF'])
      nciOvrdDO1.State : 1 (['AUTO', 'ON', 'OFF'])
      nciModeDeshum : 1 (['Aucune', 'Ventilation', 'Rechauff'])
      nciOvrdAO1.State : 2 (['AUTO', 'MAN', '100', '0'])
      nciOvrdAO2.State : 1 (['AUTO', 'MAN', '100', '0'])
      nvoDI7 : inactive (('Off', 'On'))
      nvoDI8 : inactive (('Off', 'On'))
      nvoDI10 : inactive (('Off', 'On'))
      nvoDI9 : inactive (('Off', 'On'))
      nvoDI6 : inactive (('Off', 'On'))
      nvoDI4 : inactive (('Off', 'On'))


      If you keep getting issues, please post one here : https://github.com/ChristianTremblay/BAC0/issues






      share|improve this answer


























        0












        0








        0







        I've made some tests trying to replicate your bug and I think you may be fighting with a weird device.



        Using the exact same script I succeed reading all points.



        If I may suggest though, declaring your device using default "poll" parameters will assure reading of all points every 10 seconds.



        Using points will force a reading of points (one by one) when called which will slow the process. For that, I would use point.lastValue



        When the device polls its point list, internally, it'll use a ReadPropertyMultiple that will read a bunch of points and properties at the same time. It is more efficient.



        Something like (playing with format...) :



        import BAC0

        bacnet = BAC0.lite()

        # # Provide it as an argument
        fx = BAC0.device('2:5', 5, bacnet)

        for name in fx.points_name:
        if fx[name].units:
        val = '{:>10.2f}'.format(fx[name].lastValue)
        units = fx[name].units
        else:
        units = '({})'.format(fx[name].properties.units_state)
        val = '{:>10}'.format(fx[name].lastValue)
        print('{:<20} : {} {:<10}'.format(fx[name].properties.name, val, units))


        (Extract of result)



        2018-12-06 20:43:17,167 - INFO    | Starting BAC0 version 0.99.944 (Lite)
        2018-12-06 20:43:17,283 - INFO | Using ip : 192.168.210.11
        2018-12-06 20:43:17,285 - INFO | Starting app...
        2018-12-06 20:43:17,292 - INFO | BAC0 started
        2018-12-06 20:43:17,292 - INFO | Registered as Simple BACnet/IP App
        2018-12-06 20:43:19,295 - INFO | Changing device state to DeviceDisconnected'>
        2018-12-06 20:43:20,156 - INFO | Changing device state to RPMDeviceConnected'>
        2018-12-06 20:43:20,716 - INFO | Device 5:[FX14 0005] found... building points
        2018-12-06 20:43:32,691 - INFO | Ready!
        2018-12-06 20:43:32,696 - INFO | Polling started, values read every 10 seconds
        nvoAI3 : -1.17 degreesCelsius
        nvoAI4 : 42.33 percent
        nvoAI6 : 354.00 kilopascals
        nvoAI5 : 1.85 percent
        nvoAI1 : 22.05 degreesCelsius
        nvoAI2 : 20.84 degreesCelsius
        [...]
        nciOvrdDO5.State : 1 (['AUTO', 'ON', 'OFF'])
        nvoAlarmPompe : 1 (['OFF', 'ON'])
        nvoAlrmGravePompe : 1 (['OFF', 'ON'])
        nvoTempOccup : 1 (['OFF', 'ON'])
        nciModeOperation : 2 (['ARRET', 'AUTO', 'CHAUFF', 'REFROID', 'ELECTR'])
        nciOvrdDO2.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO3.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO4.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO1.State : 1 (['AUTO', 'ON', 'OFF'])
        nciModeDeshum : 1 (['Aucune', 'Ventilation', 'Rechauff'])
        nciOvrdAO1.State : 2 (['AUTO', 'MAN', '100', '0'])
        nciOvrdAO2.State : 1 (['AUTO', 'MAN', '100', '0'])
        nvoDI7 : inactive (('Off', 'On'))
        nvoDI8 : inactive (('Off', 'On'))
        nvoDI10 : inactive (('Off', 'On'))
        nvoDI9 : inactive (('Off', 'On'))
        nvoDI6 : inactive (('Off', 'On'))
        nvoDI4 : inactive (('Off', 'On'))


        If you keep getting issues, please post one here : https://github.com/ChristianTremblay/BAC0/issues






        share|improve this answer













        I've made some tests trying to replicate your bug and I think you may be fighting with a weird device.



        Using the exact same script I succeed reading all points.



        If I may suggest though, declaring your device using default "poll" parameters will assure reading of all points every 10 seconds.



        Using points will force a reading of points (one by one) when called which will slow the process. For that, I would use point.lastValue



        When the device polls its point list, internally, it'll use a ReadPropertyMultiple that will read a bunch of points and properties at the same time. It is more efficient.



        Something like (playing with format...) :



        import BAC0

        bacnet = BAC0.lite()

        # # Provide it as an argument
        fx = BAC0.device('2:5', 5, bacnet)

        for name in fx.points_name:
        if fx[name].units:
        val = '{:>10.2f}'.format(fx[name].lastValue)
        units = fx[name].units
        else:
        units = '({})'.format(fx[name].properties.units_state)
        val = '{:>10}'.format(fx[name].lastValue)
        print('{:<20} : {} {:<10}'.format(fx[name].properties.name, val, units))


        (Extract of result)



        2018-12-06 20:43:17,167 - INFO    | Starting BAC0 version 0.99.944 (Lite)
        2018-12-06 20:43:17,283 - INFO | Using ip : 192.168.210.11
        2018-12-06 20:43:17,285 - INFO | Starting app...
        2018-12-06 20:43:17,292 - INFO | BAC0 started
        2018-12-06 20:43:17,292 - INFO | Registered as Simple BACnet/IP App
        2018-12-06 20:43:19,295 - INFO | Changing device state to DeviceDisconnected'>
        2018-12-06 20:43:20,156 - INFO | Changing device state to RPMDeviceConnected'>
        2018-12-06 20:43:20,716 - INFO | Device 5:[FX14 0005] found... building points
        2018-12-06 20:43:32,691 - INFO | Ready!
        2018-12-06 20:43:32,696 - INFO | Polling started, values read every 10 seconds
        nvoAI3 : -1.17 degreesCelsius
        nvoAI4 : 42.33 percent
        nvoAI6 : 354.00 kilopascals
        nvoAI5 : 1.85 percent
        nvoAI1 : 22.05 degreesCelsius
        nvoAI2 : 20.84 degreesCelsius
        [...]
        nciOvrdDO5.State : 1 (['AUTO', 'ON', 'OFF'])
        nvoAlarmPompe : 1 (['OFF', 'ON'])
        nvoAlrmGravePompe : 1 (['OFF', 'ON'])
        nvoTempOccup : 1 (['OFF', 'ON'])
        nciModeOperation : 2 (['ARRET', 'AUTO', 'CHAUFF', 'REFROID', 'ELECTR'])
        nciOvrdDO2.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO3.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO4.State : 1 (['AUTO', 'ON', 'OFF'])
        nciOvrdDO1.State : 1 (['AUTO', 'ON', 'OFF'])
        nciModeDeshum : 1 (['Aucune', 'Ventilation', 'Rechauff'])
        nciOvrdAO1.State : 2 (['AUTO', 'MAN', '100', '0'])
        nciOvrdAO2.State : 1 (['AUTO', 'MAN', '100', '0'])
        nvoDI7 : inactive (('Off', 'On'))
        nvoDI8 : inactive (('Off', 'On'))
        nvoDI10 : inactive (('Off', 'On'))
        nvoDI9 : inactive (('Off', 'On'))
        nvoDI6 : inactive (('Off', 'On'))
        nvoDI4 : inactive (('Off', 'On'))


        If you keep getting issues, please post one here : https://github.com/ChristianTremblay/BAC0/issues







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 7 '18 at 1:47









        Christian TremblayChristian Tremblay

        416410




        416410
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53491437%2ferror-reading-point-values-from-bacnet-device%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen