Overview
Siemens LOGO! 8.4 firmware introduced a native MQTT client, enabling direct publish/subscribe communication with brokers such as Eclipse Mosquitto, the Home Assistant MQTT integration, Node-RED, and cloud IoT platforms. The release ended the historical reliance on Siemens-proprietary S7 paths or vendor-locked polling for connecting LOGO! controllers to residential and light-commercial automation stacks. MQTT delivers low-bandwidth telemetry over a single TCP port, traverses consumer firewalls cleanly, and supports TLS on port 8883 for encrypted transport.
This reference covers end-to-end commissioning of a LOGO! 8.4 base module (BM) as an MQTT client, the programming sequence in LOGO! Soft Comfort V8.4, broker deployment on Home Assistant OS or a generic Linux host, Node-RED bridging, payload structure, security hardening, and a troubleshooting matrix that addresses the most common field failures.
Prerequisites
- LOGO! 8.4 base module (Siemens 6ED1052 family, -0BA4 generation identifier), firmware 8.4.x
- LOGO! Soft Comfort V8.4 installed on Windows 10/11
- Ethernet network with DHCP server or static IP plan
- MQTT broker - Eclipse Mosquitto is the typical choice for Home Assistant deployments
- Home Assistant OS, Container, or Supervised with the Mosquitto add-on (or an external broker)
- Node-RED (optional) - bundled with Home Assistant or installed standalone
- Network reachability from LOGO! to broker on TCP/1883 (plaintext) or TCP/8883 (TLS)
Hardware and Firmware Identification
Confirm the controller belongs to the LOGO! 8.4 generation before configuring MQTT. The Siemens 6ED1052 family covers all LOGO! 8 variants; the trailing generation identifier in the part number distinguishes firmware revisions. The 8.4 generation adds Ethernet and MQTT capability; earlier variants in the same family do not support MQTT.
| Generation | Typical Generation ID | MQTT Support | Ethernet |
|---|---|---|---|
| LOGO! 8 | -0BA0 | No | Optional expansion |
| LOGO! 8.1 | -0BA1 | No | Optional expansion |
| LOGO! 8.2 | -0BA2 | No | Yes (select BMs) |
| LOGO! 8.3 | -0BA3 | No | Yes (built-in) |
| LOGO! 8.4 | -0BA4 | Yes (firmware 8.4.x) | Yes (built-in) |
Verify firmware revision on a powered unit by navigating the integrated display to Setup > Diagnostics > FW Version, or read the device descriptor through LOGO! Soft Comfort V8.4 via Tools > Transfer > Diagnostics. Confirm the version reports 8.4.0 or higher before proceeding.
For authoritative documentation, refer to the Siemens Industry Online Support portal and the LOGO! product family page at Siemens LOGO!. The LOGO! 8 system manual and the LOGO! Soft Comfort V8.4 online help provide pin-out, register, and tag-mapping reference data.
Network Configuration
The LOGO! 8.4 BM exposes a 10/100 Mbit/s RJ45 Ethernet interface on the underside of the module. Out-of-box behavior is DHCP client with link-local fallback on 169.254.x.x/16. For predictable broker connections, assign a static IP.
Static IP via Onboard Display
- Press
ESCto enter the main menu. - Select
Network. - Set
IP Address(for example, 192.168.1.50),Subnet Mask(255.255.255.0), andGateway(192.168.1.1). - Optionally enable DNS and set
DNS Server 1if the broker is referenced by hostname. - Confirm with
OKand exit.
Static IP via LOGO! Soft Comfort
- Connect the PC to the LOGO! over Ethernet and establish an online connection.
- Open Tools > Transfer > IP Address Configuration.
- Enter static IP, subnet, and gateway; click
Assign IP Address. - Save the project so the new IP is part of the program card image.
homeassistant.local or mosquitto), DNS resolution must be functional. On Home Assistant OS, the supervisor DNS resolver handles container names automatically. On a flat LAN, prefer the broker's numeric IP to eliminate DNS-related startup risk.MQTT Broker Deployment
Home Assistant deployments typically run Eclipse Mosquitto as the broker. The Mosquitto add-on ships with default credentials that you must rotate before exposing the listener to any non-loopback network.
Mosquitto Configuration (mosquitto.conf)
listener 1883
allow_anonymous false
password_file /mosquitto/config/passwd
max_connections 100
max_inflight_messages 20
max_queued_messages 1000
listener 8883
cafile /mosquitto/config/ca_certificates.pem
certfile /mosquitto/config/server.pem
keyfile /mosquitto/config/server.key
require_certificate false
tls_version tlsv1.2
Generate credentials with mosquitto_passwd -c /mosquitto/config/passwd mqtt_user on the host running the broker. Issue a separate account for each LOGO! device so per-device ACLs can be applied.
Broker ACL (recommended)
user logo_living_room
topic readwrite logo/living_room/#
user logo_garage
topic readwrite logo/garage/#
This pattern limits each LOGO! client to its own topic tree, preventing lateral movement if a single device is compromised.
LOGO! Soft Comfort V8.4 MQTT Programming
Open LOGO! Soft Comfort V8.4 and load the active circuit program. MQTT configuration lives in the project properties, not on the function-block diagram canvas.
- Open File > Properties > MQTT.
- Tick
Enable MQTT. - Enter broker settings:
- Broker address: IP or hostname of Mosquitto
- Port: 1883 (plaintext) or 8883 (TLS)
-
Client ID: unique per LOGO! (for example,
logo_living_room_01) - Username / Password: broker credentials
- Keepalive (s): 60 typical; reduce to 30 on lossy WiFi links
-
Clean Session:
truerecommended for stateless telemetry - Will Topic / Will Payload / Will QoS / Will Retain: configure the Last Will and Testament so the broker publishes an offline marker if the LOGO! drops
- Map program variables to MQTT topics using the Variables table. Each tag can be either published (output from LOGO!) or subscribed (input to LOGO!).
- Specify the publish interval for cyclic tags. Minimum is 1 s; 5-15 s is typical for HVAC and lighting telemetry.
- Set QoS 0 for fire-and-forget telemetry; QoS 1 for command paths that must reach the broker at least once.
- Compile and transfer the program to the LOGO! over Ethernet.
Topic Naming Convention
Adopt a hierarchical, slash-delimited tree so ACLs and HA discovery logic remain manageable. A workable layout:
logo/<location>/<device_id>/status -- retain=true, QoS=1, payload={"online":true}
logo/<location>/<device_id>/inputs/I1 -- digital input I1
logo/<location>/<device_id>/inputs/I2
logo/<location>/<device_id>/outputs/Q1 -- digital output Q1
logo/<location>/<device_id>/analog/AI1 -- analog input (engineering units)
logo/<location>/<device_id>/command/Q1 -- setpoint commands (QoS=1)
logo/<location>/<device_id>/diagnostics/uptime
logo/<location>/<device_id>/diagnostics/fw
Payloads are short numeric or boolean primitives sent as strings (for example, "1", "23.4", "true") so downstream consumers do not require a parser library. When the LOGO! subscribes to a command topic, the payload is parsed against the tag's expected data type as defined in the Variables table.
Home Assistant Integration
Home Assistant's MQTT integration (HA MQTT integration documentation) consumes broker traffic and registers each topic as an entity. Enable MQTT discovery on the broker side so devices self-register without manual YAML edits.
Enable MQTT Discovery
In the Home Assistant MQTT integration configuration, set discovery: true and confirm discovery_prefix (default homeassistant). Publish a discovery message from any client or via Node-RED:
Topic: homeassistant/switch/living_room_q1/config
Payload (retained):
{
"name": "Living Room Light",
"unique_id": "logo_living_room_q1",
"command_topic": "logo/living_room/living_room_01/command/Q1",
"state_topic": "logo/living_room/living_room_01/outputs/Q1",
"payload_on": "1",
"payload_off": "0",
"qos": 1,
"retain": false,
"device": {
"identifiers": ["logo_living_room_01"],
"name": "Living Room LOGO!",
"model": "LOGO! 8.4 BM",
"manufacturer": "Siemens"
}
}
On receipt of this retained message, Home Assistant registers switch.living_room_q1 with proper device grouping. Repeat the pattern for sensors, lights, and binary sensors. For each new LOGO! tag, add a corresponding discovery message; HA generates the UI and state machine automatically.
Manual configuration.yaml (alternative)
Without discovery, register the integration manually:
mqtt:
broker: 192.168.1.10
port: 1883
username: !secret mqtt_user
password: !secret mqtt_password
switch:
- name: "Living Room Light"
unique_id: logo_living_room_q1
command_topic: "logo/living_room/living_room_01/command/Q1"
state_topic: "logo/living_room/living_room_01/outputs/Q1"
payload_on: "1"
payload_off: "0"
qos: 1
sensor:
- name: "Living Room Temperature"
state_topic: "logo/living_room/living_room_01/analog/AI1"
unit_of_measurement: "\u00b0C"
device_class: temperature
After configuration.yaml changes, run Developer Tools > YAML > Reload All YAML or restart Home Assistant.
Node-RED Flow Examples
Node-RED running as a Home Assistant add-on (palette manager node-red-contrib-home-assistant-websocket) bridges between LOGO! topics and HA's websocket API for flows that need sequence logic beyond HA's automation engine.
Subscribe and Display
- Drag an
mqtt innode onto the canvas. - Configure the broker:
localhost:1883with credentials. - Topic:
logo/+/+/analog/AI1(single-level wildcards per OASIS MQTT conventions). - Connect to a
debugnode to inspect payloads.
Publish a Command
- Drag an
mqtt outnode. - Topic:
logo/living_room/living_room_01/command/Q1. - QoS: 1, Retain: false.
- Trigger from an
injectnode with payload1or0.
Node-RED also supports the node-red-contrib-mqtt-broker palette for direct broker connection. See the Node-RED official documentation for palette installation and TLS configuration.
Protocol Comparison: MQTT vs S7 vs Modbus
Select the protocol that matches bandwidth, firewall topology, and the integration layer in use.
| Attribute | MQTT | S7 (S7comm) | Modbus TCP |
|---|---|---|---|
| Topology | Publish/Subscribe | Client/Server | Client/Server |
| Default port | 1883 / 8883 (TLS) | 102 (ISO-on-TCP) | 502 |
| Payload format | Free (JSON recommended) | Binary TPKT/COTP | Binary PDU |
| Bandwidth overhead | Low (publish on change) | High (continuous polling) | Low to moderate |
| Discovery | Native (HA discovery) | None | None |
| Firewall traversal | Single TCP port | Often blocked | Single TCP port |
| TLS support | Yes (MQTTS) | Limited (via TIA configuration) | Optional (Modbus Security) |
| Cloud friendly | Excellent | Poor | Limited |
| Typical latency | 50-200 ms | 5-50 ms | 5-50 ms |
| Standard body | OASIS MQTT v5.0 | Siemens proprietary | Modbus Organization |
| CPU load on PLC | Lowest | High (chatty polling) | Moderate |
MQTT's pub/sub architecture eliminates polling overhead and avoids holding long-lived TCP sessions per consumer. The OASIS standard (MQTT v5.0 specification) means any modern broker, any language client, and any cloud provider can ingest LOGO! data without proprietary adapters. S7 remains the lowest-latency option for SCADA/HMI panels running TIA Portal or WinCC; choose by use case rather than exclusivity.
Security Hardening
MQTT was not designed with strong security in mind; the burden falls on the integrator. Apply the following baseline:
- TLS everywhere. Enable port 8883 with at least TLSv1.2. Issue a server certificate signed by a private CA known to the LOGO!. Avoid self-signed certs unless the CA bundle is manually trusted by all clients.
- Per-device credentials. Generate a unique username and password for each LOGO! and scope ACLs to the device's topic tree.
-
Broker hardening. Disable anonymous access (
allow_anonymous false). Setmax_connections,max_inflight_messages, andmax_queued_messagesto defend against runaway clients. - Network segmentation. Place LOGO! and broker on a VLAN isolated from guest WiFi and corporate subnets.
- Will topic retained. Configure the Last Will and Testament so a dying LOGO! publishes an offline marker, enabling HA automations to fail safe.
- Rotate credentials. Plan 90-day rotation; update the LOGO! Soft Comfort project and re-transfer the program each cycle.
- Disable unused services. If NTP and the webserver are not needed, switch them off in LOGO! Soft Comfort to reduce the attack surface.
Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic | Resolution |
|---|---|---|---|
| LOGO! reports MQTT error in diagnostics | Broker unreachable | Ping broker from PC on same subnet; verify route | Fix IP/gateway on LOGO! or open firewall on broker host |
| Connection drops every ~90 s | Keepalive shorter than NAT timeout | Check router NAT timeout (default 120-300 s) | Reduce LOGO! keepalive to 30 s or use static NAT entry |
| Auth rejected immediately | Wrong username/password | Test with mosquitto_sub -t '#' -u user -P pass
|
Regenerate credentials; reload broker |
| Topics published but no subscribers see them | Wildcard mismatch | Subscribe to # from mosquitto_sub
|
Verify subscriber filter and ACLs |
| HA does not register entities | Discovery disabled or wrong prefix | Inspect mosquitto_sub -t 'homeassistant/#' -v
|
Enable discovery and verify prefix |
| TLS handshake fails | CA cert mismatch | Capture with openssl s_client -connect broker:8883
|
Import correct CA into LOGO! Soft Comfort |
| Hostname resolution fails | No DNS configured | Verify from PC: nslookup broker.local
|
Set DNS server on LOGO! or use broker IP |
| Broker reports client ID in use | Duplicate ClientID | List active clients: mosquitto_ctrl clients
|
Make ClientID unique per LOGO! |
| Outputs toggle but state feedback stuck | Subscribe not configured | Check Variables table in Soft Comfort | Mark output tag as published with retain=true |
| Periodic publish misses frames | WiFi interference or QoS mismatch | Monitor WiFi RSSI; check broker logs for QoS errors | Switch to wired Ethernet or QoS 1 with retain |
Diagnostic Tools
-
mosquitto_sub -h <broker> -p 1883 -u <user> -P <pw> -t '#' -v- dump all traffic for live inspection -
mosquitto_pub -h <broker> -t 'logo/test' -m 'hello'- publish a test frame -
mosquitto_ctrl -h <broker> clients- list active client connections (broker version dependent) - Wireshark with the MQTT dissector for payload and timing analysis on the broker NIC
- LOGO! Soft Comfort V8.4 Online > Watch Table for live variable values
Verification Procedure
After commissioning, validate the integration end-to-end:
- Power the LOGO! and confirm it acquires its DHCP lease or static IP.
- From a PC on the same subnet, run
ping <logo_ip>; expect replies. - Open a terminal and run
mosquitto_sub -h <broker> -u <user> -P <pw> -t 'logo/#' -v. Expect cyclic telemetry within 5-30 seconds. - Toggle a digital input on the LOGO!. Verify the corresponding topic payload flips within one publish interval.
- From HA Developer Tools > MQTT, publish a command frame to
logo/<location>/<device>/command/Q1with payload1. Verify the LOGO! output energises and feedback appears on the state topic. - Force an HA restart and verify the LOGO! reconnects without manual intervention (within two keepalive intervals).
- Pull the Ethernet cable from the LOGO! for 60 seconds. Confirm the Will topic publishes an offline marker.
- Reconnect and confirm normal telemetry resumes.
FAQ
Which Siemens LOGO! firmware version first supported MQTT?
LOGO! 8.4 firmware (released 2022-2023) introduced native MQTT client capability. LOGO! 8.0, 8.1, 8.2, and 8.3 modules cannot be field-upgraded to 8.4 because MQTT support requires the 8.4 hardware platform identified in the 6ED1052 -0BA4 generation.
Does MQTT replace the S7 communication path on LOGO! 8.4?
No. MQTT, S7 (S7comm over TCP/102), and Modbus TCP coexist on the same Ethernet port. MQTT is best for IoT/cloud integration and Home Assistant discovery; S7 remains the lowest-latency option for SCADA/HMI panels running TIA Portal or WinCC. Choose by use case, not exclusivity.
Can I expose the LOGO! MQTT broker to the public internet?
Not recommended on port 1883 because credentials and payloads are cleartext. If remote access is required, terminate MQTT over TLS on port 8883 behind a VPN or mutual-TLS reverse proxy, restrict by source IP, and rotate credentials on a defined schedule.
What payload format does LOGO! 8.4 publish?
LOGO! 8.4 publishes primitives (booleans and numeric strings) per the Variables table configured in LOGO! Soft Comfort. Strings such as "1", "0", "23.4", or "true" are typical. The integrator defines the topic hierarchy and payload conventions; no proprietary wrapper is applied.
How do I migrate an existing LOGO! 8.3 program to 8.4 with MQTT enabled?
Open the existing program in LOGO! Soft Comfort V8.4, save under the new version, enable MQTT in File > Properties > MQTT, map variables to topics, compile, and transfer via Ethernet. Backwards compatibility is preserved for FBD and UDF logic. Verify all analog scaling and threshold blocks function identically before commissioning the MQTT topics.