Error scraping BACnet points (VOLTTRON) - volttron

When running the BACnet Proxy and MasterDriver agents, I am getting ERROR DURING SCRAPE (Class: object Code:unknownObject). Does this error indicate an incorrect device id or configuration file (csv file with the point names)?

This is either a bad device address (which could cause a csv to device mismatch if a device exists at the wrong address) or a problem with your csv file.
Usually it's going to be a problem with the csv file.

Related

VOLTTRON reading data from multiple BACnet IP to MSTP Routers puts Building Management System down

I have a BACnet network where multiple BACnet IP to MSTP routers are used.
The network configurations are as follows:
Network Configuration sketch
Now I am trying to read data from the network using Volttron. Previously no data was read, so I tried changing use_read_multiple:false in driver configurations. Still to make the request even smaller for the network I changed max_per_request: 1,
Now it is reading data but it shows an error after some time and puts the BMS down. This means we are not able to read or even discover devices on the BMS nor it gives data in VOLTTRON.
It gives an error on the router with most of AHUs, FCUs are attached. I tried testing just that Router (Say its identifier is 4900, now most of the devices like 4900:1, 4900:3, etc.) start giving an error on both BMS and my Laptop.
I have tried grouping too by making groups of 2-5 devices and setting "group_offset_interval" in Platform Driver configurations to some really high value to know whether it is a network congestion issue on the MSTP network. Sometime it starts working but after some time (an hour), it starts giving error on both sides BMS and VOLTTRON too. Although devices are ON.
It gives error on different Routers and sometimes many routers stop working.
How can I solve this issue?
Thanks in anticipation.
Specifications:
Volttron: 7.0
BACpypes: 0.16.7 (as required by Volttron for bacnet)
I could be wrong here (in adding this to the mix) - but as it's relating to MSTP (- BACnet MS/TP), but you might want to also consider if there's a (half-typical) MSTP physical/wiring issue - might not necessarily be the software (or at least not alone).
(You might end up having to consider bifurcating the network / keep 'divide & conquer'ing it into small/2-halves segments to see/locate a wiring issue.)

Requesting size of Stream from consumer, before loading all the data

Hy all,
I have a problem with the camel component I am developing, where I'm not sure how to implement it in a way, that goes in line with the concepts of camel.
The producer I'm developing talks to the http api for our server, which is used to send messages with attachments.
Those attachments can potentially be very big, which is why the server expects the total filesize before any upload is done.
Currently the producer only accepts io.Files, nio.Paths and GenericFile, because there I can read the file size, before I upload the file.
Of course this is not a good way to do things, because it requires the (big) file to be available locally.
Connecting, for a example, a ftp server as the consumer would mean, that I have to download each file locally so I can upload it afterwards.
The obvious solution is using streams to access and upload the data, but with this I do not know how big the file is, before I'm done uploading, which is not an option, I need the size in advance.
My question now is, what are best practices to stream files through camel and also make the consumer give me the filesize in advance.
Greets
Chris
For File/FTP consumer, the exchange in header has a key CamelFileLength (Exchange.FILE_LENGTH) which return the file size in remote ftp server from consumer's scan result.
Unlike the file size obtain from local, the file size in key CamelFileLength might differ from actual file size your application received
The ASCII mode will potentially change the linefeed when there is OS differ
The file size might change between consumer scan action and consumer pick actionn

Getting specific chunk of data from file on FTP server

I am writing FTP client in C. I am not making any changes to Server program.
I want to get specific amount of data from a file on server.
Suppose I have a file on server and I want to read last 100 bytes from the file. I don't want to read whole file.
I am able to get whole file using
RETR filename but I didn't find any way to read specific amount of bytes.
Is there any way to do this for a standard FTP server?
Is there any way to do this for a standard FTP server?
No. You can tell the server the position where it should start with the REST (restart) command, but you cannot tell it how much data it should send. All you can do is close the data channel after you've received the amount of data you want. The FTP server will probably complain about this because it received a RST (writing against a closed socket) but in most cases this should not cause problems.

Discover location of database

I am trying to find the location of the database where a particular website is saving to.
The website is saving to some local database in our system, but I am unable to discover where.
I have tried using WireShark to find the IP of the machine where the website sends data to (i.e. the machine which has the database) but currently the only packets showing up are those from the website to my machine and vice versa.
Any ideas?
Thanks
I would start by tracking through the code & website config. If you have sufficient access to run Wireshartk on the host can you not search for config files, find the serverside code, etc?
If you can't see packets on the network interface and you know you've found all network interfaces then it would appear possible the DB has to be on the same machine. Check for recently changed files with you favourite tool (Windows explorer/search, find on Unix, etc).
Is it caching so you haven't yet caused it to read/write to a remote DB while watching? Try watching Wireshark at boot up.
Depending on the nature of the data it could be an in memory DB or something that reads from a disk file into memory at boot up.

Block Linux from sending usb barcode scanner chars to the console

For a customer, i wrote an middleware to let him access the serial port, or serial port over network using an ethernet adapter, and read data using a webservice.
He recently asked to add too support for reading data from a barcode scanner, stuff that i've implemented reading events directly from the device (/dev/input/eventX or /dev/input/by-id/xyz).
The barcode scanner is attached directly to the server and data are being readed through a webservice exposed by my webserver.
All works fine, except that barcodes are recived by the linux console!
How can i "block" (stop) the system from sending stuff to the console?
NOTE: no X11/Xorg or nothing else, the server is a console only machine! Barcodes are readed by javascript (jsonp) executed on an android tablet
Check /etc/inittab to see if a getty is running on that serial port. If it is, comment out the line by inserting a # as the first character.
It depends on your Linux distro. On Redhat/Centos, you can turn off or filter console messages by editing /etc/syslog.conf and /etc/sysconfig/syslog.
Presumably the barcodes are getting to the console either because you are running the server process from a startup script and it is outputting to stdout/stderr, or they are some kind of system log or kernel messages.
Assuming they are standard output, find where the server is run in your startup scripts, and redirect the output to file or /dev/null, e.g.:
noisy-server-cmd >/dev/null 2>&1 &

Resources