Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteProperty error #138

Open
harshpatel1408 opened this issue Jul 9, 2019 · 2 comments
Open

WriteProperty error #138

harshpatel1408 opened this issue Jul 9, 2019 · 2 comments

Comments

@harshpatel1408
Copy link

Node Version: 8.16.0

Node BACstack Version: 0.0.1-beta.13

Here is my current code

client.writeProperty('192.168.0.28', 13,10308, 85, [
      {tag: bacnet.enum.ApplicationTags.BACNET_APPLICATION_TAG_BOOLEAN, value: 66}], function(err, value) {
  console.log('value: ', value);
  console.log('err: ', err);
});.

client.writeProperty('192.168.0.28', {type: 2, instance: 10210}, 85, [
      {type: bacnet.enum.ApplicationTags.BACNET_APPLICATION_TAG_BOOLEAN, value: 4}], (err, value) => {
      console.log('value: ', value);
      console.log('err: ', err);
    });

I am passing all the value as per documentation but not able to write property.

Output:

value:  { len: 14,
  objectId: { type: 2, instance: 10210 },
  property: { id: 85, index: 4294967295 },
  values: [ { type: 4, value: 66 } ] }
value:  undefined
err:  Error: BacnetAbort - Reason:0
    at processAbort (/home/pardypanda02/Harsh_Patel/thermostat/node_modules/bacstack/lib/client.js:99:30)
    at handlePdu (/home/pardypanda02/Harsh_Patel/thermostat/node_modules/bacstack/lib/client.js:313:9)
    at handleNpdu (/home/pardypanda02/Harsh_Patel/thermostat/node_modules/bacstack/lib/client.js:342:5)
    at self.receiveData (/home/pardypanda02/Harsh_Patel/thermostat/node_modules/bacstack/lib/client.js:353:7)
    at Socket.<anonymous> (/home/pardypanda02/Harsh_Patel/thermostat/node_modules/bacstack/lib/transport.js:13:25)
    at emitTwo (events.js:126:13)
    at Socket.emit (events.js:214:7)
    at UDP.onMessage [as onmessage] (dgram.js:659:8)
address:  192.168.0.28
deviceId:  1
maxAdpu:  undefined
segmentation:  3
vendorId:  0
address:  192.168.0.28
deviceId:  1
maxAdpu:  undefined
segmentation:  3
vendorId:  0
@niemilkm
Copy link

niemilkm commented Jan 9, 2020

I have a similar issue as shown below. Did you figure out your issue? I am using BACNET_APPLICATION_TAG_REAL. Maybe since you were using BOOLEAN it was failing?

client.writeProperty('192.168.200.147', {type: 2, instance: 0}, 85, [
  {type: bacnet.enum.ApplicationTags.BACNET_APPLICATION_TAG_REAL, value: 77.0}
], (err, value) => {
  console.log('error: ', err);
  console.log('value: ', value);
});
error:  Error: BacnetAbort - Reason:0
    at processAbort (/Users/internal/bacnet/node/node_modules/bacstack/lib/client.js:99:30)
    at handlePdu (/Users/internal/bacnet/node/node_modules/bacstack/lib/client.js:313:9)
    at handleNpdu (/Users/internal/bacnet/node/node_modules/bacstack/lib/client.js:342:5)
    at self.receiveData (/Users/internal/bacnet/node/node_modules/bacstack/lib/client.js:353:7)
    at Socket.<anonymous> (/Users/internal/bacnet/node/node_modules/bacstack/lib/transport.js:13:25)
    at emitTwo (events.js:126:13)
    at Socket.emit (events.js:214:7)
    at UDP.onMessage [as onmessage] (dgram.js:659:8)
value:  undefined

@Apollon77
Copy link

Please try wit the updated fork at https://github.com/BiancoRoyal/node-bacstack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants