Integration#KNX#Home Assistant#Retrofit#MQTT

Shelly + KNX via Home Assistant: Retrofit Lighting Without Rewiring

SmartMāja Engineering Team·2026-05-29·8 min read

Retrofit projects — converting an existing apartment from manual switches to a smart home — present a fundamental wiring challenge. Running new KNX cables from every switch back to a central panel requires opening walls, patching plaster and redecorating. For many residential clients, this is prohibitively disruptive. Shelly Gen2 WiFi relays, mounted behind existing faceplates in the switch box, bridge this gap: no new cable runs, near-zero wall disruption, and Home Assistant's KNX integration provides the bridge to full KNX compatibility for scenes, energy monitoring and remote access.

How Shelly behind-faceplate installation works

Standard European switch boxes (60mm round box or 68mm German standard) have enough depth for a Shelly Plus 1PM behind a standard 1-gang switch. The Shelly connects to the existing 230V live and neutral in the switch box, plus the switch output wire to the light. The existing wall switch becomes an input to the Shelly (the physical button on the switch triggers the Shelly input, which Shelly translates to a relay on/off command). No additional wiring needed — the existing cable infrastructure controls the Shelly exactly as before, but now the relay state is also accessible over WiFi.

Local MQTT: no cloud dependency

Shelly Gen2 devices (Plus 1PM, Plus 2PM, Dimmer 0/1-10V, Pro 4PM) support local MQTT out of the box. Configure in Shelly web interface: MQTT broker = Home Assistant IP address:1883, topic prefix = "shellies/plus1pm-bedroom". HA's Mosquitto addon receives all Shelly state messages locally. The Shelly devices never need to connect to Shelly cloud for this to work. For professional installations, disable Shelly cloud entirely and enable only local MQTT — this removes any dependency on Allterco Robotics servers.

Home Assistant KNX bridge configuration

With HA's KNX integration (via KNX IP router or IP interface on the same LAN subnet), bidirectional bridging between Shelly MQTT and KNX group addresses becomes straightforward. Example HA automation for Shelly Plus 1PM bedroom light:

[code yaml] alias: "Shelly Bedroom → KNX state sync" trigger: - platform: mqtt topic: "shellies/plus1pm-bedroom/relay/0/output" action: - service: knx.send data: address: "1/1/3" payload: "{{ trigger.payload == 'true' }}" type: "1byte_unsigned" [/code]

The reverse automation (KNX → Shelly): when a KNX scene changes group address 1/1/3 to 1, publish MQTT command to turn Shelly relay on. This keeps KNX scenes and Shelly physical switches in sync.

Shelly Pro 4PM: DIN-rail for the panel

For panel-mounted applications, Shelly Pro 4PM is a DIN-rail 4-channel relay (4× 16A) with power metering on each channel. Panel engineers use Pro 4PM for AV rack power control, gate motor circuits, pool pump, garden irrigation — circuits where KNX binary output module is overkill (no need for group addresses) but remote relay control via HA is useful. Power metering per channel (W, kWh) feeds the HA energy dashboard, and KNX group addresses can display per-circuit consumption on a Gira X1 panel display.

Shelly Dimmer 0/1-10V: replacing a KNX analog output channel

The Shelly Dimmer 0/1-10V outputs a 0-10V DC signal — the same signal that a KNX analog output module sends to Belimo actuators or DALI LED drivers. In retrofit projects where 0-10V dimmable LED drivers exist but no KNX analog module was installed, a Shelly Dimmer behind the switch plate can provide 0-10V control via WiFi → HA → KNX mapping. HA automation: KNX DPT 5.001 percentage value (0-255) → HA converts to 0-100% → MQTT publish to Shelly Dimmer → 0-10V output to LED driver. Cost comparison: Shelly Dimmer 0/1-10V ≈ €35, vs KNX analog output module ≈ €200+. For retrofit projects with 5-10 circuits, the cost saving is significant.

Shelly EM: 3-phase energy metering without MID certification

Shelly EM Gen2 uses CT clamps on each phase — no break in circuit, clamp around existing cable. Data: per-phase voltage, current, power (W), reactive power (VAR), apparent power (VA), power factor, total kWh. Via MQTT, all values reach HA and from there to KNX group addresses for dashboard visualisation. Limitation: Shelly EM is not MID-certified (EU Measuring Instruments Directive). It cannot be used for billing purposes or tenant sub-metering. For billing, use a certified DIN-rail Modbus energy meter (Finder 7M, Carlo Gavazzi EM110). Shelly EM is appropriate for self-consumption monitoring and approximate load management — not tenant billing.

VLAN isolation for IoT security

Shelly devices should be isolated on a separate IoT VLAN, not on the same network segment as KNX IP routers or security cameras. Reason: Shelly firmware auto-updates from Allterco cloud servers — allowing IoT devices onto the KNX/security VLAN opens a potential path for firmware-level compromise reaching the KNX infrastructure. Router firewall rule: IoT VLAN → HA only (port 1883 MQTT); block all other cross-VLAN traffic. HA sits on its own VLAN with access to both IoT and KNX subnets, acting as a security boundary.

When not to use Shelly in KNX projects

Shelly has clear limitations for professional KNX work. No ETS6 integration — Shelly devices are not KNX-certified and cannot appear in the ETS6 device catalogue. No IEC 61439 DIN-rail certification except Pro series. Response latency: 100-300ms via MQTT vs. 10-50ms for native KNX telegrams — not suitable for time-critical scenes where lighting and blind commands must synchronise. No KNX safety priority — fire alarm cannot override Shelly relays via KNX safety telegram. Reserve Shelly for retrofit convenience circuits: individual room light supplements, AV equipment power, garden/pool circuits. Use certified KNX actuators for primary lighting, HVAC and any safety-related circuit.

Need help with your KNX or DALI project?

Our certified engineers can discuss panel design, commissioning, integrations and project-specific edge cases. Free initial consultation.

Contact our engineers →
Ielādējas...
Uz augšu