Thank you for purchasing automation equipment from Automationdirect.com®, doing business as,
AutomationDirect. We want your new automation equipment to operate safely. Anyone who installs or uses this
equipment should read this publication (and any other relevant publications) before installing or operating the
equipment.
To minimize the risk of potential safety problems, you should follow all applicable local and national codes that
regulate the installation and operation of your equipment. These codes vary from area to area and usually change
with time. It is your responsibility to determine which codes should be followed, and to verify that the equipment,
installation, and operation is in compliance with the latest revision of these codes.
At a minimum, you should follow all applicable sections of the National Fire Code, National Electrical Code,
and the codes of the National Electrical Manufacturer’s Association (NEMA). There may be local regulatory or
government offices that can also help determine which codes and standards are necessary for safe installation and
operation.
Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes and
standards. We do not guarantee the products described in this publication are suitable for your particular
application, nor do we assume any responsibility for your product design, installation, or operation.
Our products are not fault-tolerant and are not designed, manufactured or intended for use or resale as on-line
control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear
facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons
systems, in which the failure of the product could lead directly to death, personal injury, or severe physical or
environmental damage (“High Risk Activities”). AutomationDirect specifically disclaims any expressed or implied
warranty of fitness for High Risk Activities.
For additional warranty and safety information, see the Terms and Conditions on our website. If you have any
questions concerning the installation or operation of this equipment, or if you need additional information, please
call us at 770-844-4200.
This publication is based on information that was available at the time it was published. At AutomationDirect we
constantly strive to improve our products and services, so we reserve the right to make changes to the products and/
or publications at any time without notice and without any obligation. This publication may also discuss features
that may not be available in certain revisions of the product.
Trademarks
This publication may contain references to products produced and/or offered by other companies. The product
and company names may be trademarked and are the sole property of their respective owners. AutomationDirect
disclaims any proprietary interest in the marks and names of others.
No part of this manual shall be copied, reproduced, or transmitted in any way without the prior, written consent of
Automationdirect.com® Incorporated. AutomationDirect retains the exclusive rights to all information included in
this document.
Page 4
~ ADVERTENCIA ~
Gracias por comprar equipo de automatización de Automationdirect.com®. Deseamos que su nuevo equipo de
automatización opere de manera segura. Cualquier persona que instale o use este equipo debe leer esta publicación (y
cualquier otra publicación pertinente) antes de instalar u operar el equipo.
Para reducir al mínimo el riesgo debido a problemas de seguridad, debe seguir todos los códigos de seguridad locales o
nacionales aplicables que regulan la instalación y operación de su equipo. Estos códigos varian de área en área y usualmente
cambian con el tiempo. Es su responsabilidad determinar cuales códigos deben ser seguidos y verificar que el equipo,
instalación y operación estén en cumplimiento con la revisión mas reciente de estos códigos.
Como mínimo, debe seguir las secciones aplicables del Código Nacional de Incendio, Código Nacional Eléctrico, y los
códigos de (NEMA) la Asociación Nacional de Fabricantes Eléctricos de USA. Puede haber oficinas de normas locales
o del gobierno que pueden ayudar a determinar cuales códigos y normas son necesarios para una instalación y operación
segura.
Si no se siguen todos los códigos y normas aplicables, puede resultar en daños al equipo o lesiones serias a personas. No
garantizamos los productos descritos en esta publicación para ser adecuados para su aplicación en particular, ni asumimos
ninguna responsabilidad por el diseño de su producto, la instalación u operación.
Nuestros productos no son tolerantes a fallas y no han sido diseñados, fabricados o intencionados para uso o reventa
como equipo de control en línea en ambientes peligrosos que requieren una ejecución sin fallas, tales como operación en
instalaciones nucleares, sistemas de navegación aérea, o de comunicación, control de tráfico aéreo, máquinas de soporte de
vida o sistemas de armamentos en las cuales la falla del producto puede resultar directamente en muerte, heridas personales,
o daños físicos o ambientales severos (“Actividades de Alto Riesgo”). Automationdirect.com específicamente rechaza
cualquier garantía ya sea expresada o implicada para actividades de alto riesgo.
Para información adicional acerca de garantía e información de seguridad, vea la sección de Términos y Condiciones.
Si tiene alguna pregunta sobre instalación u operación de este equipo, o si necesita información adicional, por favor
llámenos al número 770-844-4200 en Estados Unidos.
Esta publicación está basada en la información disponible al momento de la publicación. En Automationdirect.com
nos esforzamos constantemente para mejorar nuestros productos y servicios, así que nos reservamos el derecho de hacer
cambios al producto y/o a las publicaciones en cualquier momento sin notificación y sin ninguna obligación. Esta
publicación también puede discutir características que no estén disponibles en ciertas revisiones del producto.
Marcas Registradas
Esta publicación puede contener referencias a productos producidos y/u ofrecidos por otras compañías. Los nombres
de las compañías y productos pueden tener marcas registradas y son propiedad única de sus respectivos dueños.
Automationdirect.com, renuncia cualquier interés propietario en las marcas y nombres de otros.
No se permite copiar, reproducir, o transmitir de ninguna forma ninguna parte de este manual sin previo consentimiento
por escrito de Automationdirect.com® Incorprated. Automationdirect.com retiene los derechos exclusivos a toda la
información incluida en este documento. Los usuarios de este equipo pueden copiar este documento solamente para
instalar, configurar y mantener el equipo correspondiente. También las instituciones de enseñanza pueden usar este manual
para propósitos educativos.
Page 5
~ AVERTISSEMENT ~
Nous vous remercions d’avoir acheté l’équipement d’automatisation de Automationdirect.com®, en faisant des affaires
comme, AutomationDirect. Nous tenons à ce que votre nouvel équipement d’automatisation fonctionne en toute sécurité.
Toute personne qui installe ou utilise cet équipement doit lire la présente publication (et toutes les autres publications
pertinentes) avant de l’installer ou de l’utiliser.
Afin de réduire au minimum le risque d’éventuels problèmes de sécurité, vous devez respecter tous les codes locaux et
nationaux applicables régissant l’installation et le fonctionnement de votre équipement. Ces codes diffèrent d’une région à
l’autre et, habituellement, évoluent au fil du temps. Il vous incombe de déterminer les codes à respecter et de vous assurer que
l’équipement, l’installation et le fonctionnement sont conformes aux exigences de la version la plus récente de ces codes.
Vous devez, à tout le moins, respecter toutes les sections applicables du Code national de prévention des incendies, du
Code national de l’électricité et des codes de la National Electrical Manufacturer’s Association (NEMA). Des organismes de
réglementation ou des services gouvernementaux locaux peuvent également vous aider à déterminer les codes ainsi que les
normes à respecter pour assurer une installation et un fonctionnement sûrs.
L’omission de respecter la totalité des codes et des normes applicables peut entraîner des dommages à l’équipement ou causer
de graves blessures au personnel. Nous ne garantissons pas que les produits décrits dans cette publication conviennent à
votre application particulière et nous n’assumons aucune responsabilité à l’égard de la conception, de l’installation ou du
fonctionnement de votre produit.
Nos produits ne sont pas insensibles aux défaillances et ne sont ni conçus ni fabriqués pour l’utilisation ou la revente en tant
qu’équipement de commande en ligne dans des environnements dangereux nécessitant une sécurité absolue, par exemple,
l’exploitation d’installations nucléaires, les systèmes de navigation aérienne ou de communication, le contrôle de la circulation
aérienne, les équipements de survie ou les systèmes d’armes, pour lesquels la défaillance du produit peut provoquer la mort,
des blessures corporelles ou de graves dommages matériels ou environnementaux («activités à risque élevé»). La société
AutomationDirect nie toute garantie expresse ou implicite d’aptitude à l’emploi en ce qui a trait aux activités à risque élevé.
Pour des renseignements additionnels touchant la garantie et la sécurité, veuillez consulter la section Modalités et conditions
de notre documentation. Si vous avez des questions au sujet de l’installation ou du fonctionnement de cet équipement, ou
encore si vous avez besoin de renseignements supplémentaires, n’hésitez pas à nous téléphoner au 770-844-4200.
Cette publication s’appuie sur l’information qui était disponible au moment de la publication. À la société AutomationDirect
nous nous efforçons constamment d’améliorer nos produits et services. C’est pourquoi nous nous réservons le droit
d’apporter des modifications aux produits ou aux publications en tout temps, sans préavis ni quelque obligation que ce soit.
La présente publication peut aussi porter sur des caractéristiques susceptibles de ne pas être offertes dans certaines versions
révisées du produit.
,
Marques de commerce
La présente publication peut contenir des références à des produits fabriqués ou offerts par d’autres entreprises. Les
désignations des produits et des entreprises peuvent être des marques de commerce et appartiennent exclusivement à leurs
propriétaires respectifs. AutomationDirect nie tout intérêt dans les autres marques et désignations.
Nulle partie de ce manuel ne doit être copiée, reproduite ou transmise de quelque façon que ce soit sans le consentement
préalable écrit de la société Automationdirect.com® Incorporated. AutomationDirect conserve les droits exclusifs à l’égard de
tous les renseignements contenus dans le présent document.
Page 6
Stride MQTT Gateway User Manual
Please include the Manual Number and the Manual Issue, both shown below,
when communicating with Technical Support regarding this publication.
Conventions Used ......................................................................................................................................... 1-2
Getting Started ............................................................................................................................................. 2-2
Other Options ............................................................................................................................................. 2-14
Example using Mosquitto .............................................................................................................................C-3
Example using ThingsBoard.io .....................................................................................................................C-7
Front Panel Indicators ............................................................................................................................... 2-8
Thank you for purchasing our Stride® MQTT Gateway for your Industrial Internet of Things (IIoT)
data logging. This manual describes our MQTT Gateway, its specifications and included components, and
provides you with important information for installation, connectivity and setup.
Technical Support
We strive to make our manuals the best in the industry. We rely on your feedback to let us know if we are
reaching our goal. If you cannot find the solution to your particular application, or, if for any reason you need
technical assistance, please call us at:
Our technical support group will work with you to answer your questions. They are available Monday
through Friday from 9:00 a.m. to 6:00 p.m. Eastern Time. We also encourage you to visit our web site where
you can find technical and non-technical information about our products and our company.
770–844–4200
https://www.AutomationDirect.com
If you have a comment, question or suggestion about any of our products, services, or manuals, please let us know.
Conventions Used
When you see the “notepad” icon in the left-hand margin, the paragraph to its immediate right will be a special note.
The word NOTE: in boldface will mark the beginning of the text.
When you see the “exclamation mark” icon in the left-hand margin, the paragraph to its immediate right will be a
warning or a caution. This information could prevent injury, loss of property, or even death (in extreme cases). The
words WARNING or CAUTION: in boldface will mark the beginning of the text.
1-2
Stride MQTT Gateway User Manual, 1st Edition
Page 11
Hardware Overview
The Stride MQTT Gateway is an industrial device specifically designed to implement an Industrial Internet
of Things (IIoT) data collection system. It allows bidirectional communication between Modbus field
equipment and an MQTT broker. It provides a Modbus RTU master interface on RS-485 and Modbus
TCP over Ethernet. Variables can be read from Modbus slave devices on change or at fixed time intervals and
are sent to the MQTT broker with optional SSL/TLS client certificate authentication.
The Wi-Fi model (Part No. SGW-MQ1611-WF) uses 802.11 a/b/g/n/ac in 2400MHz or 5500MHz bands.
Setup of the device is through a built-in web interface. The MQTT message structure can be configured
to better adapt to different MQTT brokers (e.g., Amazon AWS, IBM Watson IoT, Mosquitto, etc.). It is
possible to remotely update the firmware through the web interface.
The gateway has a low-profile format, suitable for DIN rail mounting inside industrial electrical cabinets. The
full galvanic isolation ensures a good protection against interference present in industrial environments. A
dedicated hardware Watchdog manages the automatic reset of the device. Signaling LEDs allow an immediate
diagnosis of device operation.
Chapter 1: Hardware
SAFETY NOTICE: The Stride MQTT Gateway allows the user to connect to remote industrial controls equipment.
The remote user may operate and monitor the local control system and affect the function and control of the
application just as the local operator controls it. Proper Control, Security and Safety Procedures should be
considered and implemented when writing data to a remote device or system.
Stride MQTT Gateway User Manual, 1st Edition
1-3
Page 12
Chapter 1: Hardware
Specifications
Part NumberEthernetRS-485WiFi
SGW-MQ1611
SGW-MQ1611-WF
ConnectorRemovable screw terminals, 5.08 mm pitch
Baud rateUp to 115.2 kbps
ParityEven, odd or none
Stop bit1 or 2
Number of Serial Devices32 max.
Switching Time TX/RX (RS-485)150μs
Termination Resistance120Ω
ConnectorRJ-45
Ethernet Port Speed10/100Mbps auto-detected
ProtocolMQTT, Modbus TCP
Simultaneous Ethernet Connections8
Stride MQTT Gateway Models
üü
üüü
RS-485 Specifications
Ethernet Specifications
WiFi Specifications (Model SGW-MQ1611-WF Only)
WiFi Standards802.11 a/b/g/n/ac
Frequency Bands2400MHz / 5500MHz
AntennaInternal
Network Ports
Web User Interface80
Modbus502 (default, software configurable)
MQTTSoftware configurable, determined by MQTT Broker
Electrical Specifications
Power Supply ConnectorRemovable screw terminals, 5.08 mm pitch
Input Voltage Range10–30VDC
Current Consumptionmax 300mA @ 24VDC
Isolation
Ethernet / RS-485
Ethernet / Power Supply
Power Supply / RS-485
Reverse Polarity ProtectionYes
1500VAC, 50Hz, 1 min.
1000VAC, 50Hz, 1 min.
1500VAC, 50Hz, 1 min.
1-4
Mechanical Specifications
MaterialSelf-extinguishing plastic
MountingDIN rail (EN50022 and EN50035)
WeightApproximately 200g
Stride MQTT Gateway User Manual, 1st Edition
Page 13
Environmental Specifications
Operating Temperature0°C to +60°C [32°F to +140°F]
Storage Temperature−20°C to +70°C [−4°F to +158°F]
Humidity0–90%, noncondensing
Maximum Altitude2000m
IP RatingIP20
InstallationIndoor
Category of InstallationII
Pollution Degree2
EMC
Immunity
Emission
EN61000-6-2
EN61000-6-4
Agency ApprovalsCE, FCC, RoHS
Dimensional Drawings
5-WIRE
CONNECTOR
Chapter 1: Hardware
RoHS
RoHS Compliant
Units: mm [in]
RESET
BUTTON
62.5
2.46
91.0
3.58
71.5
2.81
62.5
2.46
44.9
1.77
46.1
1.81
ETHERNET
PORT
Stride MQTT Gateway User Manual, 1st Edition
1-5
Page 14
Chapter 1: Hardware
Installation
Mounting
The Stride MQTT Gateway may be used indoors only.
It is designed to be mounted in a vertical position on DIN rail and cooled using natural convection. For
proper cooling, you must provide clearance of at least 5mm [0.2 inches] between MQTT Gateway modules
and at least 10mm [0.4 inches] between MQTT Gateway modules and power supplies or other devices.
Make sure that sufficient air flow is provided for the gateway. Avoid placing raceways or other objects where
airflow could be obstructed. Avoid mounting the gateway above equipment that generates heat; ideally locate
the gateway in the lower part of the panel.
Install the gateway in a place without vibrations.
To mount the gateway:
1. Hook the top of the mounting bracket onto the DIN rail.
2. Press the bottom of the gateway inward until it clicks onto the DIN rail.
To remove the gateway:
A. Pull downward on the mounting clip release.
B. Swing the bottom of the gateway outward.
C. Lift the gateway off the DIN rail.
1
2
C
B
A
1-6
NOTE: Installation of the SGW-MQ1611-WF model in a metal cabinet is not recommended, as the cabinet may
block the Wi-Fi signal.
Stride MQTT Gateway User Manual, 1st Edition
Page 15
Chapter 1: Hardware
Wiring
Wiring Guidelines
WARNING: To minimize the risk of potential safety problems, you should follow all applicable local and national
codes that regulate the installation and operation of your equipment. These codes vary from area to area
and it is your responsibility to determine which codes should be followed, and to verify that the equipment,
installation, and operation are in compliance with the latest revision of these codes.
Equipment damage or serious injury to personnel can result from the failure to follow all applicable codes
and standards. We do not guarantee the products described in this publication are suitable for your particular
application, nor do we assume any responsibility for your product design, installation, or operation.
If you have any questions concerning the installation or operation of this equipment, or if you need additional
information, please call technical support at 1-800-633-0405 or 770-844-4200.
This publication is based on information that was available at the time it was written. At Automationdirect.com®
we constantly strive to improve our products and services, so we reserve the right to make changes to the
products and/or publications at any time without notice and without obligation. This publication may also
discuss features that may not be available in certain revisions of the product.
Proper grounding and wiring of all electrical equipment is important to help ensure the optimum operation
of the Stride MQTT Gateway and to provide additional electrical noise protection for your application.
WARNING: Do not terminate communication leads while the plug-in connector is connected to a powered device.
Wiring Connections
The Stride MQTT Gateway comes with a female 5-pin
plug-in connector for its power and RS-485 connection.
The gateway can be powered from the same 12 to
24 VDC source that is used to power your other
devices. Recommended DC power supplies are
AutomationDirect.com part number PSL-12-010 or
PSL-24-010.
The device uses a 2-wire RS-485 interface. It has an
internal terminating resistor, so this device must be at
the end of the communications daisy-chain.
Avoid routing signal cables near power cables (motors,
induction ovens, inverters, etc.), and use shielded cable
to connect signals. We recommend AutomationDirect
Part #L19954-1 or equivalent data cable to connect
RS-485 serial devices.
POWER SUPPLY
RST
SHIELD
RS-485
54321
Stride MQTT Gateway User Manual, 1st Edition
Ethernet
RJ45
1-7
Page 16
Chapter 1: Hardware
Wiring Connections
PinDescriptionNotes
1V-
2V+
Power Supply10–30VDC, 300mA @ 24VDC
3SHIELDRS-485 Shield
4D+
5D-
RS-485 Data
Connection to one or more
Modbus RTU servers
Connection to MQTT broker and
RJ45Ethernet 10/100Base-T
one or more Modbus TCP or
Modbus RTU over TCP servers
USB (x2)Future Use
Terminal Connector Wiring Specifications
Wire Size
Torque0.5 N·m
Stripping Length5mm maximum
0.8–2.1 mm2
14–18 AWG
CONNECTIONS
POWER SUPPLY
RS-485 Point-to-Point
RS-485 Multipoint
DC
MASTER
SHIELD
MASTER
SHIELD
D (+)
D (−)
1
2
D (+)
D (−)
3
4
5
+
SLAVE
3
4
5
SHIELD
D (+)
D (−)
SLAVE
SHIELD
D (+)
D (−)
SLAVE
SHIELD
D (+)
D (−)
LEDs on the top surface indicate:
* red, active internal power; green, internal memory activity
1-8
Stride MQTT Gateway User Manual, 1st Edition
Page 17
Operation
Configuration and operation of the STRIDE MQTT Gateway is primarily conducted using the device’s web
interface, as discussed in Chapter 2. The hardware indicators and controls are described here.
Chapter 1: Hardware
RS-485 TERMINALS
POWER TERMINALS
POWER
ERROR
RS-485 TRANSMIT
RS-485 RECEIVE
RECOVERY MODE
BUTTON
RJ45 PORT
Front Panel Indicators
The Stride MQTT Gateway has four status LEDs, as shown below.
Boot (about 60 sec., few minutes for the first boot)
NOTE: LEDs on the top surface indicate: RED = active internal power; GREEN = internal memory activity.
Stride MQTT Gateway User Manual, 1st Edition
1-9
Page 18
Chapter 1: Hardware
Recovery Mode
The device can be booted into a Recovery Mode to reset portions of the configuration to default or to
perform system maintenance and firmware updates.
To enter Recovery Mode, press and hold the recessed reset button on the front of the gateway while applying
power. Continue to hold the reset button until the ERR light stops blinking (about 5 seconds after applying
power). The gateway will start in Recovery Mode, using the default Ethernet configuration:
• IP address = 192.168.1.100
Details of the features available in recovery mode are discussed in Chapter 2.
1-10
Stride MQTT Gateway User Manual, 1st Edition
Page 19
Chapter
Chapter
Chapter
Setupand OperatiOn
2
2
2
In This Chapter...
Getting Started ............................................................................................................................................. 2-2
Other Options ............................................................................................................................................. 2-14
Date & Time .............................................................................................................................................2-14
Reboot and Return to Normal Mode ...................................................................................................... 2-19
Page 20
Chapter 2: Setup and Operation
Getting Started
Before you begin setting up the MQTT gateway, please make sure the following conditions are met:
1. The hardware is installed as described in the Mounting and Wiring sections of Chapter 1.
2. You have the necessary connection information on hand to connect to your MQTT broker.
3. You have a device on hand with a web browser and the ability to connect to the MQTT gateway
via its RJ-45 Ethernet port, either over a LAN or directly with a crossover cable.
The device is configured through its web interface. To begin, connect to the device via an Internet browser.
The default Ethernet configuration is:
To change the network parameters, select Network interfaces from the More Options ( ) menu in the upper
right corner of the web UI.
Chapter 2: Setup and Operation
Enter the desired network parameters and click SAVE, then CONFIRM the changes.
NOTE: The gateway will always use its permanent default IP address when in recovery mode.
To verify the settings, reopen the Network interfaces screen and click TEST INTERNET CONNECTION.
Stride MQTT Gateway User Manual, 1st Edition
2-3
Page 22
Chapter 2: Setup and Operation
Setup Modbus Communications Channel
The gateway can communicate over both RS-485 and Ethernet. Before setting up a Modbus device in the
gateway, you must configure the RS-485 or Ethernet communications channel.
Click on the CHANNEL tab to define the Modbus communications parameters.
Click the “+” icon to add a new channel, or click on an existing channel to edit it.
2-4
Stride MQTT Gateway User Manual, 1st Edition
Page 23
Chapter 2: Setup and Operation
• Enter a Name for the channel
• Select the Communications protocol. You can create one Modbus RTU channel, and one or more
Modbus TCP or Modbus RTU over TCP channels.
• For Modbus RTU, enter the Baud Rate, Data bits, Stop bits, and Parity.
• For Modbus TCP or RTU over TCP, enter the IP address and TCP Port of the Modbus device.
• Enter the Timeout value (the maximum time in ms within which a valid response must be received
from the Modbus device).
• Enter the Queue delay (the time in ms to wait between two Modbus requests)
• Enter the Device delay (the time in ms to wait between querying two Modbus devices)
Click SAVE when finished configuring the channel.
Stride MQTT Gateway User Manual, 1st Edition
2-5
Page 24
Chapter 2: Setup and Operation
Setup Modbus Devices
The gateway can communicate with up to 32 Modbus RTU Slaves via RS-485 and up to eight Modbus TCP
Servers or Modbus RTU over TCP Servers via Ethernet. After the communications channels are defined, you
can configure the connection and variables for each Modbus device.
Configure Modbus Device
Click on the DEVICES tab to define the Modbus devices to be queried.
Click the “+” icon to add a new device, or click on an existing device to edit it.
• Enter a Name for the device.
• Select an existing Channel for the device.
• Enter the device Address (Unit ID).
• Check Block sampling to combine contiguous variables into one query
2-6
Stride MQTT Gateway User Manual, 1st Edition
Page 25
Chapter 2: Setup and Operation
Configure Modbus Variables
Add each variable to be read from or written to the Modbus device by clicking the “+” icon.
• Uncheck Read-only to make the variable writable, if desired.
• Select the Format for the variable, and check Unsigned if necessary. Available variable formats are:
CategoryFormat
Digital1 bit
Integer
Floating Point
Stride MQTT Gateway User Manual, 1st Edition
Modbus Variable Formats
16 bit (INT) signed or unsigned
32 bit (INT) Big endian signed or unsigned
32 bit (INT) Little endian signed or unsigned
32 bit (FP) Big endian
32 bit (FP) Little endian
2-7
Page 26
Chapter 2: Setup and Operation
• Enter a Variable name.
• Enter the Modbus Address for the variable.
• Select the Modbus Function Code to read the variable and to write the variable if not read-only.
Valid function codes for each variable type are shown below.
Variable TypeRead Function CodesWrite Function Codes
1 bit
16 bit (INT)
32 bit (INT) Big endian
32 bit (INT) Little endian
32 bit (FP) Big endian
32 bit (FP) Little endian
• To linearly scale the values, if desired, define two raw measured values, Measured value 1 and
Measured value 2, and enter the desired final values for each, respectively, as Engineering value 1 and Engineering value 2.
06 - Preset Single Register
16 - Preset Multiple Registers
16 - Preset Multiple Registers
• If Validity is checked, set an additional Address to be compared to a preset Value to determine
current validity of the variable’s data.
Configure MQTT Topics
Enable the checkbox by each variable to be sent via MQTT or controlled via MQTT, and enter the MQTT
message parameters.
NOTE: The MQTT Gateway allows arbitrary naming of message topics. Your MQTT broker may require that
topic names have a particular structure.
2-8
Stride MQTT Gateway User Manual, 1st Edition
Page 27
Chapter 2: Setup and Operation
• If the variable read is to be published to your MQTT broker:
– Enter an MQTT Topic (PUB). The circle arrow icon to the right of the Topic name will
reset the name to the default <DEVICE_NAME>/get/<VARIABLE_NAME>, where
<DEVICE_NAME> and <VARIABLE_NAME> will automatically populate from the values
defined for the device.
– Select whether the topic should be published On value change or At a fixed frequency, and
enter the Threshold amount of change to trigger a publish event or the time interval (Every (s))
at which to publish, respectively.
– Enter the Quality of Service level (QoS).
MQTT Quality of Service Levels
QoSDescription
0Does not include confirmation of receipt
1Guarantees the delivery of the message at least once to a receiver
2Guarantees the delivery of the message once and only once to a receiver
– If Retain is checked, the MQTT broker will hold the most recently published message in this
topic to sent in reply to future client Subscribe requests.
• If the variable is to be written based on a subscribed MQTT topic:
– Enter an MQTT Topic (SUB). The circle arrow icon to the right of the Topic name will
reset the name to the default <DEVICE_NAME>/set/<VARIABLE_NAME>, where
<DEVICE_NAME> and <VARIABLE_NAME> will automatically populate from the values
defined for the device.
– Enter the Quality of Service level (QoS), as defined for the publish case above.
• Click SAVE when finished defining all variables and MQTT topics.
After a device has been added to the channel, the simulated LED to the right of the device on the DEVICES
tab and the channel name on the CHANNELS tab will turn green if communication is successful and
red while the channel is in an error state. The clipboard icon on each channel will open a real-time log of
communications on that channel.
Stride MQTT Gateway User Manual, 1st Edition
2-9
Page 28
Chapter 2: Setup and Operation
Configure MQTT Broker
Check your MQTT broker for the settings it requires prior to configuring your gateway.
Click on the MQTT tab to define the connection to an MQTT broker.
2-10
• Set the Broker Address and Broker Port.
• Set the ClientId as required by your MQTT broker.
• Set the Keep Alive frequency (in seconds).
• Select Clean session if desired, to require renewal of subscriptions to the topics each time the client
reconnects to the broker.
• Set the Username and Password for the broker if necessary.
• Select EnableTLS/SSL and upload a certificate, private key, or CA certificate if necessary.
Stride MQTT Gateway User Manual, 1st Edition
Page 29
Chapter 2: Setup and Operation
• The Payload structure allows you to customize the payload structure and provides a preview of the
message for valid and invalid values.
– Select all the information to be included in the message. Each field can be edited to customize
the message payload by clicking the pencil icon to the right of the selection. The information to
be returned by each field can be edited. For the Sampled value a custom value to return when
invalid or when the device has communications problems can also be specified. For each entry,
the circular arrow icon will reset the value to its default.
– The PREVIEW link will show you a sample of the messages for both valid and invalid states.
Stride MQTT Gateway User Manual, 1st Edition
2-11
Page 30
Chapter 2: Setup and Operation
2-12
Stride MQTT Gateway User Manual, 1st Edition
Page 31
Chapter 2: Setup and Operation
• The Messages queue can be enabled to batch transmission of messages. When the queue is
disabled, each MQTT message is sent as soon as it is ready to be delivered. Some IoT web services
(i.e.: Ubidots) also ignore incoming messages if the incoming frequency is higher than a prescribed
number of messages per second.
Enabling the message queue will store the outgoing MQTT messages into a buffer. This makes it
possible to control the outgoing message frequency.
If the message queue is enabled, the gateway will collect messages in a queue to send as a batch once
the minimum delay or maximum queue length has been reached. Unsent messages can be set to
expire after a time interval
• Diagnostic messages can be enabled to create a topic containing status information on your
channels, devices and MQTT connection.
• Click SAVE when finished configuring the MQTT connection.
• The simulated LED to the right of the Broker Port will turn green if communication with the
broker is successful and red while the connection is in an error state. The clipboard icon will open a
real-time log of communications between the gateway and the MQTT broker.
Stride MQTT Gateway User Manual, 1st Edition
2-13
Page 32
Chapter 2: Setup and Operation
Other Options
Secondary settings and functions are accessed via the More Options icon in the upper right corner of the
web UI. The Network interfaces settings were covered in “Setup Network Connection” on page 2-3. The
remaining features under this menu are discussed below.
Date & Time
Enter the date and time manually, or click Enable NTP and enter the address of an internet time server.
Import/Export Configuration
The full configuration of all channels, devices, and MQTT connection can be exported as a JSON file, and
imported to another gateway.
2-14
Stride MQTT Gateway User Manual, 1st Edition
Page 33
Chapter 2: Setup and Operation
Change Password
The password to log into the gateway web UI can be changed. Note that the user name is not editable.
Logout
The connected session to the gateway web UI will time out after several minutes of inactivity. To log out
immediately, click Logout from the More Options menu.
Maintenance
The Maintenance dialog provides the ability to update firmware, download a system log, or restart the device.
System Log
Click System log to download a log file to your PC. Note that the file is a tar.gz archive and will require an
unarchive utility such as WinZip or 7-Zip if you need to open it on a Windows PC.
Restart
Click Restart then click Confirm to reboot the gateway.
Stride MQTT Gateway User Manual, 1st Edition
2-15
Page 34
Chapter 2: Setup and Operation
Firmware
New firmware will be announced on our web site at https://support.automationdirect.com/firmware.
We strongly recommend you subscribe to AutomationDirect’s firmware notification service at
https://notify.automationdirect.com/firmware. To update the device firmware, download the firmware file
to your PC and unzip it, then select More Options > Maintenance > Firmware upgrade and proceed as
follows.
Click BROWSE, select your firmware file (.swu extension) and click Open.
The file will be uploaded and verified.
2-16
Once the file is verified, click UPGRADE then click CONFIRM.
Stride MQTT Gateway User Manual, 1st Edition
Page 35
Chapter 2: Setup and Operation
After the firmware is updated, the gateway will reboot.
If for any reason the firmware update is unsuccessful, restart the gateway in Recovery Mode, as discussed in
the next section, and repeat the firmware upgrade.
Stride MQTT Gateway User Manual, 1st Edition
2-17
Page 36
Chapter 2: Setup and Operation
Recovery Mode
The device can be booted into a Recovery Mode to reset portions of the configuration to default or to
perform system maintenance and firmware updates.
To enter Recovery Mode, press and hold the recessed reset button on the front of the gateway while cycling
power. Continue to hold the reset button until the ERR light stops blinking (about 5 seconds after applying
power). The gateway will start in Recovery Mode, using the default Ethernet configuration:
• IP address = 192.168.1.100
Reset
From the Reset tab, you can selectively reset the Hostname, Network interface, Date & time, Login credentials,
or Configuration to their default settings.
2-18
Stride MQTT Gateway User Manual, 1st Edition
Page 37
Chapter 2: Setup and Operation
Maintenance
From the Maintenance tab, you can check for file system errors, download stored logs and clean temporary
files. Note that downloaded log files are tar.gz archives and will require an unarchive utility such as WinZip
or 7-Zip if you need to open them on a Windows PC.
Firmware Upgrade
Upgrading firmware from within the Recovery Mode UI follows the same steps as performing a firmware
upgrade in normal operating mode, as described in “Firmware” on page 2-16.
It may occasionally be necessary to upgrade the firmware from Recover Mode if a firmware upgrade was
unsuccessful in the normal operating mode.
Reboot and Return to Normal Mode
To reboot the gateway and return to normal mode, click the More Options icon in the upper right, then
click Reboot. Upon reboot the device will use its configured network settings.
Stride MQTT Gateway User Manual, 1st Edition
2-19
Page 38
appendix
appendix
Safetyand Security
cOnSideratiOnS
In This Appendix...
Security Considerations for Control Systems Networks..............................................................................A-2
Security Considerations for Control Systems Networks
Manufacturers are realizing that to stay competitive, their Automation and Control Systems need to be
more integrated within their plant. The systems often need to be integrated with upstream Enterprise Data
Systems, and even further integrated to allow information to be accessible across multiple plants, or even
through the Internet. This convergence of the IT world with the Automation World creates challenges in
maintaining secure systems and protecting your investments in processes, personnel, data and intellectual
property.
While Automation Networks and Systems have built-in password protection schemes, this is only one very
small step in securing your systems. Automation Control System Networks need to incorporate data protection
and security measures that are at least as robust as a typical business computer system. We recommend that
users of PLCs, HMI products and SCADA systems perform your own network security analysis to determine
the proper level of security required for you application. However, the National Security Agency has provided
direction related to network security and safety under an approach described as “Defense in Depth”, which
is published at http://www.nsa.gov/ia/_files/support/defenseindepth.pdf.
This comprehensive security strategy involves physical protection methods, as well as process and policy
methods. This approach creates multiple layers and levels of security for industrial automation systems. Such
safeguards include the location of control system networks behind firewalls, their isolation from business
networks, the use of intrusion detection systems, and the use of secure methods for remote access such as
Virtual Private Networks (VPNs).
Further, users should minimize network exposure for all control system devices and such control systems and
these systems should not directly face the internet. Following these procedures should significantly reduce
your risks both from external sources as well as internal sources, and provide a more secure system.
It is the user’s responsibility to protect such systems, just as you would protect your computer and business
systems. AutomationDirect recommends using one or more of these resources in putting together a secure
system:
• US-CERT’s Control Systems Security Program at the following web address:
www.us-cert.gov/control_systems/
• Special Publication 800-82 of the National Institute of Standards and Technology – Guide to
Industrial Control Systems (ICS) Security http://csrc.nist.gov/groups/SMA/fisma/ics/documents/
oct23-2009-workshop/nist-ics3_10-23-2009.pdf
• ISA99, Industrial Automation and Control Systems Security http://www.isa.org/MSTemplate.
cfm?MicrositeID=988&CommitteeID=6821 (please note this is a summary and these standards
have to be purchased from ISA)
This set of resources provides a comprehensive approach to securing a control system network and reducing
risk and exposure from security breaches. Given the nature of any system that accesses the internet, it is
incumbent upon each user to assess the needs and requirements of their application, and take steps to
mitigate the particular security risks inherent in their control system.
A-2
Stride MQTT Gateway User Manual, 1st Edition
Page 40
Safety Guidelines
NOTE: Products with CE marks perform their required functions safely and adhere to relevant standards as
specified by CE directives provided they are used according to their intended purpose and that the instructions
in this manual are adhered to. The protection provided by the equipment may be impaired if this equipment is
used in a manner not specified in this manual. A listing of our international affiliates is available on our web site:
https://www.AutomationDirect.com.
WARNING: Providing a safe operating environment for personnel and equipment is your responsibility and
should be your primary goal during system planning and installation. Automation systems can fail and may
result in situations that can cause serious injury to personnel or damage to equipment. Do not rely on the
automation system alone to provide a safe operating environment. You should use external electromechanical
devices, such as relays or limit switches, that are independent of the PLC application to provide protection for
any part of the system that may cause personal injury or damage. Every automation application is different, so
there may be special requirements for your particular application. Make sure you follow all national, state, and
local government requirements for the proper installation and use of your equipment.
The best way to provide a safe operating environment is to make personnel and equipment safety part of
the planning process. You should examine every aspect of the system to determine which areas are critical
to operator or machine safety. If you are not familiar with control system installation practices, or your
company does not have established installation guidelines, you should obtain additional information from
the following sources.
Appendix A: Safety and Security Considerations
• NEMA — The National Electrical Manufacturers Association, located in Washington, D.C.
publishes many different documents that discuss standards for industrial control systems. You can
order these publications directly from NEMA. Some of these include:
ICS 1, General Standards for Industrial Control and Systems
ICS 3, Industrial Systems
ICS 6, Enclosures for Industrial Control Systems
• NEC — The National Electrical Code provides regulations concerning the installation and use of
various types of electrical equipment. Copies of the NEC Handbook can often be obtained from
your local electrical equipment distributor or your local library.
• Local and State Agencies — many local governments and state governments have additional
requirements above and beyond those described in the NEC Handbook. Check with your local
Electrical Inspector or Fire Marshall office for information.
Productivity Series PLCs ............................................................................................................................A-6
Example using Mosquitto .............................................................................................................................C-3
Example using ThingsBoard.io .....................................................................................................................C-7
Page 48
Appendix C: MQTT Broker Examples
Introduction
The Stride MQTT Gateway can integrate your Modbus data into an IIoT system using any MQTT broker.
It is compatible with popular public IIoT platforms such as Amazon AWS, IBM Watson IoT, ThingsBoard
and others. You can also set up you own MQTT broker using Mosquitto or other MQTT software.
The steps to set up the Stride MQTT Gateway are essentially identical regardless of which MQTT Broker
you plan to use, but a given broker may require specific settings for the MQTT connection, topic syntax or
message structure. Please check the requirements of your chosen system prior to configuring the gateway.
To demonstrate the MQTT setup, including both the gateway and MQTT broker, we will present two
examples; one using a public Mosquitto testing server, and one using ThingsBoard.io.
C-2
Stride MQTT Gateway User Manual, 1st Edition
Page 49
Example using Mosquitto
Mosquitto is primarily an MQTT broker software intended to be installed on your own server. A public
test server is available, however, and can provide a quick verification that all parts of the IIoT system are
functioning properly.
This example is designed to verify the MQTT functionality and the network path. Be sure that a valid
Default Gateway is specified (LAN IP address of the router) and accessible DNS addresses are being used to
be able to access the Broker Address URL. If in doubt on the DNS addresses, use Google’s DNS addresses
of 8.8.8.8 and 8.8.4.4.
To test the MQTT connection using “test.mosquitto.org”, use the settings as shown below in the “MQTT”
section of the setup.
There are a few different port options depending upon if encryption is being used or not, but for the sake of
simplicity port 1883 (unencrypted) is being used in this example.
Appendix C: MQTT Broker Examples
Stride MQTT Gateway User Manual, 1st Edition
C-3
Page 50
Appendix C: MQTT Broker Examples
Setup a valid Channel under the “Channels” setup tab. In this case, Modbus RTU is being used back to a PC
running Modbus Slave (available at https://www.modbustools.com) with the USB-485M converter.
C-4
Stride MQTT Gateway User Manual, 1st Edition
Page 51
Appendix C: MQTT Broker Examples
Create a device in the “Devices” tab to specify a Modbus address and a MQTT topic.
In this example, we are targeting Modbus RTU device 1, requesting Modbus address 400001 (Function
Code 3, offset 0) and Publishing that to the “myTopic” Topic at test.mosquitto.org on a 1 second interval.
Stride MQTT Gateway User Manual, 1st Edition
C-5
Page 52
Appendix C: MQTT Broker Examples
Once this setup has been saved to the gateway, we can go to the “test.mosquitto.org/ws.html” URL to check
and see if our gateway is publishing data to the Broker.
At the test.mosquitto.org/ws.html website, click on the “Connect” button and you should see a “CONNACK
0” text at the bottom if the access was successful.
To see the values being published by the gateway, type in the “myTopic” Topic name in the “Subscribe/
Unsubscribe” Topic field and click on the “Subscribe” button.
You should see the value in 400001 being published at a 1 second interval at the bottom of the screen.
C-6
If the PUBLISH messages are showing up on the screen, the MQTT functionality and network path are
correctly configured.
Note that the public test server at test.mosquitto.org may occasionally be down. The most obvious indication
of this is the lack a “CONNACK 0” message when you click on the “Connect” button. If this occurs, please
wait for the server to become available again later.
Stride MQTT Gateway User Manual, 1st Edition
Page 53
Example using ThingsBoard.io
ThingsBoard is an open-source IoT platform that provides device management, data collection, processing
and visualization for your IoT solution. They offer multiple tiers of service. We’ll use a demo of their
Community Edition to demonstrate a full-fledged IoT solution including data visualization.
To begin, go to https://thingsboard.io and click on the “TRY IT NOW” button at the top. When presented
with the screen shown below, choose the “LIVE DEMO” button.
Setup an account and activate it.
Appendix C: MQTT Broker Examples
Stride MQTT Gateway User Manual, 1st Edition
C-7
Page 54
Appendix C: MQTT Broker Examples
After the account has been created, go to https://demo.thingsboard.io.
Sign in and go to the “DEVICES” tab on the left hand side. Click on the red + button on the bottom right
hand side to create a new Device.
Enter in a unique name and choose the “default” Device type.
The description is optional.
C-8
Stride MQTT Gateway User Manual, 1st Edition
Page 55
Appendix C: MQTT Broker Examples
Click on the Device that was just created. There are 2 important buttons on this next screen:
“COPY DEVICE ID” and “COPY ACCESS TOKEN”. Click on the “COPY DEVICE ID” and then paste
(CTRL-V) into the “ClientID” field of the MQTT setup tab in the MQTT gateway setup (field 3 in the
screen capture below). Click on the “COPY ACCESS TOKEN” button and then paste this value into the
“Username” field of the MQTT setup tab in the MQTT gateway setup (field 4 in the screen capture below).
Switch to the setup of the MQTT gateway. The items are described below.
Stride MQTT Gateway User Manual, 1st Edition
C-9
Page 56
Appendix C: MQTT Broker Examples
1. Broker Address should be: demo.thingsboard.io
2. Port number can be a few different options. For unencrypted connection, choose 1883.
3. This is the value that comes from the “COPY DEVICE ID” button of the thingsboard Device
setup.
4. This is the value that comes from the “COPY ACCESS TOKEN” button of the thingsboard
Device setup.
5. Leave this field blank for connectivity to thingsboard.
Go to the “Channels” tab of the MQTT Gateway setup and create a new Channel. In this example, we are
performing Modbus RTU communications.
C-10
Stride MQTT Gateway User Manual, 1st Edition
Page 57
Appendix C: MQTT Broker Examples
Go the “Devices” tab of the MQTT setup page. Create a new Device and choose the Channel just selected.
Choose the Address of your Modbus RTU device. In this example, we are reading Modbus address 400001
(Function Code 3, Offset 0). This example is publishing at a fixed rate of 1 second. The topic MUST be
exactly as shown in the screen capture below: v1/devices/me/telemetry
Stride MQTT Gateway User Manual, 1st Edition
C-11
Page 58
Appendix C: MQTT Broker Examples
Save this configuration to the MQTT Gateway and switch back over to the thingsboard dashboard. In the
Device setup, go to the “LATEST TELEMETRY” tab.
If the communications are setup correctly in the MQTT Gateway, there will be an updating value shown here.
Click on the checkbox to the left of the item that is updating then click the “SHOW ON WIDGET” button.
C-12
Stride MQTT Gateway User Manual, 1st Edition
Page 59
Appendix C: MQTT Broker Examples
There is a list of widgets to choose from. For this example, we will choose a simple digital gauge as shown
below. Click on the “ADD TO DASHBOARD” option after selecting a Widget.
We will create a new Dashboard called “Site A” and choose the “Open dashboard” option.
Stride MQTT Gateway User Manual, 1st Edition
C-13
Page 60
Appendix C: MQTT Broker Examples
The widget is now added to the Dashboard and is displaying the value in the Modbus RTU device at 40001.
There are many other widgets and many display options available. To edit the dashboard and widgets, click
on the pencil in the bottom right hand corner.
Dashboard after adjusting widget display options:
C-14
We hope that this brief example helps you see how you can use the platform to build a data dashboard for
your intended use.
Stride MQTT Gateway User Manual, 1st Edition
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.