Page 25 of 26

Re: Python Plugin: Shelly MQTT

Posted: Wednesday 20 September 2023 11:33
by jacobsentertainment
Ok I got it working, devices are added to the list now... :lol:
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?

Re: Python Plugin: Shelly MQTT

Posted: Monday 25 September 2023 18:16
by lwolf
jacobsentertainment wrote: Wednesday 20 September 2023 11:33 Ok I got it working, devices are added to the list now... :lol:
what did I do wrong, I mistook the mqtt client gateway for the mqtt with auto discovery

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 )
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 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.
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 Also scripting in dzvent is changed.
Its not plugin related.
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?
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...

Re: Python Plugin: Shelly MQTT

Posted: Tuesday 26 September 2023 10:52
by jacobsentertainment
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 :mrgreen:

Re: Python Plugin: Shelly MQTT

Posted: Saturday 30 September 2023 20:46
by lwolf
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 :mrgreen:
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..

Re: Python Plugin: Shelly MQTT

Posted: Thursday 05 October 2023 12:02
by CronoS
Anyone tested the plugin with the new Shelly mini? Thanks!

Re: Python Plugin: Shelly MQTT

Posted: Friday 06 October 2023 11:23
by jacobsentertainment
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)

Re: Python Plugin: Shelly MQTT

Posted: Sunday 08 October 2023 16:26
by lwolf
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)
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. :D

Re: Python Plugin: Shelly MQTT

Posted: Sunday 08 October 2023 16:32
by lwolf
CronoS wrote: Thursday 05 October 2023 12:02 Anyone tested the plugin with the new Shelly mini? Thanks!
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/#

Re: Python Plugin: Shelly MQTT

Posted: Sunday 08 October 2023 22:13
by FireWizard
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

Re: Python Plugin: Shelly MQTT

Posted: Monday 09 October 2023 10:12
by CronoS
lwolf wrote: Sunday 08 October 2023 16:32
CronoS wrote: Thursday 05 October 2023 12:02 Anyone tested the plugin with the new Shelly mini? Thanks!
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/#
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.

Re: Python Plugin: Shelly MQTT

Posted: Monday 09 October 2023 17:25
by lwolf
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
Thanks! Gen2 docs seems very nice, but unfortunately it lacks what Tim Berners-Lee invented the WWW for: information!

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. :D
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... :D
Maybe shellyplus1mini? Just a hunch, as not documented.

Re: Python Plugin: Shelly MQTT

Posted: Thursday 26 October 2023 9:07
by jacobsentertainment
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. :D

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.

Re: Python Plugin: Shelly MQTT

Posted: Thursday 26 October 2023 17:32
by lwolf
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.
You have to download latest ShellyTeacher, delete existing Shelly dimmer devices from Domoticz and reteach them with Teacher, as config object changed.

Re: Python Plugin: Shelly MQTT

Posted: Wednesday 01 November 2023 13:14
by capman
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 :shock:
Is this a error or ? See screenshots
I used the latest ShellyTeacher for adding my shelly devices. Great work !
log blinds open closed.jpg
log blinds open closed.jpg (289.44 KiB) Viewed 1808 times
(edit)
Add some more info with screenshot from mqtt explorer
mqtt explorer.jpg
mqtt explorer.jpg (28.71 KiB) Viewed 1789 times

Re: Python Plugin: Shelly MQTT

Posted: Tuesday 07 November 2023 17:16
by capman
capman 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 :shock:
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
I know what the problem was. Accept new hardware/sensor was enabled. As soon I disable it the logs stopped 8-)

Re: Python Plugin: Shelly MQTT

Posted: Tuesday 07 November 2023 17:22
by lwolf
capman wrote: Tuesday 07 November 2023 17:16 I know what the problem was. Accept new hardware/sensor was enabled. As soon I disable it the logs stopped 8-)
I hope you also stopped ShellyTeacher, as running continously is not needed.

Re: Python Plugin: Shelly MQTT

Posted: Tuesday 07 November 2023 17:42
by lwolf
ShellyTeacher has got a new topic
viewtopic.php?t=40998

Re: Python Plugin: Shelly MQTT

Posted: Wednesday 08 November 2023 17:11
by capman
lwolf wrote: Tuesday 07 November 2023 17:22
capman wrote: Tuesday 07 November 2023 17:16 I know what the problem was. Accept new hardware/sensor was enabled. As soon I disable it the logs stopped 8-)
I hope you also stopped ShellyTeacher, as running continously is not needed.
I did :D . 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.

Re: Python Plugin: Shelly MQTT

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

Re: Python Plugin: Shelly MQTT

Posted: Thursday 23 November 2023 16:14
by waltervl
tjabas wrote: Thursday 23 November 2023 12:33 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?
Shelly plugin or Shelly Teacher script? For teacher script use topic viewtopic.php?t=40998