Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

Info
titleAn example of communication - Sparkplug B payload

The attached ZIP contains a configuration of two lines and four stations with the MQTT Sparkplug B protocol. Both lines connect (alternatively) to the servers servers test.mosquitto.org and localhost.

The line L.MQTT_MOSQUITTO_EN (parent MQTT_MOSQUITTO_EN.KOM) is in Sparkplug Edge Node (data producer) mode, has two stations B.MQTT_MOSQUITTO_EN (Edge Node with address myGroup/myEdgeNode) and B.MQTT_MOSQUITTO_EN.Device1 (Device with address myGroup/myEdgeNode/myDevice1). These stations publish the values ​​of the objects Hour, Min, Sec.
The line parameter Sparkplug Host ID is set to "D2000komHA" (The Host application with this name is considered primary). The line L.MQTT_MOSQUITTO_EN connects alternately to the servers test.mosquitto.org and localhost until it finds a connected Primary Host Application.

The L.MQTT_MOSQUITTO_HA line (parent MQTT_MOSQUITTO_HA.KOM) is in Sparkplug Host mode (data consumer), has two stations B.MQTT_MOSQUITTO_HA (receiving data with the topic myGroup/myEdgeNode) and B.MQTT_MOSQUITTO_HA.Device1 (receiving data with the address myGroup/myEdgeNode/myDevice1). These stations receive object values ​​published by I/O tags on Sparkplug Edge Node stations.
The line parameter Sparkplug Host ID is set to "D2000komHA" (this is the Host application identification).

Using the output I/O tags on Sparkplug Host stations (M.MQTT_MOSQUITTO_HA.Output1_Int32, M.MQTT_MOSQUITTO_HA.Output2_Float, and M.MQTT_MOSQUITTO_HA.Device1.Output1_Bool), it is possible to send DCMD and NCMD messages and write to the input I/O tags on Sparkplug Edge Node stations (M.MQTT_MOSQUITTO_EN1.Input1, M.MQTT_MOSQUITTO_EN1.Input2, and M.MQTT_MOSQUITTO_EN.Device1.Input1_Bool).

View file
nameSparkplug.zip
height150

...

  • Ver. 1.0 - August 8th, 2017 - document creation.
  • Ver. 1.1 - October 15th, 2021 - support LastWill and Retain parameters
  • Ver. 1.2 - October 27th, 2021 - support for parsing of JSON messages
  • Ver. 1.3 - February 1st, 2022 - support for timestamps in JSON messages
  • Ver. 1.4 - October 4th, 2024 - support for MQTT Sparkplug (in Sparkplug Host mode), support for browsing
  • Ver. 1.5 - November 8th, 2024 - support for MQTTS (encrypted MQTT, MQTT over TLS)
  • Ver. 1.6 - April 25, 2025 - support for MQTT Sparkplug (in Sparkplug Edge Node mode)


Info
titleSúvisiace stránky:

Communication Protocols

...