-
Notifications
You must be signed in to change notification settings - Fork 25
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
Using with MS/TP Router #28
Comments
Can you please run your code with debug? DEBUG=bacnet:* node yourfile.js And post the log here |
@mwitt1337 For me BACnet router details Working code example that was tested a few months ago // different ways to do a who is including a network whoIs
bacnetClient.whoIs();
bacnetClient.whoIs({'net':0xFFFF});
bacnetClient.whoIs({'net':0xFFFF,'interface':'0.0.0.0'});
bacnetClient.whoIs({'net':3});
// read a point through a router to an MSTP device
bacnetClient.readProperty({address: '192.168.15.137',net:3,adr:[6]} , {type: 1, instance: 1}, 85, (err, value) => {
console.log('value: ', value);
console.log('err: ', err);
}); |
In theory when you use on('iAm') to get discovered devices then the net/adr should be included in the "found device details". @mwitt1337 please try to send the "whoIs" as above ... and then we can see in the log output if the found evices include the details as needed. Then we can enhance the docs and example |
So here are the commands I ran and the debug log output bacnetClient.whoIs(); sent whoIs 1595634894063 bacnetClient.whoIs({'net':0xFFFF}); sent whoIs 1595634940669 bacnetClient.whoIs({'net':0xFFFF,'interface':'10.10.0.48'}); sent whoIs 1595635017212 bacnetClient.whoIs({'net':3}); sent whoIs 1595635055268 bacnetClient.whoIs({'net':0}); sent whoIs 1595635116749 Debug isn't as much information as I expected it to. Device 156 is the MS/TP route and I need to access the devices attached to it. |
Yes the debug should be waaaaay more. Please try against and use DEBUG=bacnet* node Myfile.js Please |
Sorry, I'm still newer to node and I'm using VSCode. What I posted
previously is from the debug console. Is there a logfile I should be
looking at?
Running this in a javascript debug terminal returns errors DEBUG=bacnet* is
not recognized as the name of a cmdlet. I'm missing something fundamental
here.
Running DEBUG=Bacnet*; node read-device.js works but doesn't return
any further detail then what I've posted before.
…On Sat, Jul 25, 2020 at 2:17 AM Ingo Fischer ***@***.***> wrote:
Yes the debug should be waaaaay more. Please try against and use
DEBUG=bacnet* node Myfile.js
Please
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGLMPHVCCUNVMPJENKIOG2TR5J2FZANCNFSM4PD7RPAA>
.
|
Just open a shell and "cd" in the relevant directory and run it from there as described above |
Thanks for being patient with me ;) Got the debug to work. I loaded the
source into a folder but didn't run npm install...
[image: image.png]
…On Mon, Jul 27, 2020 at 12:41 PM Ingo Fischer ***@***.***> wrote:
Just open a shell and "cd" in the relevant directory and run it from there
as described above
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGLMPHVI4RYMWAXMIUB4CILR5WU4BANCNFSM4PD7RPAA>
.
|
Hi, read some more here about debug https://github.com/BiancoRoyal/node-red-contrib-modbus/wiki/DEBUG But with bacnet ;) Like: on CMD: set DEBUG=bacnet* on PowerShell: $env:DEBUG = "bacnet*" |
which way you sent the whois command?
? |
I ran the who is command 4 different ways and attached a text file of the outputs. net 0.txt |
Are you using wireshark to debug? Like this // read a point through a router to an MSTP device
bacnetClient.readProperty({address: '192.168.15.137',net:3,adr:[6]} , {type: 1, instance: 1}, 85, (err, value) => {
console.log('value: ', value);
console.log('err: ', err);
}); |
I was able to make some progress on one of the devices.
Below is a screen shot of the json from the attached file visualized. At the top the Type:8 and Instance: 48871 matches the light panel I was trying to read values from. The child objects at the bottom are confusing me because they are Type:12 which I haven't found what object type 12 is. The value is Type: 2 which is analog output and instance: 601 must be the instance of that analog value. I was able to read the current value of instance 601 |
But you were still not able to get that device by a whoIs call? |
No, the devices in the object list are not coming back with the whois. The
MSTP bridge will return with the whois but none of the child devices.
|
These are buttons and switches on a light panel so I don't know if they
should be responding to a whois
|
Interesting is - when checking your screenshot above - that the router device returns some more data in the response. maybe we need to look in how/that they are parsed correctly :-( |
To people having the issues:
@mwitt1337 Regarding this example: You should first:
From there you will know how to address the sub devices To this repo's maintainers: The iAm event emitter should contain:
|
Node Version:
10.15.0
Node BACstack Version:
0.2.4
Note: Make sure you have read the FAQs
before logging this issue.
Feature Request / Question
I am trying to use node-bacstack with devices behind a MS/TP router. It is unclear to me how to use node-bacstack to accomplish this. The NET and ADR is not obvious or clear to me. I am trying to discover the devices behind device 156 and read/write their properties. I'm new to MS/TP.
Below is the WHOIS return from /examples/read-device.js
Device 156 is the MS/TP router that has child devices/properties. The readproperties function included in the /examples/read-devices.js retuned this JSON for device 156
A bacnet explorer returned this for device 156
Here is code. Mostly unchanged from the example.
read-device.zip
The text was updated successfully, but these errors were encountered: