Page 6 of 26
Re: Python Plugin: Shelly MQTT
Posted: Sunday 02 June 2019 9:04
by lwolf
sic79 wrote: ↑Tuesday 28 May 2019 17:28
Great plugin, but I cant seem to get on/off working on my ”Shelly Plug s”. Anyone tried to get that working?
I only has a Shelly Plug and it is working. Without a Shelly Plug S, i can not say what can be the problem.
Re: Python Plugin: Shelly MQTT
Posted: Sunday 02 June 2019 9:20
by lwolf
minime wrote: ↑Tuesday 28 May 2019 22:16
2019-05-28 22:14:02.369 (Shelly_MQTT) MQTT message: shellies/shelly1-XXXXX/longpush/0 1
Hi!
It is currently not supported but can be... i think a new Switch device has to be added for using it as input value.
In which firmware did this feature appear in?
In the meantime, I wrote to Allterco about the previously listed devices. (Shelly2LED, Shelly EM, Shelly Smoke,Shelly Plug S)
Re: Python Plugin: Shelly MQTT
Posted: Monday 03 June 2019 8:28
by Andyyyy
Hello lwolf !
great plugin !!!!
is it possible to add support for power and energy of my shellies 2.5 ?
in the log i get this..

- Anmerkung 2019-06-03 082647.jpg (67.13 KiB) Viewed 5198 times
but only the marked is added in domoticz
Andyyyy
Re: Python Plugin: Shelly MQTT
Posted: Monday 03 June 2019 9:11
by minime
lwolf wrote: ↑Sunday 02 June 2019 9:20
Hi!
It is currently not supported but can be... i think a new Switch device has to be added for using it as input value.
In which firmware did this feature appear in?
In the meantime, I wrote to Allterco about the previously listed devices. (Shelly2LED, Shelly EM, Shelly Smoke,Shelly Plug S)
I don't know the exact firmware anymore, sorry. but I've seen it in one of the last ones. Made Updates last weekend

I'm running some of the shelly's in detached switch mode and want to switch different shellys with those signals. One by normal push, another one by long push.
I'm using blockly and domoticz on a pi, I've realized the scripts will be handled not as fast as expected. E.g. Light will turn of up to 20 seconds (sometimes never) after motion sensor was triggered. Do someone know how to get this behaviour fixed?
Re: Python Plugin: Shelly MQTT
Posted: Monday 03 June 2019 17:27
by lwolf
Andyyyy wrote: ↑Monday 03 June 2019 8:28
Hello lwolf !
great plugin !!!!
is it possible to add support for power and energy of my shellies 2.5 ?
in the log i get this..
Anmerkung 2019-06-03 082647.jpg
but only the marked is added in domoticz
Andyyyy
I see. I only have Shelly 2 which energy+power output is sum of all channels. On Shelly 2.5 energy+power is per channel. I have to obtain a Shelly2.5 for testing.

