How-To Guides
Set Up the DeviceHub Agent
12min
the devicehub agent acts as a proxy between an opc data access (da), also known as an opc classic server, and the litmus edge system it allows you to search for available opc da servers and provides a list of tags from the selected server multiple servers can be selected review the following use case for connecting and configuring the devicehub agent in litmus edge important to install devicehub agent, your machine must support the following software versions windows 10 0 14393 windows sdk version 10 0 18362 0 visual studio 16 2019 the devicehub agent must be run on the same host as the opc da server, and dcom must be configured for more information, see configure dcom for opc da connections docid\ n8j82snygb 1axvmy 9ed the devicehub agent supports reading up to 5000 tags from the opc da server it does not support parallel write the devicehub agent does not support opc classic historical data access (hda) or opc classic alarms and events (ae) it is possible to configure multiple connections to several devicehub agent instances inside a litmus edge or multiple litmus edge instances using only one devicehub agent application you can create each connection using the add (+) icon the devicehub agent includes options to export tags to a csv file the csv file can then be used to import the tags to litmus edge the status of the tags are checked periodically sending tags to devicehub is the preferred method before you begin download the devicehub agent exe file from litmus edge by navigating to system > support in the file downloads section setting up the devicehub agent includes the following tasks step 1 add devicehub agent to devicehub step 2 create api token step 3 install matrikon opc explorer and simulation and testing tool step 4 set up devicehub agent step 5 connect the opc da explorer step 6 send tags to devicehub step 7 view tag data step 1 add devicehub agent to devicehub to add the devicehub agent to devicehub in litmus edge, navigate to devicehub > devices click the connect a device box the connect device dialog box appears in the device type drop down list, select opcua in the driver name drop down list, select devicehub agent enter a name for the device the device name you configure is used for the device name parameter in the devicehub agent configuration (optional) select the enable alias topics check box this allows you to name the topic id when creating a tag if you enable alias topics during device creation or modification, devicehub stops publishing to raw topics and publishes only to alias topics litmus edge substitutes " " (period) in aliases with "/" (forward slash) click add device the device appears in the devices pane step 2 create api token follow the steps to create api credentials docid\ dxgpm5ir bz wk3iv s9q copy the token and store it for later use step 3 install matrikon opc explorer and simulation and testing tool note to install these files, you may have to enable the net framework 3 5 see microsoft documentation on this topic to learn more in this use case, matrikon server is used you can also use kepware server or prosys server to download matrikon opc explorer and simulation and testing tool visit the matrikon website from the matrikon search bar, enter opc simulation server download , and click search click the opc simulation server download link from the download page, enter your first name, last name, and email address, and then click download now from the registration form, enter your account information, and then click download now an activation email is sent from matrikon click the link provided in the email use your email address as your user name, and the password you provided in the form as your password for the http //www matrikonopc com/portal http //www matrikonopc com/portal url click download now the matrikonopcsimulation exe file downloads to your hard drive install the matrikonopcsimulation file from the matrikon search bar, enter matrikonopc explorer download , and click search click the matrikonopc explorer download link from the download page, click download now install the matrikonopcexplorer filie the server configuration is by default you can add an alias configuration explorer is used to connect to the opc da server and browse the tags step 4 set up devicehub agent you can now set up the devicehub agent by connecting to the opcda server and devicehub in litmus edge to set up the devicehub agent open the devicehub agent exe file you downloaded from the main tab, click the add box the add connection dialog box appears click the detect icon the servers are detected and appear in the opcda server drop down list the opcda host is localhost because the opc da server is installed on the same machine as litmus edge select an option from the opcda server drop down list configure the server settings section host enter the ip address for your litmus edge instance port the port value should be the same one configured for the devicehub agent device in litmus edge device name enter the device name you configured for the devicehub agent device in litmus edge api key paste the api key created in step 2 click ok the opc da driver is added in the devicehub agent in another tab, and the tags for the selected server are viewable in the tags box click the connect icon the devicehub agent connects to devicehub in litmus edge return to the litmus edge instance and navigate to devicehub confirm that the devicehub agent tile shows a connected status if you need to remove a connection in the devicehub agent application, select the tab for the connection you want to remove and go to connections > remove connection step 5 connect the opc da explorer you will need to connect the opc explorer to the simulation and testing tool to connect the opc da explorer open the matrikonopc explorer under the localhost entry in the hierarchy, click the matrikon opc simulation 1 entry if you get the error message "matrikon opc explorer machine is not browsed", go to view > options > general and select the registry check box in the opc server browsing section click the connect button connection information appears in the server status section step 6 send tags to devicehub you can send tags from the devicehub agent applicaiton directly to devicehub in litmus edge this is the recommended method to add tags to the devicehub device to send tags to devicehub make sure the devicehub agent is disconnected from devicehub select the check box for tags you want to send alternatively, you can use the select all tag s and unselect all tags icons click the connect icon to connect to devicehub in litmus edge click the csv icon and select send tags a message displays that the tags were successfully sent you can also add tags to the devicehub device in the following ways use browse tags docid\ ml 1dnqkd6d zhzbe7qmw use the export csv option in the devicehub agent application then, follow add tags docid\ xgwokqbtpevii7or82ll0 step 7 view tag data you can use the flows manager docid bvxnzlgo8fsoglib4o l or analytics docid\ zaowl1npjlkefhjbxhgvu in litmus edge to view the tag data to view tag data in the flows manager in litmus edge, navigate to devicehub > tags select the devicehub agent device click the copy icon for the tag you want to view navigate to the flows manager and create a new flow see create a flow docid\ veyyte7xdcangglzbqya0 to learn more drag the datahub subscribe and debug nodes to the canvas and wire them together double click the datahub subscribe node in the topic field, paste the tag id you copied earlier if needed, configure the datahub subscribe connection see the "step 3 configure connector nodes" section in create a flow docid\ veyyte7xdcangglzbqya0 to learn more click done , and then deploy click the debug icon drag the message window up and review the messages a "success" true message confirms the connections is successful to view tag data in analytics in litmus edge, navigate to analytics click add processor and select datahub subscribe in the topic field, paste the tag id you copied earlier click save click the view icon review the messages a "success" true message confirms the connections is successful