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
When writing commandable properties, priority should default to 16.
Current Behaviour
when writing a commandable proper if a priority is not provided, a parameter-out-of-range error is received from some devices.
Expected Behaviour
It would be nice if the priority defaulted to 16 as it does in the web services specification. This might not be exact to spec. Other devices might throw errors if we pass priority to non-commandable properties through APDU instead of WebServices. It looks like if an Object is commandable, then Priority Array and Relinquish Default are required. Maybe the library could check for those properties.
Steps to reproduce Issue
WritePropert to the Present Value of some commandable object...
const objectId = { type: Bacstack.enum.ObjectTypes.OBJECT_BINARY_VALUE, instance: 2};
function command(deviceIp, value, priority) {
return new Promise((resolve, reject) => {
client.writeProperty(deviceIp, objectId,
Bacstack.enum.PropertyIds.PROP_PRESENT_VALUE,
// set binary-value present-values with enumerated BACnetBinaryPV(0=inactive, 1=active)
[ { type: Bacstack.enum.ApplicationTags.BACNET_APPLICATION_TAG_ENUMERATED, value } ],
// must set priority when commanding, otherwise you will get an out of range exception.
// { priority },
(err, response) => (err) ? reject(err) : resolve(response)
);
});
};
command('192.168.1.81', 0, 8).then((response) => {
console.log('then', JSON.stringify(response));
})
.catch((err) => {
console.log('err', JSON.stringify(err));
});
you can uncomment the options line in the client.writeProperty method to see a working case..
The text was updated successfully, but these errors were encountered:
Node Version: N/A
Node BACstack Version: master, 4777725
Feature Request / Question
Current Behaviour
when writing a commandable proper if a priority is not provided, a parameter-out-of-range error is received from some devices.
Expected Behaviour
It would be nice if the priority defaulted to 16 as it does in the web services specification. This might not be exact to spec. Other devices might throw errors if we pass priority to non-commandable properties through APDU instead of WebServices. It looks like if an Object is commandable, then Priority Array and Relinquish Default are required. Maybe the library could check for those properties.
Steps to reproduce Issue
The text was updated successfully, but these errors were encountered: