Page 1 of 1

Shutters on Sonoff Dual R2 with Tasmota not responding as expected when setting slider to 0%

Posted: Saturday 17 July 2021 23:30
by MuadDib007
Issue:

When moving position slider to 0%, Domoticz shows "Open" as state of the switch and the shutters fully open.
Expected behaviour: Domoticz should show "Closed" as state of the switch and the shutters should fully close.

Domoticz Version: 2021.1 (Build 13360)
Platform: Ubuntu 20.04.1 LTS
PLugin: MQTT Discovery from: https://github.com/emontnemery/domoticz_mqtt_discovery

Used Hardware:

SonOff Dual R2 with Tasmota Firmware 9.5.0 configured with options:
ShutterRelay1 1
Interlock 1,2
Interlock ON
setoption19 1

The shutters are automatically detected via the plugin

They show as Light/Switch, Blinds Percentage
Open and Close work as expected.
Also the percentage (1 is almost fully closed, 99% is almost fully opened) works, except 0%, this makes the blinds go open.

Found a temporary workaround:
Change device settings in Domoticz to "Venetian Blinds EU". (No longer % but Open, Close and Stop)
This way at least the available functions work as expected.
Unfortunately a new detection round from the Discovery Plugin reverts the device type to "Blinds Percentage"

However it would be great when it also works with percentage and not reverting manual changes to the device.

Logging:

When setting the slider to 0% (And Domoticz shows "Open") on the screen:

Code: Select all

DOMOTICZ:
2021-07-17 20:54:13.622 MQTT Discovery: (MQTT Discovery) onCommand 001/Voorzolder Raam: Command: 'Off', Level: 0, Color:
2021-07-17 20:54:13.610 Status: User: Admin (IP: 192.168.178.191) initiated a switch command (404/Voorzolder Raam/Set Level)

TASMOTA:
19:54:14.013 MQT: tele/tasmota_E53AE1/STATE = {"Time":"2021-07-17T19:54:14","Uptime":"0T00:24:25","UptimeSec":1465,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"ON","POWER2":"OFF","Wifi":{"AP":1,"SSId":"iot","BSSId":"78:8A:20:4C:C1:BB","Channel":6,"Mode":"11n","RSSI":86,"Signal":-57,"LinkCount":1,"Downtime":"0T00:00:03"}}
19:54:14.018 MQT: stat/tasmota_E53AE1/RESULT = {"POWER1":"ON"}
19:54:14.023 MQT: stat/tasmota_E53AE1/POWER1 = ON
19:54:14.028 MQT: stat/tasmota_E53AE1/RESULT = {"ShutterOpen1":100}
19:54:14.035 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":15,"Direction":1,"Target":100}}
19:54:14.475 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":18,"Direction":1,"Target":100}}
19:54:15.395 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":28,"Direction":1,"Target":100}}
19:54:16.396 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":38,"Direction":1,"Target":100}}
19:54:17.397 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":48,"Direction":1,"Target":100}}
19:54:18.397 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":58,"Direction":1,"Target":100}}
19:54:19.397 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":68,"Direction":1,"Target":100}}
19:54:20.399 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":78,"Direction":1,"Target":100}}
19:54:21.403 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":88,"Direction":1,"Target":100}}
19:54:22.402 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":98,"Direction":1,"Target":100}}
19:54:22.654 MQT: tele/tasmota_E53AE1/STATE = {"Time":"2021-07-17T19:54:22","Uptime":"0T00:24:33","UptimeSec":1473,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"iot","BSSId":"78:8A:20:4C:C1:BB","Channel":6,"Mode":"11n","RSSI":84,"Signal":-58,"LinkCount":1,"Downtime":"0T00:00:03"}}
19:54:22.659 MQT: stat/tasmota_E53AE1/RESULT = {"POWER1":"OFF"}
19:54:22.664 MQT: stat/tasmota_E53AE1/POWER1 = OFF
19:54:23.173 MQT: stat/tasmota_E53AE1/SHUTTER1 = 100
19:54:23.178 MQT: stat/tasmota_E53AE1/RESULT = {"Shutter1":{"Position":100,"Direction":0,"Target":100}}
Any help would be greatly appreciated.

Re: Shutters on Sonoff Dual R2 with Tasmota not responding as expected when setting slider to 0%

Posted: Sunday 18 July 2021 0:22
by MuadDib007
Well,

Seems like a user error :-)
Apparently it is more logical to have 0% as open and 100% as closed, which I had swapped in my head.
Other shutters (Curtains) in my domoticz work like this therefore i deducted this should word like that as well.

The solution was to add

Code: Select all

ShutterInvert1 1
to the Tasmota configuration and the slider works as expected.

Re: Shutters on Sonoff Dual R2 with Tasmota not responding as expected when setting slider to 0%

Posted: Sunday 18 July 2021 13:51
by waltervl
Good you have found the solution!
Other possibility would perhaps be to edit your Domoticz device to "Blinds percentage inverted"
https://www.domoticz.com/wiki/Dummy_for ... h_Subtypes

But modifying it within Tasmota configuration is off course doing the trick too :-)

Re: Shutters on Sonoff Dual R2 with Tasmota not responding as expected when setting slider to 0%

Posted: Sunday 18 July 2021 14:55
by MuadDib007
Changing the devicetype in Domoticz is a good suggestion, however the Discovery Plugin overwrites this when you enable new hardware.

Otherwise that would probably have been my solution.