Python Plugin: Shelly MQTT
Moderator: leecollings
- jacobsentertainment
- Posts: 211
- Joined: Thursday 01 October 2020 1:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021-1
- Location: Not @ home
- Contact:
Re: Python Plugin: Shelly MQTT
Ok I got it working, devices are added to the list now...
what did I do wrong, I mistook the mqtt client gateway for the mqtt with auto discovery
After I added it it went automatically, so my mistake.
A few comments, though.
All options of for example a dimmer appear, on its own this is good but can these be preset that they are not completely added, I mean you can make your own selection which ones you want to actively add. (instead of putting all parts unused afterwards )
I also noticed that the feedback of the dimmer does not work optimally, in the old shelly mqtt the slider is linked to the dimmer, this is not the case with teacher, I can dim the dimmer but I get no feedback. Also, I can no longer switch on the dimmer with the slider, first switch on the knob and then set the setting in the slider.
If i go to the shelly http page and slide the slider to 60% this is not connected to the actual slider in domoticz. Also scripting in dzvent is changed.
One more question, can we use the old shelly-mqtt to the side of this, so I can have my dimmers trough shelly-mqtt and add the new device like the trv and i4 trough teacher4domoticz? Or is this something we have to figure out ourselfs?
what did I do wrong, I mistook the mqtt client gateway for the mqtt with auto discovery
After I added it it went automatically, so my mistake.
A few comments, though.
All options of for example a dimmer appear, on its own this is good but can these be preset that they are not completely added, I mean you can make your own selection which ones you want to actively add. (instead of putting all parts unused afterwards )
I also noticed that the feedback of the dimmer does not work optimally, in the old shelly mqtt the slider is linked to the dimmer, this is not the case with teacher, I can dim the dimmer but I get no feedback. Also, I can no longer switch on the dimmer with the slider, first switch on the knob and then set the setting in the slider.
If i go to the shelly http page and slide the slider to 60% this is not connected to the actual slider in domoticz. Also scripting in dzvent is changed.
One more question, can we use the old shelly-mqtt to the side of this, so I can have my dimmers trough shelly-mqtt and add the new device like the trv and i4 trough teacher4domoticz? Or is this something we have to figure out ourselfs?
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
jacobsentertainment wrote: ↑Wednesday 20 September 2023 11:33 Ok I got it working, devices are added to the list now...
what did I do wrong, I mistook the mqtt client gateway for the mqtt with auto discovery
You can edit mqtt_templates.txt freely as it is a simple text file (every windows user has the notepad at least), and you can remove any parts you do not need. I made it with a purpose: to let users customize their own needs by themself.jacobsentertainment wrote: ↑Wednesday 20 September 2023 11:33 I mean you can make your own selection which ones you want to actively add. (instead of putting all parts unused afterwards )
Status topic is provided to the Domoticz AD, so in theory it should work. I will check it and collect some mqtt payloads to report an issue to upstream domoticz.jacobsentertainment wrote: ↑Wednesday 20 September 2023 11:33 I also noticed that the feedback of the dimmer does not work optimally, in the old shelly mqtt the slider is linked to the dimmer, this is not the case with teacher, I can dim the dimmer but I get no feedback. Also, I can no longer switch on the dimmer with the slider, first switch on the knob and then set the setting in the slider.
If i go to the shelly http page and slide the slider to 60% this is not connected to the actual slider in domoticz.
Its not plugin related.
Yes of course you can use both plugins at a time. As i mentioned, you can delete anything from your mqtt_templates.txt its structure is very simple, if a device ID is not found in the templates, than the Teacher will not create config objects...jacobsentertainment wrote: ↑Wednesday 20 September 2023 11:33 One more question, can we use the old shelly-mqtt to the side of this, so I can have my dimmers trough shelly-mqtt and add the new device like the trv and i4 trough teacher4domoticz? Or is this something we have to figure out ourselfs?
- jacobsentertainment
- Posts: 211
- Joined: Thursday 01 October 2020 1:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021-1
- Location: Not @ home
- Contact:
Re: Python Plugin: Shelly MQTT
Thanks for the reply,
I'm still struggling with the dimmers. Normally I was able to use "dimTo(30)" in DZvent but that doesn't work anymore probably due to not being able to use the slider to switch on the device. Now i have to split up the action to switchOn() and then dimTo(30).afterSec(1) in many scripts, it's maybe nog due to the plugin but more between de transport of data.
If you would have a look in to it that would really save the day here
I'm still struggling with the dimmers. Normally I was able to use "dimTo(30)" in DZvent but that doesn't work anymore probably due to not being able to use the slider to switch on the device. Now i have to split up the action to switchOn() and then dimTo(30).afterSec(1) in many scripts, it's maybe nog due to the plugin but more between de transport of data.
If you would have a look in to it that would really save the day here
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
Its a limitation of Domoticz MQTT Autodiscovery hardware. It has a command topic which sends "turn:on" to Shelly on switchOn() command, and a brightness topic which sends out brightness value on dimTo() to Shelly. But as Domoticz has no template support, there are nothing i can do for this matter, i am unable to add "turn:on" command automatically before brightness. And for some reason Shelly hardware wont switch on itself on brightness command, when its in turned off state..jacobsentertainment wrote: ↑Tuesday 26 September 2023 10:52 Thanks for the reply,
I'm still struggling with the dimmers. Normally I was able to use "dimTo(30)" in DZvent but that doesn't work anymore probably due to not being able to use the slider to switch on the device. Now i have to split up the action to switchOn() and then dimTo(30).afterSec(1) in many scripts, it's maybe nog due to the plugin but more between de transport of data.
If you would have a look in to it that would really save the day here
Last edited by lwolf on Saturday 30 September 2023 20:48, edited 1 time in total.
Re: Python Plugin: Shelly MQTT
Anyone tested the plugin with the new Shelly mini? Thanks!
- jacobsentertainment
- Posts: 211
- Joined: Thursday 01 October 2020 1:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021-1
- Location: Not @ home
- Contact:
Re: Python Plugin: Shelly MQTT
Today a new beta update installed (2023,2 build 15578)
After installing, reboot and clearing the cache domoticz was working except the shelly dimmers. All other data is there temperatures, setpoints and shelly em3.
The shelly dimmers can only be switched off once and can't be switched on or change the level.
Tried to reboot the dimmer and teach it as a new device but no luck. Issues stays. No errors in the log, just no communication.
Update, within an hour updated to (2023,2 build 1581) still the same. (wat een gepruts)
After installing, reboot and clearing the cache domoticz was working except the shelly dimmers. All other data is there temperatures, setpoints and shelly em3.
The shelly dimmers can only be switched off once and can't be switched on or change the level.
Tried to reboot the dimmer and teach it as a new device but no luck. Issues stays. No errors in the log, just no communication.
Update, within an hour updated to (2023,2 build 1581) still the same. (wat een gepruts)
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
Yes, its the nature of beta releases... Dimmer status update fixed, but caused to mess switching on. Its in progress:jacobsentertainment wrote: ↑Friday 06 October 2023 11:23 Today a new beta update installed (2023,2 build 15578)
After installing, reboot and clearing the cache domoticz was working except the shelly dimmers. All other data is there temperatures, setpoints and shelly em3.
The shelly dimmers can only be switched off once and can't be switched on or change the level.
Tried to reboot the dimmer and teach it as a new device but no luck. Issues stays. No errors in the log, just no communication.
Update, within an hour updated to (2023,2 build 1581) still the same. (wat een gepruts)
https://github.com/domoticz/domoticz/issues/5824
Its communicating, but for some reason sending out brightness command instead of turn:on, which will never turn on a Shelly.
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
The plugin will never got mini support, the Teacher app will get.. if somebody tell me what MQTT topics and payloads to use.
As currently there is ZERO information about the new Mini in the official documentation:
https://shelly-api-docs.shelly.cloud/ge ... ices/Mqtt/#
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Python Plugin: Shelly MQTT
Hi @lwolf,
The API for the mini is the same as for the standard device.
See: https://shelly-api-docs.shelly.cloud/ge ... lyPlus1PM/
Regards
The API for the mini is the same as for the standard device.
See: https://shelly-api-docs.shelly.cloud/ge ... lyPlus1PM/
Regards
Re: Python Plugin: Shelly MQTT
Yes ofcourse I mean the Teacher App. Maybe it is wise to rebrand this topic to Shelly Teacher App, because the Shelly_MQTT plugin is not supported anymore.lwolf wrote: ↑Sunday 08 October 2023 16:32The plugin will never got mini support, the Teacher app will get.. if somebody tell me what MQTT topics and payloads to use.
As currently there is ZERO information about the new Mini in the official documentation:
https://shelly-api-docs.shelly.cloud/ge ... ices/Mqtt/#
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
Thanks! Gen2 docs seems very nice, but unfortunately it lacks what Tim Berners-Lee invented the WWW for: information!FireWizard wrote: ↑Sunday 08 October 2023 22:13 Hi @lwolf,
The API for the mini is the same as for the standard device.
See: https://shelly-api-docs.shelly.cloud/ge ... lyPlus1PM/
Regards
When i check a Gen1 doc:
https://shelly-api-docs.shelly.cloud/ge ... ly2-5-mqtt
I see _immediately_ that i have to write payload: '1' to topic: 'shellies/shellyswitch25-<deviceid>/relay/0/command' to switch on a device.
And "SHSW-25" is the model ID for detection.
But if check a Gen2 doc:
https://shelly-api-docs.shelly.cloud/ge ... lyPlus1PM/
I see only hyperlinks and tables, without one usable example.... I've found _every usable MQTT information_ by Google, when i added Gen2 devices.
All i can see, that it has Input:0 and Switch:0 the same as ShellyPlus1 so it will surely work... if somebody tell me, what topic it uses...
Maybe shellyplus1mini? Just a hunch, as not documented.
- jacobsentertainment
- Posts: 211
- Joined: Thursday 01 October 2020 1:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021-1
- Location: Not @ home
- Contact:
Re: Python Plugin: Shelly MQTT
lwolf wrote: ↑Sunday 08 October 2023 16:26
Yes, its the nature of beta releases... Dimmer status update fixed, but caused to mess switching on. Its in progress:
https://github.com/domoticz/domoticz/issues/5824
Its communicating, but for some reason sending out brightness command instead of turn:on, which will never turn on a Shelly.
Today installed latest update 15620 and now it's possible to switch on with use of the slider like before, except the feedback isn't working once clicked on the button to switch off the button stays on and the actual light goes off.
The feedback on the slider is working except the status of the device on or off isn't.
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
You have to download latest ShellyTeacher, delete existing Shelly dimmer devices from Domoticz and reteach them with Teacher, as config object changed.jacobsentertainment wrote: ↑Thursday 26 October 2023 9:07 Today installed latest update 15620 and now it's possible to switch on with use of the slider like before, except the feedback isn't working once clicked on the button to switch off the button stays on and the actual light goes off.
The feedback on the slider is working except the status of the device on or off isn't.
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python Plugin: Shelly MQTT
I have a strange behavior with mqtt auto discover and shelly blinds.
When the blinds are OPEN I get a flood of logging (OPEN, CLOSE,...)
When I close my blind, (Kris:(IP:...), there is one logging OPEN and CLOSE and then it stops. But when blinds
are back open I get a flood off logs , (OPEN , CLOSED, ...)!
And the user is mqtt auto discover
Is this a error or ? See screenshots
I used the latest ShellyTeacher for adding my shelly devices. Great work !
(edit)
Add some more info with screenshot from mqtt explorer
When the blinds are OPEN I get a flood of logging (OPEN, CLOSE,...)
When I close my blind, (Kris:(IP:...), there is one logging OPEN and CLOSE and then it stops. But when blinds
are back open I get a flood off logs , (OPEN , CLOSED, ...)!
And the user is mqtt auto discover
Is this a error or ? See screenshots
I used the latest ShellyTeacher for adding my shelly devices. Great work !
(edit)
Add some more info with screenshot from mqtt explorer
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python Plugin: Shelly MQTT
I know what the problem was. Accept new hardware/sensor was enabled. As soon I disable it the logs stoppedcapman wrote: ↑Wednesday 01 November 2023 13:14 I have a strange behavior with mqtt auto discover and shelly blinds.
When the blinds are OPEN I get a flood of logging (OPEN, CLOSE,...)
When I close my blind, (Kris:(IP:...), there is one logging OPEN and CLOSE and then it stops. But when blinds
are back open I get a flood off logs , (OPEN , CLOSED, ...)!
And the user is mqtt auto discover
Is this a error or ? See screenshots
I used the latest ShellyTeacher for adding my shelly devices. Great work !
log blinds open closed.jpg
(edit)
Add some more info with screenshot from mqtt explorer
mqtt explorer.jpg
-
- Posts: 216
- Joined: Saturday 10 November 2018 18:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Hungary
- Contact:
Re: Python Plugin: Shelly MQTT
ShellyTeacher has got a new topic
viewtopic.php?t=40998
viewtopic.php?t=40998
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Python Plugin: Shelly MQTT
I did . The problem was that I enabled a notification for the action blinds closed. So I get repeately a flow of blinds closed .
As soon a enable 'accept new hardware' , I get again notification flood when the blinds are open.
-
- Posts: 564
- Joined: Sunday 11 December 2016 13:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Shelly MQTT
i finally got my shelly plus 1pm partially working in domoticz, but i can only turn the switch on, not off.
what can be wrong?
what can be wrong?
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: Shelly MQTT
Shelly plugin or Shelly Teacher script? For teacher script use topic viewtopic.php?t=40998
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest