Blinds inverted

Moderator: leecollings

Post Reply
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Blinds inverted

Post 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 :cry: 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
}
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Blinds inverted

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Blinds inverted

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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%
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Blinds inverted

Post by waltervl »

Then you have to invert position too.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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
blinds.jpg (34.14 KiB) Viewed 1475 times
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Blinds inverted

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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 :-)
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Blinds inverted

Post by Kedi »

I am confused? You flashed your Sonoff ZBBridge with Tasmota?
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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 :lol:
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 :roll: )

10minute job https://zigbee.blakadder.com/Sonoff_ZBBridge.html
Attachments
zbbridge.jpg
zbbridge.jpg (160.47 KiB) Viewed 1419 times
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Blinds inverted

Post by Kedi »

Then it should be easy to find out if the tasmota zigbee bridge is converting not correctly, and could be easily corrected.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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.
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Blinds inverted

Post 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
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
jacobsentertainment
Posts: 211
Joined: Thursday 01 October 2020 1:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021-1
Location: Not @ home
Contact:

Re: Blinds inverted

Post 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.
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Blinds inverted

Post 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
Logic will get you from A to B. Imagination will take you everywhere.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests