Shelly support by Domoticz

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

User avatar
waltervl
Posts: 7037
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Shelly support by Domoticz

Post by waltervl »

gizmocuz wrote: Thursday 19 November 2026 7:25 I have very limited Shelly devices, but did test against a wide range of MQTT-AD shelly configuration files i could find.
Then is the question: How to find or create those MQTT-AD shelly configuration files? Is it by doing a setting in the shelly user interface? Or just search on the net and publish it to MQTT?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 552
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Shelly support by Domoticz

Post by BartSr »

Apart from all fine and helpfull instructions:
Domoticz is running in docker on a HP T630 thin client with plenty of storage.
I bought cheapest Shellies at Hornbach. ChatGpt advised and learned how to get these to work using python and mqtt. Once that was done integration in dz using auto mqtt detect was piece of cake.
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
imautohuttraeger
Posts: 474
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: lat.beta
Location: Germany
Contact:

Re: Shelly support by Domoticz

Post by imautohuttraeger »

BartSr wrote: Thursday 19 November 2026 19:31 Apart from all fine and helpfull instructions:
Domoticz is running in docker on a HP T630 thin client with plenty of storage.
I bought cheapest Shellies at Hornbach. ChatGpt advised and learned how to get these to work using python and mqtt. Once that was done integration in dz using auto mqtt detect was piece of cake.
So you first had to make an own python script / plugin / whatsoever ?
Stop, look and listen.
gerardvs
Posts: 99
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Shelly support by Domoticz

Post by gerardvs »

You could also make a little bash script. As an example this is the script I use to add my Shellies 1 Gen3. It is not that difficult.

Code: Select all

#!/bin/env bash

# Basic settings
BROKERIP="192.168.123.123"
BROKERPORT="1883"
MQTTROOT="homeassistant"

# Change for each device
SHELLYDEVICE="shelly1g3-112233445566"
SHELLYNAME="Shelly 1 BlueG3"
#

# Add Relay
mosquitto_pub -h $BROKERIP -p $BROKERPORT -r \
  -t "$MQTTROOT/switch/$SHELLYDEVICE/config" \
  -m '{
    "name": "$SHELLYNAME",
    "unique_id": "$SHELLYDEVICE-relay",
    "command_topic": "$SHELLYDEVICE/command/switch:0",
    "state_topic": "$SHELLYDEVICE/status/switch:0",
    "value_template": "{{ value_json.output }}",
    "payload_on": "on",
    "payload_off": "off",
    "state_on": "true",
    "state_off": "false"
  }'   

# Add Temperature
mosquitto_pub -h $BROKERIP -p $BROKERPORT -r \
  -t "$MQTTROOT/sensor/$SHELLYDEVICE-temperature/config" \
  -m '{
    "name": "$SHELLYNAME Temperature",
    "unique_id": "$SHELLYDEVICE-temperature",
    "state_topic": "$SHELLYDEVICE/status/switch:0",
    "value_template": "{{ value_json.temperature.tC }}",
    "unit_of_measurement": "C",
    "device_class": "temperature"
  }'   

# Add Input (be aware of button type in Shelly device)
mosquitto_pub -h $BROKERIP -p $BROKERPORT -r \
  -t "$MQTTROOT/binary_sensor/$SHELLYDEVICE-input/config" \
  -m '{
    "name": "$SHELLYNAME Input",
    "unique_id": "$SHELLYDEVICE-input",
    "state_topic": "$SHELLYDEVICE/status/input:0",
    "value_template": "{{ value_json.state }}",
    "payload_on": "true",
    "payload_off": "false",
    "device_class": "power"
  }'   

Post Reply