I try to migrate my script from Lua to dzvents
I use a blind percentage on a FGRM222 Fibaro zwave
Domoticz is 2023.2 with OZW
When I set the level to 43% with domoticz widget or physical switch
In My automation script/device current state/value:
Sate: Open Value 1/100
In Lua script:
otherdevices_svalues['Store'] return 43
otherdevices['Store'] return 43%
In API/JSON:
with /json.htm?type=command¶m=getdevices&rid=IDX
it return 43 as result/0/level and result/0/intLevel
In dzscript:
domoticz.devices('Volet Salon').state return Open
In dzvents, I tried other devices attribute like rawData[1] or sValue or level with no success
Is there a way to get the blind percentage from dzvents (without Asynchronous HTTP Request and handling)
I can provide full lua+dzvents+json if usefull to understand
Blinds: dzvents level do not report level properly but lua does
Moderator: leecollings
-
- Posts: 52
- Joined: Saturday 21 May 2016 20:12
- Target OS: NAS (Synology & others)
- Domoticz version: V4.10717
- Location: France
- Contact:
Blinds: dzvents level do not report level properly but lua does
Domoticz V2024.7
- waltervl
- Posts: 5724
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Blinds: dzvents level do not report level properly but lua does
In dzvents it should be domoticz.devices('Volet Salon').level to get the level and domoticz.devices('Volet Salon').setLevel() to set a blind to a specific level.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 52
- Joined: Saturday 21 May 2016 20:12
- Target OS: NAS (Synology & others)
- Domoticz version: V4.10717
- Location: France
- Contact:
Re: Blinds: dzvents level do not report level properly but lua does
I tried this
domoticz.devices('Volet Salon').level
return:
- 100 for 100%
- 100 for 95%
- 100 for 65%
- 0 for close
Domoticz V2024.7
- waltervl
- Posts: 5724
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Blinds: dzvents level do not report level properly but lua does
That seems strange. Dzvents .level should be the same as API level.
Check if you have unique names. Is there another device with the same name? Dzvents cannot handle this and can mix things up.
Check if you have unique names. Is there another device with the same name? Dzvents cannot handle this and can mix things up.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 52
- Joined: Saturday 21 May 2016 20:12
- Target OS: NAS (Synology & others)
- Domoticz version: V4.10717
- Location: France
- Contact:
Re: Blinds: dzvents level do not report level properly but lua does
I found my error: I must ask for
domoticz.devices('Store').level
and not:
domoticz.devices('Volet Salon').level
which is another device !!!
Thank you waltervl
I apologize for such a simple question!
Domoticz V2024.7
- waltervl
- Posts: 5724
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Blinds: dzvents level do not report level properly but lua does
No problem!
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 0 guests