I have to modify the plugin codebase to store channel in unitname, i think.
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 05 June 2019 16:16
by DosN
I have also purchased a shelly1, it looks better then the SONOFF which i have
I flashed the SONOFF with tasmota software, and now it is running fine. The SONOFF communicates with MQTT mosquitto, so i thought the Shelly 1 should run out of the box( standard supporting MQTT)
The Shelly is running , i can switch it with the app.. ( did a fireware update) I can also add MQTT server in the shelly , but i cannot find a setting where i have to but the IDX of my dummy switch .. At the sonoff i added the IDX , so the sonoff communicates through MQTT to the IDX of domoticz
But i cannot setup the shelly to communicate with domoticz. I think the shelly will communicate with MQTT, but there is no connection with MQTT and domoticz dummy switch ?
is there anybody how can explain, how it should work?. it would be nice if i do not have to flash the original firmware of the shelly
Re: Python Plugin: Shelly MQTT
Posted: Tuesday 11 June 2019 15:29
by lwolf
DosN wrote: ↑Wednesday 05 June 2019 16:16
is there anybody how can explain, how it should work?. it would be nice if i do not have to flash the original firmware of the shelly
As the Shelly supports some kind of Generic MQTT you have to install the MQTT translator which converts the messages between the Shelly and Domoticz.
Read the manual about how to install it:
https://github.com/enesbcs/Shelly_MQTT
Currently supported devices is:
Shelly 1 Open Source (relay)
Shelly Plug (relay and power consumption reporting)
Shelly2 Switch (relay and roller shutter mode, positioning)
Shelly4 Pro (relay and power consumption reporting)
Shelly H&T
Shelly RGBW2
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 12 June 2019 8:48
by DosN
ok looks like Shelly MQTT must be installed, and muquitto is not suitable
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 12 June 2019 22:51
by Sjaak66
Hi IWolf,
Simple and clean your plugin worked for my "out of the box". Shelly 1's btw!
Thank you very much for your efford .
btw using Mosquitto as the broker server.
Regards Jan
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 19 June 2019 14:21
by Janssuhhh
Hi lwolf,
I've been using your plugin, which works well.
However, the Plug S only work one-way. They report everything perfectly (status on/off, power consumption), but they cannot be controlled.
When trying to turn the Plug S on/off, it simply doesn't work.
When digging through the code, it looks like it goes wrong at line 91 device_id = device.DeviceID.split('-')
The new Shelly Plug S use the following topic: shellyplug-s-XXXXXX, so I guess the split gets messed up there.
Is this something you can create a workaround for?
Cheers!
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 19 June 2019 23:20
by lwolf
Janssuhhh wrote: ↑Wednesday 19 June 2019 14:21
When digging through the code, it looks like it goes wrong at line 91
device_id = device.DeviceID.split('-')
The new Shelly Plug S use the following topic:
shellyplug-s-XXXXXX, so I guess the split gets messed up there.
Thanks for debugging it, i have some idea for a workaround. i guess that its name is stored in the Domoticz database correctly, only the device_id array needs to be reconstructed.
Re: Python Plugin: Shelly MQTT
Posted: Friday 21 June 2019 18:06
by lwolf
In the recent few days there are several code fixing arrived thanks to joba-1 and damsma, which enhanced ShellyPlug-S, Shelly 2.5 and Shelly Bulb support.
Re: Python Plugin: Shelly MQTT
Posted: Tuesday 25 June 2019 9:48
by Janssuhhh
lwolf wrote: ↑Friday 21 June 2019 18:06
In the recent few days there are several code fixing arrived thanks to joba-1 and damsma, which enhanced ShellyPlug-S, Shelly 2.5 and Shelly Bulb support.
Works like a charm now!
Re: Python Plugin: Shelly MQTT
Posted: Tuesday 25 June 2019 11:10
by josemi
lwolf wrote: ↑Friday 21 June 2019 18:06
In the recent few days there are several code fixing arrived thanks to joba-1 and damsma, which enhanced ShellyPlug-S, Shelly 2.5 and Shelly Bulb support.
Thank you.

Re: Python Plugin: Shelly MQTT
Posted: Wednesday 26 June 2019 12:45
by josemi
Hi
When a new Shelly 2.5 is added, it creates two blinds devices:
1. Venetian Blinds EU, which you do not have the chance to pick 'inverted'
2. Blinds Percentage, which you could change the switch type to Blinds Percentage Inverted if you need to do it.
Is there any chance to change the Venetian Blind EU to get the inverted behaviour (open/close) without changing wires?

Re: Python Plugin: Shelly MQTT
Posted: Wednesday 26 June 2019 16:49
by salopette
you can adjust it via the IP of the Shelly!
Re: Python Plugin: Shelly MQTT
Posted: Wednesday 26 June 2019 19:30
by josemi
salopette wrote: ↑Wednesday 26 June 2019 16:49
you can adjust it via the IP of the Shelly!
But both buttons and Shelly app are ok, only it is inverted in domoticz
Could this option be?

Re: Python Plugin: Shelly MQTT
Posted: Friday 28 June 2019 21:21
by lwolf
Somebody says this way is good, other persons says the opposite. I am a little tired with this whole inversion thing, and i will not planning to rewrite this part again and again. This is why global inversion option created. Check or uncheck it as you wish.
Feedbacks are awaited in this github issue, if enough details and reports arrives from many users than it will be finalized someday.
https://github.com/enesbcs/Shelly_MQTT/issues/17
Re: Python Plugin: Shelly MQTT
Posted: Saturday 29 June 2019 10:09
by josemi
lwolf wrote: ↑Friday 28 June 2019 21:21
Somebody says this way is good, other persons says the opposite. I am a little tired with this whole inversion thing, and i will not planning to rewrite this part again and again. This is why global inversion option created. Check or uncheck it as you wish.
Feedbacks are awaited in this github issue, if enough details and reports arrives from many users than it will be finalized someday.
https://github.com/enesbcs/Shelly_MQTT/issues/17
This option is what I was looking for. Thank you for implementing. I have activated it and both domoticz & shelly app are working in the same way.
Re: Python Plugin: Shelly MQTT
Posted: Saturday 29 June 2019 11:04
by lwolf
josemi wrote: ↑Saturday 29 June 2019 10:09
lwolf wrote: ↑Friday 28 June 2019 21:21
Somebody says this way is good, other persons says the opposite. I am a little tired with this whole inversion thing, and i will not planning to rewrite this part again and again. This is why global inversion option created. Check or uncheck it as you wish.
Feedbacks are awaited in this github issue, if enough details and reports arrives from many users than it will be finalized someday.
https://github.com/enesbcs/Shelly_MQTT/issues/17
This option is what I was looking for. Thank you for implementing. I have activated it and both domoticz & shelly app are working in the same way.
Good to hear, thanks for the feedback.