Page 26 of 26

Re: Python Plugin: Shelly MQTT

Posted: Thursday 23 November 2023 16:34
by tjabas
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?

Re: Python Plugin: Shelly MQTT

Posted: Thursday 23 November 2023 16:42
by waltervl
tjabas wrote: 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)

Re: Python Plugin: Shelly MQTT

Posted: Tuesday 12 December 2023 19:13
by tjabas
Hi!

i just updated my rpi to bullseye and now it seems like shelly MQTT isnt working anymore.

is there any fix for this?

Re: Python Plugin: Shelly MQTT

Posted: Wednesday 13 December 2023 9:08
by lwolf
tjabas wrote: Tuesday 12 December 2023 19:13 Hi!

i just updated my rpi to bullseye and now it seems like shelly MQTT isnt working anymore.

is there any fix for this?
ShellyMQTT is not supported anymore. You can use ShellyTeacher in the future.
tjabas wrote: Tuesday 12 December 2023 19:13 2023-12-12 18:48:29.896 Error: Shelly MQTT: Disconnected from MQTT Server: 127.0.0.1:1883
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.

You can find here, what is needed to change in your mosquitto.conf file to enable anonymous access or how can you create user/password for it:
https://www.sigmdel.ca/michel/ha/rpi/mo ... ye_en.html

Re: Python Plugin: Shelly MQTT

Posted: Saturday 21 December 2024 12:36
by DeKnep
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:

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 
and 2 rows (1179 and 1180) need to be added after row 1178:

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.
I just encountered the same issue and found this fix here.
Thanks! :)

Just a small heads-up for others who also run into this: In v0.6.1 of the ShellyMQTT plugin the corresponding lines are 6 lines further down from Xavier82's description.