Page 1 of 1
Blinds inverted
Posted: Saturday 10 June 2023 12:50
by jacobsentertainment
Hi all,
I have an Ikea Trädfri connected trough Sonoff ZbBridge and I can control it fully with an switch (blinds percentage)
The only thing is it works inverted

So open is closed and closed is open.... Is there a way to invert the switch?
Code: Select all
return {
on = {
devices = { 392 }, -- Rolgordijn switch
},
logging = {
level = domoticz.LOG_INFO,
marker = 'Rolgordijn',
},
execute = function(domoticz)
local level = domoticz.devices(392).level
local http_send = 'http://192.168.178.28/cs?c2=111&c1=ZbSend%20{"Device":"0x6A62",%20"Send":{"ShutterLift":%20'..level..'}}'
domoticz.log('Gordijn ingesteld op '..level..'')
domoticz.openURL({
url = http_send
})
end
}
Re: Blinds inverted
Posted: Saturday 10 June 2023 13:03
by waltervl
Re: Blinds inverted
Posted: Saturday 10 June 2023 13:41
by jacobsentertainment
Thanks for the info, I hadn't found this one yet.
It is mainly about the operation from the GUI, if I press "close" then the blind opens and vice versa.
I made a second blind switch and it only listens to the feedback of the curtain, this info is correct.
Re: Blinds inverted
Posted: Saturday 10 June 2023 17:25
by waltervl
I do not understand you. If you invert the blinds with the reverse open/close state switch also in dzvents the open close action is inverted.
Re: Blinds inverted
Posted: Saturday 10 June 2023 20:40
by jacobsentertainment
waltervl wrote: ↑Saturday 10 June 2023 17:25
I do not understand you. If you invert the blinds with the reverse open/close state switch also in dzvents the open close action is inverted.
Correct, but the output value of the switch is still 0/70 Like in "0" for state and "70" in percentage of position. And that's what I need to set the position of the blinds.
Like 0 is in my case open on the actual blinds and 100 is fully closed. So if I press open in either setting it will output 100 and then the blinds will close 100%
Re: Blinds inverted
Posted: Saturday 10 June 2023 23:49
by waltervl
Then you have to invert position too.
Re: Blinds inverted
Posted: Sunday 11 June 2023 10:10
by jacobsentertainment
I made a small table, in each position the value remains **/100 when closed and **/0 when open, this 100 and 0 is the one used in the script to set the blind to the right height.
By itself that's not a problem, but clicking on the icon closed or open doesn't work this way.
So if I press "close" the value should be 1/0 and "open" press 0/100.

- blinds.jpg (34.14 KiB) Viewed 2515 times
Re: Blinds inverted
Posted: Sunday 11 June 2023 10:34
by Kedi
I have on my zigbee device the setting "motor_direction", is that present with your Ikea Trädfri ?
If so you could try to set it the otherway.
Re: Blinds inverted
Posted: Sunday 11 June 2023 12:05
by jacobsentertainment
I had a search trough the internet for all commands for the kadrilj and trädfri and so on, only working commands where the ones from tasmota zigbee page.
I paired the blinds with my zigbee bridge (sonoff) and that worked out, so with monitoring the feedback and the tasmta zigbee page I was able to create some rules and commands to make it work.
So far the blinds are working with the scritps installed, except the open/close button

Re: Blinds inverted
Posted: Sunday 11 June 2023 15:38
by Kedi
I am confused? You flashed your Sonoff ZBBridge with Tasmota?
Re: Blinds inverted
Posted: Sunday 11 June 2023 18:36
by jacobsentertainment
Kedi wrote: ↑Sunday 11 June 2023 15:38
I am confused? You flashed your Sonoff ZBBridge with Tasmota?
Yep works fine, I like the console so I can see what's going on. If it was up to me I would flash all my device to tasmota
Only devices that don't have tasmota is my shelly dimmers, shelly trv's, shelly 3EM and the zigbee devices them selfs. All the rest is local trough tasmota. No node-red all works fine with rules. (little off topic

)
10minute job
https://zigbee.blakadder.com/Sonoff_ZBBridge.html
Re: Blinds inverted
Posted: Sunday 11 June 2023 22:05
by Kedi
Then it should be easy to find out if the tasmota zigbee bridge is converting not correctly, and could be easily corrected.
Re: Blinds inverted
Posted: Sunday 11 June 2023 23:02
by jacobsentertainment
That's really easy, because it transfers the command directly from domoticz to the blinds.
Exactly like in the script above. Tasmota is only the middleman.
Domoticz gives an value when pushing open or close and this value won't change. So I think I have to live with it or work around it with an secondary blind switch and fiddle around.
Re: Blinds inverted
Posted: Monday 12 June 2023 5:57
by Kedi
The beauty of Zigbee2mqtt is that you can (re)configure devices to your liking, with in my case a Texas Instruments LAUNCHXL-CC1352P-2
Re: Blinds inverted
Posted: Monday 12 June 2023 10:30
by jacobsentertainment
Kedi wrote: ↑Monday 12 June 2023 5:57
The beauty of Zigbee2mqtt is that you can (re)configure devices to your liking, with in my case a Texas Instruments LAUNCHXL-CC1352P-2
Explain please, can you teach a device new commands or are you altering commands?
I tried a zigbee2mqtt but coudn't make it work so I kept with my sonoff tasmota bridge.
Re: Blinds inverted
Posted: Monday 12 June 2023 12:04
by Kedi
In zigbee2mqtt you will get the 'default' translation from Domoticz mqtt to the zigbee (internal) messages.
For every type of device there is a definition, but you can make your own definition and include them in zigbee2mqtt.
These 'own' definition are execute instead of the default.
See here:
https://www.zigbee2mqtt.io/advanced/sup ... our-device
and here:
https://www.zigbee2mqtt.io/guide/config ... converters