Page 1
User manual netFIELD sensorEDGE Hilscher Gesellschaft für Systemautomation mbH www.hilscher.com DOC200601UM01EN | Revision 1 | English | 2021-09 | Released | Public...
Page 3
Table of contents 3/166 Querying sensorEDGE data via netFIELD Cloud WebSocket API services ..... 55 Overview ........................ 55 Monitor data with Node-RED .................. 57 Structure of JSON messages.................. 70 6.3.1 Data message.................... 70 6.3.2 Health message .................... 73 Code examples for querying data via WebSocket ............ 76 Local Device Manager ......................
GUI (Local Device Manager) and of the sensorEDGE Management Internet Portal. Instructions on how to visualize and monitor sensor data via the Portal’s dashboards or via netFIELD Cloud WebSocket API services are also provided here. List of revisions...
(including the IO-Link Configurator). The Local Device Manager is the user interface to the netFIELD OS, which is the operating system of the sensorEDGE device. Ethernet connector for uplink to the Internet and access to the Local ·...
Device Manager in the Portal (see section Device Details page [} page 121]). Alternatively, the interval can also be set in the Local Device Manager under netFIELD App IO-Link Configurator > Dashboard > Payload > Refresh interval (see section IO-Link Configurator Dashboard [} page 99]).
Ø Login to the Local Device Manager as described in section Login to Local Device Manager for advanced configuration [} page 46] Ø In the navigation panel, click netFIELD App IO-Link Configurator. Ê Missing IODDs are indicated in the Live View of the Dashboard of the IO-Link Configurator: Figure 31: Missing IODD in Live view...
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 55/166 6 Querying sensorEDGE data via netFIELD Cloud WebSocket API services Overview The sensorEDGE streams (or “publishes”) the process data and health information of the connected sensors via two MQTT topics, i.e. Data and Health.
Page 56
Dashboard Manager [} page 125]). However, if you do not want to use the Portal’s Dashboard Manager, you can query the sensorEDGE Data and Health topics via netFIELD Cloud WebSocket API services with your own application(s). This chapter provides information on how to access the data streams of the sensorEDGE via WebSocket interface of the netFIELD Cloud backend API api.netfield.io.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 57/166 Monitor data with Node-RED Overview This section provides an easy-to-follow example of how to access the data stream of the sensorEDGE with Node-RED via the WebSocket interface of the netFIELD Cloud backend API api.netfield.io.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 58/166 Ø In the Install tab of the Palette, enter netfield into the search field to search for node-red-contrib-netfield-websocket (Node-RED nodes for Hilscher 'netFIELD Cloud' WebSocket API services). Figure 38: Install netFIELD WebSocket nodes Ø...
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 59/166 Ø Double-click the node to open its Properties in edit mode. Figure 40: Editing netFIELD WebSocket node Ø Click the pen icon next to the Websocket field. Figure 41: Properties of netFIELD WebSocket node Ø...
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 60/166 Ø In the sensorEDGE Portal, open the API Key Manager, create your API Key (if not done already) and copy it to your clipboard (see section API Key Manager [} page 144] for details).
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 61/166 Ø Go back to the sensorEDGE Portal, open the Device Manager and look for the specific sensorEDGE device from which you want to fetch data in Node-RED. Click on the sensorEDGE device in the list to open its details page, then copy its Device ID to your clipboard.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 62/166 Ø Go back to the device details page of the Device Manager in the Portal and copy to your clipboard the topic that you want to monitor/visualize in Node-RED. In our first example, this is the Data topic containing the measurement data from all sensors connected to the sensorEDGE device.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 64/166 Ø Double-click the debug/msg.payload node to open its Properties dialog in order to give it a meaningful name, e.g. “Telemetry payload”: Figure 49: Rename telemetry debug node Ø Click Done to close the Properties dialog of the Debug node.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 65/166 5. Add a node for Health data. Ø Drag and drop the netFIELD websocket in node a second time into your flow again. Figure 51: Add Health node Ø Double-click the node to open its Properties in edit mode.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 66/166 Ø In the # Topic field paste the topic string from the Portal; this time, however, copy and paste the Health topic string: Figure 53: Copy health topic string in Portal Ø...
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 67/166 6. Add another debug node. Ø Drag and drop a second debug node into the flow and connect it to the Health data node. Figure 55: Health flow added Ø Double-click the debug/msg.payload node to open its Properties in order to give it a meaningful name, e.g.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 68/166 7. Monitor the health data. Ø Click the Debug button to open the Debug tab. Figure 57: Debug tab Ê If the filter in the debug tab is set to all nodes, the payload data of both nodes is displayed.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 69/166 Ø In the Debug tab, click to expand the hierarchical elements within a message to see the health diagnosis of a certain sensor; e.g. payload object > data > Messages > 1 > Payload > health/ healthscore.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 70/166 Structure of JSON messages 6.3.1 Data message This section shows an example of a data object message in JSON format sent from the sensorEDGE device to the sensorEDGE cloud. The sensorEDGE device “bundles” the current data values from its connected sensors in an array and sends them to the cloud in a single JSON object message.
Element Description "topic" MQTT topic (UTF-8 coded) "PublisherId" ID of the instance in the sensorEDGE device (i.e. the netFIELD App OPC-UA IO-Link Adapter) that published the data to the MQTT message bus. "Messages" Array of messages containing the IDs and values retrieved from the connected sensor(s).
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 73/166 6.3.2 Health message This section shows an example of a Health message in JSON format sent from the sensorEDGE device to the sensorEDGE cloud. The sensorEDGE device “bundles” the current health information from all its connected sensors in an array and sends it to the cloud in a single JSON object message.
Description "topic" MQTT topic (UTF-8 coded) "PublisherId" ID of the instance in the sensorEDGE device (i.e. the netFIELD App OPC-UA IO-Link Adapter) that published the data to the MQTT message bus. "Messages" Array of messages containing the retrieved health information of the connected sensor(s) and of the netFIELD App OPC-UA IO- Link Adapter.
Querying sensorEDGE data via netFIELD Cloud WebSocket API services 76/166 Code examples for querying data via WebSocket Code examples of a simple Javascript and Python programs that allow you to connect to the WebSocket server in the cloud and consume the data...
In the navigation panel on the left of the screen, you can select the available management and configuration pages. Shows the firmware version of the operating system (netFIELD OS). Main screen displaying the management page that you have selected in the navigation panel.
To match the required format, the Hardware ID may be “filled up” with zeros. Operating System Name and version of the installed operating system (netFIELD OS). Click on the blue name to open a window showing further details (i.e. the exact firmware version).
Page 81
This is the reason why the SYS LED, the 1L power LED and the IO- Link port LEDs remain on after using this function. If you have shut down the netFIELD OS, you can restart it by manually performing a full power cycle (briefly disconnecting the voltage supply).
The graphs in the area on top show the amount of network traffic (sending and receiving) for the last five minutes. Firewall The Firewall is a service available to all Hilscher devices of the netFIELD product portfolio that are based on the netFIELD OS. If configured accordingly, the embedded firewall restricts access between different network interfaces and takes control over the packets processed by the embedded device.
This is a “bridge” that was automatically created by the netFIELD OS after “onboarding” the device. Do not change the settings of this interface! cifx0: This is an internal interface connecting the communication controller to the netFIELD OS.
Page 85
The Network Proxy section shows the HTTP/HTTPS/FTP proxy server settings of your device. Note that the No Proxy URIs localhost and 127.0.0.1 are “internal” destinations in the netFIELD OS and are therefore not to be addressed via Proxy server. They appear as No Proxy entries by default, even if you did not configure any Proxy server for your device.
Proxy server. By default, these are localhost and 127.0.0.1, which are “internal” addresses of the netFIELD OS and are therefore not to be handled by a proxy server. The localhost and 127.0.0.1 entries appear in the No Proxy list even if you did not configure any Proxy Server for your device.
Do not change or remove the localhost and 127.0.0.1 entries in the No Proxy section. These are “internal” addresses of the netFIELD OS that cannot be handled by a proxy server because they are required for internal communication. You can, however, add further exceptions in the Host field.
OS immediately or specify a delayed restart. Ø Click Manual restart later if you want to restart the netFIELD OS later on the System page (System > Power Options > Restart). If you choose this option, do not forget to restart later, otherwise the netFIELD OS will not be able to communicate via your new proxy server settings.
Note: With a SSH key pair (private and public key), you can login (e.g. with a terminal program like PuTTY) to the netFIELD OS SSH shell by using your private key. The password is replaced by the private key, and you only have to specify a valid netFIELD OS account name (e.g.
System Update 7.6.1 Operating System On the Operating System tab, you can update the netFIELD operating system (netFIELD OS) of the sensorEDGE device via local access. Note: The OS can also be updated via the software update function in the Device Manager of the sensorEDGE Portal (see section Device Details page [} page 121]).
Figure 80: netX 90 Firmware update page To update the netX 90 firmware, proceed as follows: 1. Download the netX 90 firmware ZIP archive file from Hilscher (contact Hilscher support for instructions). 2. Upload the ZIP archive file from your local PC to the device.
Logs The Logs page allows you to monitor the messages produced by the systemd journal of the netFIELD OS. Ø In the drop-down lists in the header, you can filter the messages by time/date, Severity (type) and Service (i.e. the “service” that issued the message).
IO-Link Configurator 7.8.1 Overview The netFIELD App IO-Link Configurator allows you to manage and monitor connected IO-Link sensors. The app is automatically downloaded and started on your sensorEDGE device after you have paired your device (“onboarded”) with your account in the sensorEDGE Portal.
Page 122
API key with your own custom application. You can use the button to copy the topic name string(s) to your clipboard, from where you can paste it into your application. See also section Querying sensorEDGE data via netFIELD Cloud WebSocket API services [} page 55]. Data This topic contains the published “payload”...
Device Manager in the Portal (see section Device Details page [} page 121]). Alternatively, the interval can also be set in the Local Device Manager under netFIELD App IO-Link Configurator > Dashboard > Payload > Refresh interval (see section IO-Link Configurator Dashboard [} page 99]).
Device Details page of the Device Manager in the Portal (see section Device Details page [} page 121]). Alternatively, the interval can also be set in the Local Device Manager under netFIELD App IO-Link Configurator > Dashboard > Payload > Refresh interval (see section IO-Link Configurator Dashboard [} page 99]).
Device Manager in the Portal (see section Device Details page [} page 121]). Alternatively, the interval can also be set in the Local Device Manager under netFIELD App IO-Link Configurator > Dashboard > Payload > Refresh interval (see section IO-Link Configurator Dashboard [} page 99]).
Note: API keys enable and regulate the access of customer applications to the functions and services of the Hilscher netFIELD Platform. The web services of the platform can be accessed under api.netFIELD.io With the API key, you can query the sensor’s data from the netFIELD Platform via WebSocket with your own application(s).
Shows the string of the API key which is used for authentication when accessing the API function(s) of the Hilscher netFIELD Platform. This string must be securely stored in the back-end of the customer application and must be passed as an "access...
Ethernet LAN interface (eth0) in the Local Device Manager. If you require a recovery of your sensorEDGE device, contact Hilscher support via email at support@hilscher.com or via contact form on https://www.hilscher.com/support/contact/.
Page 156
HILSCHER netFIELD Source Code/ Software LICENSE AGREEMENT. netFIELD OS may include 3rd party software or software declared as Open Source. The licensing information of all included software components are provided in textual form in the netFIELD OS under the folder /usr/share/common-licenses and subfolders.
Page 157
Liability disclaimer The hardware and/or software was created and tested by Hilscher Gesellschaft für Systemautomation mbH with utmost care and is made available as is. No warranty can be assumed for the performance or...
Page 158
Additional guarantees Although the hardware and software was developed and tested in-depth with greatest care, Hilscher Gesellschaft für Systemautomation mbH shall not assume any guarantee for the suitability thereof for any purpose that was not confirmed in writing. No guarantee can be granted whereby the...
Page 159
The customer hereby expressly acknowledges that this document contains trade secrets, information protected by copyright and other patent and ownership privileges as well as any related rights of Hilscher Gesellschaft für Systemautomation mbH. The customer agrees to treat as confidential all of the information made available to customer by Hilscher Gesellschaft für...
Page 161
List of figures 161/166 Figure 41: Properties of netFIELD WebSocket node............. 59 Figure 42: Copy API Key in sensorEDGE Portal ..............60 Figure 43: Paste API Key in Node-RED ................60 Figure 44: Copy Device ID in sensorEDGE Portal ..............61 Figure 45: Paste Device ID in Node-RED................
Need help?
Do you have a question about the netFIELD and is the answer not in the manual?
Questions and answers