Re: Python Plugin: Shelly MQTT
Posted: Thursday 23 November 2023 16:34
I'm using the shelly mqtt plugin and also the teacher software in windows, I thought that I needed both these softwares for the Shelly plus devices?
Did you read the read.me of the script
ShellyTeacher 4 Domoticz
Shelly device teacher for Domoticz MQTT Autodiscovery hardware
You need to understand before installation:
this is not compatible with the old ShellyMQTT plugin, its based on a different hardware, which will create new devices
only the Shelly device types listed in the "Implemented devices" will be recognised, but you can change/enhance templates.txt file to add more devices
its not a plugin, nor a service, it doesn't need to run all the time - only once (Domoticz MQTT Autodiscovery is the Domoticz integrated hardware)
ShellyMQTT is not supported anymore. You can use ShellyTeacher in the future.
If you are unable to connect to MQTT broker after upgrading Linux distribution, than its not a plugin issue, but the Mosquitto broker default security settings changed, and you are using without name+password.
I just encountered the same issue and found this fix here.Xavier82 wrote: ↑Wednesday 26 October 2022 11:03 So I finally found the issue/error and with some help I managed to fix it!:
2 rows (line 1177+1178) need to be adjusted:and 2 rows (1179 and 1180) need to be added after row 1178:Code: Select all
elif (mqttpath[2] in ["white"]) or ("2LED" in unitname): Domoticz.Device(Name=unitname, Unit=iUnit,Type=241, Subtype=3, Switchtype=7, Used=1,DeviceID=unitname).Create() # create Color White device
Code: Select all
elif (mqttpath[2] in ["light"]): Domoticz.Device(Name=unitname, Unit=iUnit,Type=244, Subtype=73, Switchtype=7, Used=1,DeviceID=unitname).Create() # create Light Dimmer device
To all who are using the Shelly MQTT Python script of "enesbcs" and have issues with device type in Domoticz with a Shelly Dimmer2
Copy the code and paste(overwrite+ add) the code in the /domoticz/plugins/Shelly_MQTT/plugin.py file.
Save the file plugin.py file.
Remove the faulty devices in Domoticz
Quickly restart Domoticz service
After some time you will find the new created devices in the device tab with the correct device type "Light/Switch, Switch, Dimmer" instead of "Color Switch".
I tried to contact "enesbcs" but failed, I also tried to do a new pull request on GitHub, but this also failed because it is not supported.