SmartSwarm 300 Series 1. INTRODUCTION SmartSwarm 351 is an IoT Gateway appliance powered by B+B SmartWorx SmartSwarm technology. It is intended for use in applications where users need to pass data from legacy Modbus RTU installations into an IoT platform or application, but who can’t tolerate any disruption to the Modbus system in order to achieve this.
SmartSwarm 300 Series 1.1 WHY ENRICH DATA? Modbus data is impossible to interpret without very detailed knowledge of the devices producing the data and the sensors connected to them. Anyone looking at Modbus data can see that the value of unit 31, register 40075 is 2397 –...
SmartSwarm 300 Series 2. DOCUMENT STRUCTURE This document is organized in accordance with the following flow. Connect your Hardware Configure your device’s connectivity to Configure the Modbus interface Configure the MQTT interface Build your Slave Maps Configure Rules and Topics...
Page 14
SmartSwarm 300 Series The next chapter walks through an example workflow. This workflow is intended to be an example of how to get your Modbus data publishing to an MQTT server quickly, without getting stuck in the details. The remaining chapters will provide the necessary details.
SmartSwarm 300 Series 3. EXAMPLE WORKFLOW In this section we will walk through an example workflow. 3.1 CONNECT YOUR HARDWARE First, ensure that your hardware is physically connected. Connect your antennae to the ANT and DIV connectors. Insert a valid and data-provisioned SIM card into SIM 1. In this example we will assume that your outbound WAN connection will be using a cellular connection.
Page 16
SmartSwarm 300 Series That’s all you need to do: The device will now attempt to (a) make a WAN connection using the cellular network; then (b) make a secure connection to SmartWorx Hub (on hub.bb-smartworx.com). When (a) is successful, the WAN LED will turn on (yellow).
Page 17
SmartSwarm 300 Series Open a browser page, and login to SmartWorx Hub on https://hub.bb-smartworx.com. In this example, we assume that (a) you have an account to login with SmartWorx Hub, and (b) you are using the cloud instance of SmartWorx Hub to manage your devices.
SmartSwarm 300 Series Go to the “Devices”->”Claim Device” screen to bring your new SmartSwarm Device into your Device farm. Type in your Device’s Device-ID (this is written both on the Device itself and on the box that you took your Device out of) and select ‘Check Device ID’...
Page 19
SmartSwarm 300 Series Now configure the Modbus Settings so that they match the actual Modbus configuration of your Modbus network. Apply the changes.
SmartSwarm 300 Series 3.4 CONFIGURE THE MQTT INTERFACE Select MQTT from the list on the left hand pane and configure your MQTT interface. We assume that you already have an MQTT broker that you can publish to. In our example we know we have an...
SmartSwarm 300 Series In this example we are not configuring any security in the MQTT interface. We recommend that you use “no security” only until you have verified your connection and data-flow. If you do not apply transport layer security settings, your data will be published to the MQTT server in plaintext.
SmartSwarm 300 Series 3.5.1 DISCOVER YOUR SLAVES Using the “Discover” option, you can let the SmartSwarm device self-learn the Modbus slave network. Actually, your SmartSwarm device has been self-learning already. Your device has been physically connected to the Modbus network since the beginning of this workflow. The Modbus configuration settings were deployed to the device in an earlier step.
SmartSwarm 300 Series In our example, only one Slave device has been discovered on the Modbus network. In this case the discovered slave is at address 1. We will refer to this slave as “Slave 1” later. Although not shown in this example, you can now edit this slave, and enrich the discovered slave data.
Page 24
SmartSwarm 300 Series In our example we are going to load a pre-prepared slave-map from a template file. To create the pre-prepared slave-map we took the datasheet of a slave device (an Emerson Liebert nFinity UPS), and we populated the Template accordingly.
SmartSwarm 300 Series Table 1. Example Modbus Slave Datasheet for Discrete Inputs We derived the following “Inputs” Excel sheet information from this datasheet, using the provided Excel template. Table 2. Example Excel sheet data derived from Slave Datasheet (Inputs)
SmartSwarm 300 Series NOTE that the address field in our template is declared as the offset from the base address of the register type. In our example the device uses the 10,xxx range for its Input Status registers. (Other devices may use 10x,xxx.) So the first IS register (10,001) corresponds to offset 0.
SmartSwarm 300 Series Table 4. Example Excel sheet data derived from Slave Datasheet (Input Registers) Next, optionally fill in the “Meta” data in the Excel sheet: Table 5. Example Excel sheet Meta Data Now, we’re going to import this pre-prepared Excel file into SmartWorx Hub.
SmartSwarm 300 Series Don’t forget to Apply Changes. 3.5.3 EXPORT SLAVE MAPS Once you have Slave Maps on your system - whether you created them manually, imported them, or discovered them and subsequently enriched them - you can then export them.
Page 29
SmartSwarm 300 Series In our example there were some Input Registers discovered on Slave 1 during the “discovery” stage. Go to the Input Registers tab, and enrich the registers. In our example we’re enriching the slave’s input register data from the slave’s datasheet (an Emerson power monitoring UPS).
Page 30
SmartSwarm 300 Series There’s a line entry in this table for every discovered register on this Slave (even for the non-enriched registers). The MQTT Topic has taken custom values, which are derived from the Meta data. You may leave these as-is, or you may override the custom-defaults and define an MQTT topic for every register-rule.
SmartSwarm 300 Series Publish using the defined MQTT Topic “Server_Room/Power_Monitor/Liebert”, but do not also publish on the “Default Topic” (see chapter 10). Save Rules next: This saves your enrichment and rules to the SmartWorx Hub database. Push Rules now: This applies the entire enrichment, including the defined event rules, to the device.
Page 32
SmartSwarm 300 Series We recommend that you choose appropriate MQTT topics for your Slave registers, which enable ease-of- use for your solution domain. By defining your Topics carefully, you can enable ease-of-consumption of the data. In some cases, you will want to consume the data on dashboards.
SmartSwarm 300 Series 4. CONNECT YOUR HARDWARE 4.1 MOUNTING THE DEVICE The unit may be mounted in any orientation. It can be simply placed on a flat surface, or it can be DIN rail mounted using the supplied CKD2 holder.
SmartSwarm 300 Series 4.2 POWER CONNECTOR PWR Panel socket 2-pin Ident Description GND(-) Negative pole of DC supply voltage VCC(+) Positive pole of DC supply voltage (+10 to +60 V DC) Table 6. Power connector The unit accepts the connection of power supplies in the range +10 V to +60 V DC. Protection against reverse polarity connection is built into the device.
SmartSwarm 300 Series Signal Mark Description Data Flow Direction TXD+ Transmit Data – positive pole Input/Output TXD- Transmit Data – negative pole Input/Output RXD+ Receive Data – positive pole Input/Output — — — — — — RXD- Receive Data – negative pole Input/Output —...
SmartSwarm 300 Series Connector Purpose Default Setting ETH0 LAN port (default) DHCP Server Connect your laptop or PC to this IP Address: port to get a local web-server for 192.168.1.1 device configuration and NetMask: diagnostics. 255.255.255.0 ETH1 WAN port (default)
SmartSwarm 300 Series 4.4.2 SIM CARD READER Two SIM card readers for 3 V and 1.8 V SIM cards are placed on the rear panel of the device. Only the first of these (SIM1) is currently supported by SmartSwarm 351. In order to operate on a cellular network it is necessary to insert an activated, data enabled SIM card with an unblocked PIN code.
SmartSwarm 300 Series 4.5 RS-232 RS-485 SERIAL INTERFACE - CONNECTION TO MODBUS NETWORK These interfaces are physically connected on five-pin and four-pin terminal block connectors on the front panel. The insulation strength is up to 2.5 kV. Attention, connectors are not isolated from each other and share a common ground pin.
SmartSwarm 300 Series Transmit + (Do not connect) Output Receive - Input Receive + Input Table 9. RS-485 pinout NOTE: this device will only operate in Passive (receive-only) mode. It is not possible to configure it as a Modbus Master, or for it to transmit on the Modbus network.
SmartSwarm 300 Series Input — Input Output Table 10. RS-232 pinout In order to operate on RS-232 based Modbus RTU networks, it is necessary to arrange for the SmartSwarm 351 to receive information from both the RS-232 Transmit and Receive signals, in order that it can monitor both the Modbus commands and the corresponding replies.
If there is no alternative to tapping into a 4-wire circuit, then the safest way is to use an RS-232 data tap as outlined above, and connect an RS-232 to RS-422 (or 4-wire RS-485 as appropriate) converter on either side of the data tap. Advantech B+B SmartWorx offers a range of such converters. Please determine the most suitable combination for your application.
SmartSwarm 300 Series Green Reset button pressed or the device is booting Ready for operation. SIM 1 is enabled Yellow There is no cellular connection between the SmartSwarm device and the cellular service provider A cellular connection has been successfully established between the...
SmartSwarm 300 Series 5.1 STEP 1 - CONNECT TO LOCAL WEBSERVER Connect a local laptop or desktop PC to ETH0. Open a browser and navigate to 192.168.1.1. Note that if you have another LAN connection (e.g. via Wi-Fi) you may need to disconnect this second session, depending upon your network settings and the domain of the LAN.
SmartSwarm 300 Series If a configuration for the device has already been created in SmartWorx Hub it will be automatically downloaded to the device during this first connection. 5.5 FACTORY DEFAULTS If the unit is not connecting as expected it may be reset to Factory Defaults at any time by pressing the Reset...
SmartSwarm 300 Series 6. SMARTSWARM 351 ON SMARTWORX HUB Once you have Claimed your Device on SmartWorx Hub you may edit and configure it. If your device is currently offline, all changes you make are queued. All of your changes will be immediately applied as soon as the device comes online.
SmartSwarm 300 Series From here you may select the name of the application (“Modbus-to-MQTT”) in order to configure the Modbus-to- MQTT Application. 6.2 THE MODBUS-TO-MQTT APPLICATION The settings for the Modbus-to-MQTT application are split into 3 functional areas: Functional Area...
SmartSwarm 300 Series Table 12. The Modbus to MQTT application 7. CONFIGURE THE MODBUS INTERFACE When configuring the Modbus interface, please ensure that you match the Modbus Master configuration on the Modbus network you are monitoring. Setting Description Port RS-232 or RS-485.
The data published will be in accordance with the Rules and Topics that you will define for your Modbus environment: see chapters 9 and 10. The MQTT Broker is a 3rd party service: Advantech B+B SmartWorx does not provide this service. Any MQTT 3.1.1 compliant broker may be used.
Page 49
SmartSwarm 300 Series Setting Description Host Enter the IP address of the MQTT broker. This is the address that the SmartSwarm 351 will publish MQTT Topics to. Port TCP/IP port used by the MQTT broker. The default port for MQTT is 1883 When TLS is enabled the default port is 8883.
Page 50
SmartSwarm 300 Series Username/Password Username and Password fields may be used to authenticate and authorize the client when connecting. These fields are optional: If you setup your MQTT broker to require them, then you will require them here also. The password is sent in plaintext if it isn’t encrypted or hashed by implementation, or if TLS is not used.
SmartSwarm 300 Series Enable TLS Enable TLSv1.2 as the secure transport layer. Security settings must match the broker settings. Client Certificate Valid X.509 Certificate containing the client’s public key. This certificate will be sent to the broker when the SSL/TLS session is established.
SmartSwarm 300 Series The Quality of Service level is an agreement between sender and receiver of a message regarding the guarantees of delivering a message. There are 3 QoS levels in MQTT: ● At most once (0) ● At least once (1) ●...
SmartSwarm 300 Series 9. SLAVE MAPS AND ENRICHMENT If you have some knowledge of the Modbus network that is being sniffed, you can “enrich” the Modbus data by telling the SmartSwarm device how to interpret these addresses and substitute some more meaningful strings.
Page 54
SmartSwarm 300 Series The “Decoder” interface screen displays all the Modbus Slaves currently known by SmartWorx Hub for this device. When you first use SmartWorx Hub to enrich your new SmartSwarm device the list of Slaves will be empty.
SmartSwarm 300 Series Option Method Description Export Maps Export your current maps. All of your existing Slave Maps will be exported to a .zip archive file. All maps are exported in .json format. There is one map file for each Slave.
SmartSwarm 300 Series 9.1 DISCOVER In Discover Mode you simply wait for your device to learn the network. The time you need to wait depends on the configuration of the Modbus Master. After waiting for an appropriate period of time, click on “Sync Maps”. This will pull the learned information into SmartWorx Hub.
SmartSwarm 300 Series You will now be able to edit these maps to add enrichment data and events. See Chapters 9.4, 10 on how to do this. 9.2 CREATE AN EMPTY SLAVE MAP Clicking on New Map allows you to enter an empty slave map. Enter a slave number between 1 and 247 and click OK.
SmartSwarm 300 Series 9.3 IMPORT A SLAVE MAP You may import a complete set of pre-prepared Slave and Register information, complete with full enrichment. If you wish to do this we recommend that you begin by exporting as much of the mapping information as you can from your Modbus control system.
SmartSwarm 300 Series 9.4.1 UNDERSTANDING YOUR SLAVE EDITOR Editor Button Description Save Save all current changes to the SmartWorx Hub Database. Use this button when you want to save your current edits, but you don’t wish to push your edits to the device just yet.
SmartSwarm 300 Series Holding Registers (4x) Rules and Topics Save Rules Rules and Topics Save all current rules/events changes to the SmartWorx Hub database. Use this button while you’re still editing your Rules and Topics. Push Rules Rules and Topics Push all existing (saved) rules/events to the SmartSwarm device, so that they can take effect.
SmartSwarm 300 Series Location location User-defined text e.g. Warehouse/Room401 Manufacturer manufacturer User-defined text (Usually the manufacturer of the slave) Name name User-defined text e.g. AHU Fan Product Code product_code User-defined text e.g. Wil-Flex-450 Byte Order value_byte_order This is how Floating Point and 32-bit data is ordered when it is transmitted by the slave within the register.
Page 62
SmartSwarm 300 Series On SmartWorx Hub, for each register type, the address entered corresponds with the Modbus register offset for that specific register type. E.g. Holding Register address 5 corresponds to register 400006 Click on the appropriate tab to view registers.
Page 63
SmartSwarm 300 Series Name name A description of the register function e.g. Energy Meter The Name field is not used for any algorithmic purpose within the Device: it will become part of the enrichment-data published for this Register. Alias alias An alternate name for the register e.g.
Page 64
SmartSwarm 300 Series The expected Minimum Enriched value for this register. For example, if we know that the register value represents temperature with a minimum value of 0 degrees Celsius, the value entered here would be “0”. This Min field value is not used for any algorithmic purpose within the Device.
SmartSwarm 300 Series Str Value This field is only relevant for Enum data types. The Str Value field enables us to specify a string value that we can use to add contextualized meaning to each relevant state of bit-field data.
Page 66
SmartSwarm 300 Series From the graph, we can calculate the slope as 10 − 0 = = 0.00305 4095 − 819 The Scaling factor is the inverse of this. It can also be thought of as the “One in X” gradient of the graph.
Page 67
SmartSwarm 300 Series 0 − = 819 − 0 = − 819 = −2.5 We can repeat this same example using an Enriched Value in degrees Fahrenheit instead of degrees Celsius. The register value ranges from 819 to 4095, corresponding to a temperature range of 32 to 50F.
SmartSwarm 300 Series The Zero Value is where the graph intersects the Y-axis. It can also be thought of as the Enriched value that corresponds to a Raw value of 0. 32 − = 819 − 0 ...
SmartSwarm 300 Series The nature of a counter also has implications for the type of event that can be triggered by it. See section “Events (WHEN)”. 9.4.5 ADDING REGISTERS To add a register click the icon. This will create a new row with the same values as the current row. Enter the Address and fill in the other fields as required.
Page 71
SmartSwarm 300 Series In the next example, Register 40 is also an ENUM type which uses the first 3 bits of the register. ● Bit 0 has 2 states: “Pump Off” and “Pump On”. ● Bit 1 has 2 states: “Normal Operation” and “Min Speed”...
SmartSwarm 300 Series ENUM data types this could alter the intended meaning of Modbus register. Unless you’re sure, we recommend leaving these fields in their default states (Zero Value = 0; Scaling = 1). In the above screenshot Registers 65 and 14 are ENUM types.
SmartSwarm 300 Series 10. RULES AND TOPICS 10.1 INTRODUCTION The SmartSwarm 351 converts Modbus data to MQTT. In the process it adds data enrichment, including scaling factors and meta-data. By default, all data is blocked and nothing is published on MQTT until you specifically allow it.
SmartSwarm 300 Series The published Payload data will have all of the enrichment data included. You then specify HOW you want the data to be published. For example, on what MQTT topic, with what QOS, etc. The Rules and Topics screen is visible as a Tab in the editor for each slave. For example: By default, only one event is displayed for each available register.
SmartSwarm 300 Series 10.2 EVENTS (WHEN) On any row in the Rules and Topics table, click the Event field to see the drop-down list of available events: Note: Only one instance of each event type should be added to a register. Adding multiple events of the same type will have no effect, as only the first instance of the event will take effect.
SmartSwarm 300 Series In SmartWorx Hub, when you select this Event type. No further configuration is required: 10.2.2 CHANGE Trigger a publish when an enriched register value changes. This event is applicable to any register type and any data type:...
Page 78
SmartSwarm 300 Series In SmartWorx Hub, when you select this Event type on an Input or a Coil, no further configuration is required. However, if it is selected on an Input Register or a Holding Register, an additional field appears at the top of the table: In the “Change by”...
Page 79
SmartSwarm 300 Series It is important to remember that the change is measured with respect to the last time the register was observed on Modbus, not to the last time it was published on MQTT. In the diagram above, the green bars represent the ±10% change that is dynamically calculated after each new sample is received.
SmartSwarm 300 Series The following example shows a numeric register that ramps monotonically from 0, incrementing by 1 on each Modbus master access. The red annotations show when MQTT publishes will be triggered, assuming that a Change rule is applied, with “Change by” = 10%.
SmartSwarm 300 Series Delta ✔ ✔ Table 29. Delta Event Note: As explained in the Counter section, a counter is always increasing. A drop in value is assumed to indicate a single roll-over event. Therefore, for an 8-bit counter (range 0 - 255), a change in value from 254 to 253 is an increase of 255, not a decrease of 1.
SmartSwarm 300 Series 10.2.4 HIGH THRESHOL D Trigger when the enriched register value increases above a fixed threshold. This event is only applicable to Input Registers and Holding Registers, not Discrete Inputs and Coils. It is applicable to numeric data types only. It is not applicable to a counter. A counter is a rollover data type and so we have no record of its true accumulated value on which to base the threshold.
Page 83
SmartSwarm 300 Series The following rules are STATEFUL: High Threshold, Low Threshold, High Rate, Low Rate. The following example shows a register that follows a sinusoidal waveform. The Modbus Master is polling the register every 200ms. Assume that a “High Threshold” rule is applied, with Threshold = 40 and Hysteresis = 5. The red dots show samples which are above the Threshold.
SmartSwarm 300 Series Note how 5 MQTT publishes are caused by the multiple threshold crossings. Using a bigger value for Hysteresis provides more noise rejection: 10.2.5 LOW THRESHOLD Trigger when the enriched register value decreases below a fixed threshold.. This event is only applicable to Input Registers and Holding Registers, not Discrete Inputs and Coils.
Page 85
SmartSwarm 300 Series When you select the Low Threshold event type on a register, you must enter two fields: ● The Threshold field specifies the value below which the register must decrease in order to trigger an MQTT publish. ●...
SmartSwarm 300 Series Notes: ● On start-up, if the first value is already below the threshold, that is considered a state transition. In this case, the first value of 0 will trigger an MQTT publish. ● When the value increases above the threshold (plus the hysteresis), we publish again.
Page 87
SmartSwarm 300 Series The Change value represents the instantaneous rate of change per second. The MQTT publish will only be triggered if the enriched register value has changed faster than this. NOTE: This rule is STATEFUL. For example, when the Rate Threshold is crossed in either direction an MQTT publish will be triggered.
Page 88
SmartSwarm 300 Series In the diagram above the green triangles represent the “10 per second” rate of change against which each new sample is compared when it is received. At the top and bottom of a sine-wave the rate of change is low, so the trigger condition is not met.
SmartSwarm 300 Series > The second sample (actually, the first pair of samples) will trigger an MQTT publish, because After this the system will remain in the “Alarm ON” state forever, because the rate of change is always greater than the threshold. No further MQTT messages will be published.
SmartSwarm 300 Series Inputs, Input Registers, Coils Holding Registers ENUM Numeric STRING COUNTER Low Rate ✔ Table 33. Low Rate Event As for “High Rate”, when you select the “Low Rate” event type on a register you must enter a “Change” value, which represents the rate of change per second: NOTE: This rule is STATEFUL.
SmartSwarm 300 Series As expected, we get the complement of the previous result for the “High Rate” case. The “Low Rate” event type is roughly equivalent to the “Low Threshold” event type, but it operates on the derivative of the waveform. However, note that there is no equivalent for Rate “Hysteresis”. This means that if the rate of change of a register happens to coincide with the selected Rate Threshold, timing jitter and/or process noise may lead to multiple MQTT publishes due to repeated state transitions.
SmartSwarm 300 Series 10.2.9 GLOBAL READ Trigger a publish when any register of the selected Type has been read (or written) by the Modbus master. This event is applicable to any register type and any data type. For a counter it returns the raw value of the register, not the accumulated value.
SmartSwarm 300 Series 10.3 PAYLOADS (WHAT) For every event type, you can decide WHAT to publish when that event happens. Payload Description Default Only the register that triggered the event will be published. Slave All registers on this slave will be published.
SmartSwarm 300 Series 10.3.1 PAYLOAD EXAMPLES 10.3.1.1 THE DEFAULT PAYLOAD With this rule, if the enriched value of Register 1 goes above 100 the payload for register 1 will be published. The published payload data will be in .json format.
Page 95
SmartSwarm 300 Series "type": "ModbusSlave", "id": "10_HR_1_HI" 10.3.1.2 THE HR PAYLOAD With this rule, if the enriched value of Register 1 goes above 100 the payload data for all Holding registers will be published. The num_value in the payload for each of the holding-registers will be the actual value last seen by the SmartSwarm device on the Modbus network.
Page 97
SmartSwarm 300 Series If there are no Input Registers, Discrete Inputs, or Coils defined for the slave, then there will be place-holders in the published JSON data schema to show where the data for those register values would be, if they existed.
Page 98
SmartSwarm 300 Series "IS": [], "IR": [] "meta": { "description": "Slave_1", "value_byte_order": "SNo", "name": "Power_Meter", "installation_date": "14\/07\/2016", "location": "Test_Rack", "address": { "DEVID": "6500004", "PORTID": 1, "SLAVEID": 10, "SWMID": 0 "manufacturer": "NA" "type": "ModbusSlave", "id": "10_HR_1_HI" Here’s an example payload when there are Holding Registers, Coils, Discrete Inputs and Input Registers defined (or observed) for the slave.
SmartSwarm 300 Series For every individual rule, the custom MQTT Topic, the Default Topic, or both, may be disabled. If you are using cellular for the uplink MQTT connection, you are probably limited by bandwidth and/or monthly data usage. The default behavior of the SmartSwarm 351 is for every Rule to publish on both the custom topic and the default topic.
SmartSwarm 300 Series ● If the slave Meta data is changed at some point in time the MQTT Topic string will NOT be automatically updated for any existing rules. This is to prevent problems for any MQTT clients which may have already been configured to subscribe to the old topic string.
SmartSwarm 300 Series If the Event is one of the STATEFUL types, then a State value of “OFF” or “ON” is appended. (i.e. For events of type High Threshold, Low Threshold, High Rate, Low Rate.) Because the default topic string can NOT be changed by the user, you can rely on the topic space hierarchy to be consistent across all devices, slaves, and rules.
SmartSwarm 300 Series 11. VERIFY YOUR DATA FLOW In order to verify your data flow, we recommend that you verify each step below. Step What to verify Reference Verify your physical connection to the Modbus bus. Section 4.5 Appendix 3 Verify that your SmartSwarm device has a secure connection to Section 4.3 and 4.4...
SmartSwarm 300 Series Verify the MQTT Topic that your events will be published on. Section 10 (Topics - HOW) Appendix 3 Table 40. Verify your Data Flow...
SmartWorx Hub User Manual https://hub.bb-smartworx.com/Login/Help?HelpFile=bbdms_help.pdf OpenVPN documentation https://openvpn.net/index.php/open- source/documentation/howto.html#client Table 41. Other Documentation 13. APPENDIX 1 - HARDWARE RATINGS 13.1 ENVIRONMENTAL IoT Gateway SmartSwarm 300 Temperature range Operating -40 to +75 deg.C Storage -40 to +85 deg.C Cold start -35 deg. C Data transfers via mobile network are available immediately ...
SmartSwarm 300 Series Antenna connectors 2 x SMA – 50 Ohm User interface 2x ETH Ethernet (10/100 Mbit/s) USB 2.0 (not currently supported) 6-pin panel socket (not currently supported) RS-485 4 pin panel socket RS-232 5 pin panel socket Table 42. Environmental 13.2 TYPE TESTS...
SmartSwarm 300 Series 14. APPENDIX 2 - GENERAL SETTINGS 14.1 CONFIGURABLE IT EMS For every SmartSwarm device, there are some general settings and options that are available to you. 14.1.1 SETTINGS The Network settings enable you to configure the operation of the ETH ports and the Cellular interface of your device.
SmartSwarm 300 Series We recommend that you do not change the ETH0 default settings. By default, ETH1 runs as a DHCP client. By default, the cellular interface is not configured. But note that you may have previously configured the Cellular Interface locally on your device.
SmartSwarm 300 Series At the time of writing, it is not possible to turn off the DHCP server that runs on ETH0. Please be careful not to connect ETH0 of the device into a LAN port that is also serving DHCP addresses.
Page 115
SmartSwarm 300 Series Before you begin to use an OpenVPN service, we recommend that you are familiar with the OpenVPN documentation, which is available here: https://openvpn.net/index.php/open-source/documentation/howto.html#client OpenVPN Enable Tunnel Enable or Disable this tunnel interface. Disabled by default. Protocol UDP or TCP (TCP is default)
SmartSwarm 300 Series The Private Key (for the Device) that is used to generate the Certification Request. The Certification Request is what you send to the Certification Authority. Table 47. OpenVPN fields When OpenVPN feature is enabled, the Client Key, the Client Certificate, and the CA Certificate will be sent to the Device.
SmartSwarm 300 Series 14.1.4 NTP CLIENT You may specify up to 4 network time protocol servers for this Device. 14.2 NON-CONFIGURABLE ITEMS 14.2.1 FIREWALL There is a built-in Firewall on your SmartSwarm device. This firewall cannot be re-configured by the user.
SmartSwarm 300 Series ✔ ✔ ✔ Tunnel* Table 48. Firewall rules Note that some Firewall exception rules will be applied automatically, depending upon whether you have configured OpenVPN. For example, the *Tunnel interface will only exist when you have enabled an OpenVPN...
This interface is intended to be used for two purposes: a) Configure the device’s outbound (WAN) connectivity (using either the Cellular interface, or ETH1). b) Diagnosing and Troubleshooting problems, in collaboration with the Advantech B+B SmartWorx technical support team. 15.1 THE LOCAL WEB INTERFACE There is an embedded web-server which provides a local interface on ETH0.
In the case your device is not performing as you think it should. When you’re working with the Advantech B+B SmartWorx technical support engineer, he may ask you for some of the details that are available from this Tab.
SmartSwarm 300 Series 15.1.4 HUB CLIENT Using this tab, you can change the default SmartWorx Hub Server instance that your device connects. By default, your device will connect to hub.bb-smartworx.com using https on port 443. If, for example, you have a hosted instance of SmartWorx Hub, you can change your devices’ settings to connect to your hosted instance instead.
SmartSwarm 300 Series 15.1.6 LOGS The SmartSwarm device will keep debug message logs internally. During the troubleshooting session it may be important to open the Logs tab, and to take a copy of the messages from one of the debug-logs available.
SmartSwarm 300 Series 15.1.8 DEBUG AND AGENTS It’s best to use the Debug and Agents Tabs in conjunction with each other. In the Debug Tab you can see some static debug information and you can select which Agent(s) you wish to see...
Page 125
SmartSwarm 300 Series In the Agents tab you can see run-time information (output) from the enabled Application Agents. Note that, even if an Agent has been “enabled” on the Debug Tab, it will only appear on the Agents Tab if there is...
SmartSwarm 300 Series In the screenshots shown here we have enabled the ALB002 Agent for debug purposes. You can use the ALB002 Agent to verify that your Serial Interface is configured correctly. If you enable Debug on Agent ALB002, and your serial interface settings are correct, you should see data streaming for ALB002 on the Agents Tab.
Page 127
SmartSwarm 300 Series This is provided so that you can verify your data-flow and data-enrichment process. If you see data streaming through the TSED interface you will know that your complex Events are triggering successfully, and there will be data published to the MQTT interface.
SmartSwarm 300 Series 16. APPENDIX 4 - SLAVE MAP FORMATS Maps may be imported in JSON or Microsoft Excel formats. These files are available for download from SmartWorx Hub. 16.1 EXCEL Excel can be used to create slave maps. Download the map template file directly from SmartWorx Hub.
SmartSwarm 300 Series Item Description DEVID Serial number of the SmartSwarm 351 device which can be found on the device label PORTID 0 when interface is RS-232 1 when interface is RS-485 SLAVEID The number of the slave (1 - 247)
Page 130
SmartSwarm 300 Series Example of the CS (Coils) Tab: Example of the IS (Discrete Inputs) Tab: After completing the sheet, save the sheet with an appropriate filename (e.g. map-2.xlsx). This file can now be imported into SmartWorx Hub by clicking the Load Maps link.
SmartSwarm 300 Series 16.2 JSON The alternative import-map format is JSON format. This section will show some examples of appropriate JSON formatted input maps. The JSON map below is a minimal example of a slave map with no registers defined.
Page 132
SmartSwarm 300 Series To add an Input register to the map insert the following under the IR section. To add another register, repeat the section separated by a comma. "IR": [ "address": "3", "name": "Power Consumption", "datatype": "UINT16", "length": "16", "zero_value": "0",...
SmartSwarm 300 Series "address": 40, "address_offset": 2, "name": "Pump Command", "alias": "", "datatype": { "enum_type": { "num": [ "val": [ "Normal Operation", "Max Speed" "length": 1, "zero_value": null, "max": null, "min": null, "scaling": null, "units": "", "state": "VALIDATED" It is recommended that JSON maps be validated using an online JSON formatter. It is difficult to find errors, especially when the maps contain a large number of registers.
SmartSwarm 300 Series There are a number of ways to specify the addresses of registers in the slave device. SmartSwarm 351 uses the convention of a base register type (Coil, Status, Input or Holding) and an offset, starting from zero, within that register type.
SmartSwarm 300 Series * For output command types, the unit interprets these as inputs to the IoT enrichment process. It does not support output of data from the IoT system. The following types of data recovered in Modbus registers can be interpreted and decoded by SmartSwarm 351:...
SmartSwarm 300 Series 17.2 MQTT BACKGROUND MQTT (Message Queuing Telemetry Transport) is a transport protocol originally developed in 2001 by IBM and Arcom specifically to address the need for reliable, pushed data delivery for M2M systems over unreliable networks. It has subsequently been released as open source, ratified by OASIS as an open standard for IoT...
SmartSwarm 300 Series ● A '#' character represents a complete sub-tree of the hierarchy and thus must be the last character in a subscription topic string, such as SENSOR/#. This will match any topic starting with SENSOR/, such as SENSOR/1/TEMP and SENSOR/2/HUMIDITY.
Page 138
SmartSwarm 300 Series manner. This allows applications to understand the difference between a unit which is not publishing data because nothing has happened, and one which is not publishing data because it has failed – a critical requirement for push based messaging systems.
We can also visualize the published data using dashboards such as Freeboard Node-RED UI Please note that Advantech B+B SmartWorx does not offer Dashboarding software: This section is for example purposes only. 18.1 NODE-RED Using Node-RED, a dashboard can be quickly created to display your MQTT data.
Page 140
SmartSwarm 300 Series ● Once you have configured the MQTT node, click Deploy. Check that the MQTT payload is being received by clicking on the debug node. The output will be printed in the debug tab. ● Add the following nodes and connect as per diagram below Topics is a switch node which gives multiple outputs based on rules.
Page 141
SmartSwarm 300 Series SP and PC are JSON nodes which transform the input into a JSON object.
Page 142
SmartSwarm 300 Series Transform is a Template node which allows us to select the payload property as an input to another node. In this case, num_value is the payload property that we want. The template will depend on the Register type and, in the case of multiple registers, the index of the register within the register array.
SmartSwarm 300 Series rpm is a Gauge node on which we will display the Oranmore/Pump/P1/SP topic. Click the pencil icon to create a new tab called Example. This will be the name of the menu on our page which we will click to view the dashboard.
SmartSwarm 300 Series Power is a chart node on which we will display the Oranmore/Pump/P1/PC topic. Fill in the other fields as per the diagram below and click Ok. In this case we choose the Example Tab, so it is available under the same menu as the gauge control.
Page 145
SmartSwarm 300 Series As the data changes it will automatically update the controls on the page. All the nodes are now configured and connected, and are deployed by clicking Deploy. The message Successfully deployed will be displayed. Open a new tab in the browser and add the node-RED server address/ui to the address...
Need help?
Do you have a question about the SmartSwarm 300 and is the answer not in the manual?
Questions and answers