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

readPropertyMultiple errorCode:31 #144

Closed
stefano055415 opened this issue Dec 18, 2019 · 2 comments
Closed

readPropertyMultiple errorCode:31 #144

stefano055415 opened this issue Dec 18, 2019 · 2 comments
Labels

Comments

@stefano055415
Copy link

I am trying to read the data of an analogInput device, but I always get an errorCode: 31

request

const requestArray = [{
objectId: {
type: 0,
instance: 0
},
properties: [{
id: 85
}]
}];
client.readPropertyMultiple('192.168.86.61', requestArray, (err, value) => {
console.log('value: ', JSON.stringify(value));
console.log('Error:', err);
});

response

value: {"len":15,"values":[{"objectId":{"type":0,"instance":0},"values":[{"id":85,"index":4294967295,"value":[{"type":105,"value":{"errorClass":1,"errorCode":31}}]}]}]}
Error: null

thanks

@Craigzyc
Copy link

I'm getting this identical response on both readPropertyMultiple and readProperty. My code is similar. @stefano055415 Did you get anywhere with this?

@fh1ch fh1ch added the Support label Apr 25, 2020
@fh1ch
Copy link
Owner

fh1ch commented Apr 25, 2020

Please see https://github.com/fh1ch/node-bacstack/blob/master/FAQ.md#i-receive-the-error-bacneterror---class-x---code-y-what-does-this-mean. The error {"errorClass": 1,"errorCode": 31} means: OBJECT - UNKNOWN_OBJECT.

You try to read instance 0 of object o, which is not a valid BACNET object. Try something like {objectId: {type: 8, instance: 4194303}, properties: [{id: 8}]}, which returns all properties from the device object.

The fact that you receive an error also indicates, that the device is reachable and acts according to specs.

@fh1ch fh1ch closed this as completed Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants