Page 1 of 1
.checkFirst() not working on Fibaro Roller Shutter
Posted: Tuesday 16 November 2021 14:06
by Ragdag
Have a small dzVents script that will close blind if luminance is below X
Had it like this.
Code: Select all
if (tonumber(domoticz.devices(Illuminance).state) > 10) then
domoticz.devices(RolluikLinks).open().checkFirst()
domoticz.devices(RolluikRechts).open().checkFirst()
end
But after each device update that triggers the script I hear the clicking of the Fibaro Roller Shutter modules and not doing anything. So it would try to open them even when they are already open.
Changing the script to this works as expected:
Code: Select all
if (tonumber(domoticz.devices(Illuminance).state) > 10) then
if (domoticz.devices(RolluikLinks).state == 'Closed') then
domoticz.devices(RolluikLinks).open()
end
if (domoticz.devices(RolluikRechts).state == 'Closed') then
domoticz.devices(RolluikRechts).open()
end
end
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Tuesday 16 November 2021 17:41
by waltervl
Seems that you have probably found a bug.
Perhaps try with .On().checkFirst() or .Off().checkFirst()
Blinds are a little bit confusing in what is Open/Close related to On/Off There are also inverted Blinds devices.
Else you perhaps found a bug. Unfortunately the main maintainer of DzVents passed away half a year ago

so fixing it will be troublesome.
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Wednesday 17 November 2021 9:54
by Ragdag
waltervl wrote: ↑Tuesday 16 November 2021 17:41
Else you perhaps found a bug. Unfortunately the main maintainer of DzVents passed away half a year ago

so fixing it will be troublesome.
I did not know that, how sad and horrible.
Tried this small snippet
Code: Select all
local RolluikLinks = 116
local RolluikRechts = 106
return {
on = {
timer = {
'every minute', -- causes the script to be called every minute
}
},
logging = {
level = domoticz.LOG_DEBUG,
marker = 'template',
},
execute = function(domoticz, timer)
domoticz.log('Timer event was triggered by ' .. timer.trigger, domoticz.LOG_INFO)
domoticz.devices(RolluikLinks).On().checkFirst()
domoticz.devices(RolluikRechts).On().checkFirst()
end
}
Gives me this error:
2021-11-17 09:53:00.144 Error: dzVents: Error: (3.1.8) template: ...domoticz/scripts/dzVents/generated_scripts/Script #1.lua:15: attempt to call a nil value (field 'On')
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Sunday 23 January 2022 10:24
by gizmocuz
@Walter, As you know Domoticz is a open source project and various developers are contributing to it.
I think someone will continue with dzVents or pushes some fixes.
So please do not tell people development stopped...
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Sunday 23 January 2022 10:38
by waltervl
gizmocuz wrote: ↑Sunday 23 January 2022 10:24
So please do not tell people development stopped...
? I did not tell that? So until someone picks this up, dzVents fixes will be troublesome (not saying stopped).
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Sunday 23 January 2022 13:29
by gizmocuz
Doesn't this goes for everything ? If there is a problem in part X of the/any software and nobody fixes it, it stays a issue ?
And when someone makes a PR it is solved?
That is how it always works
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Saturday 24 May 2025 15:48
by solarboy
I also use this device and I recently had to change a module for exactly the same device using the replace function. The new device doesn't respond to commands in dzVents and throws an error, wether using "open()" , "close()" or "setLevel(50)".
Code: Select all
2025-05-24 14:46:31.417 Error: dzVents: There is no device with that name or id: 3776
2025-05-24 14:46:31.419 Error: dzVents: An error occurred when calling event handler B1 Small Shutter Control DZ
2025-05-24 14:46:31.419 Error: dzVents: ...zVents/generated_scripts/B1 Small Shutter Control DZ.lua:30: attempt to index a nil value (local 'shutter')
However I can control it via it's switch device and also via blockly so for now I have created a dummy level device which I set in dzvents which then sets the shutter position in blockly.
A strange bug !
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Saturday 24 May 2025 16:05
by solarboy
On further examination, "Set Level" also doesn't work in Blockly either, only "Open" and "Close".
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Saturday 24 May 2025 17:05
by waltervl
solarboy wrote: ↑Saturday 24 May 2025 15:48
I also use this device and I recently had to change a module for exactly the same device using the replace function. The new device doesn't respond to commands in dzVents and throws an error, wether using "open()" , "close()" or "setLevel(50)".
Code: Select all
2025-05-24 14:46:31.417 Error: dzVents: There is no device with that name or id: 3776
2025-05-24 14:46:31.419 Error: dzVents: An error occurred when calling event handler B1 Small Shutter Control DZ
2025-05-24 14:46:31.419 Error: dzVents: ...zVents/generated_scripts/B1 Small Shutter Control DZ.lua:30: attempt to index a nil value (local 'shutter')
However I can control it via it's switch device and also via blockly so for now I have created a dummy level device which I set in dzvents which then sets the shutter position in blockly.
A strange bug !
What is the device type in Domoticz? And what is the integration you use (Openzwave or Zwave-JS-UI?)
And are there more devices with exactly the same name as Dzvents does not like that.
Re: .checkFirst() not working on Fibaro Roller Shutter
Posted: Saturday 24 May 2025 19:12
by madpatrick
Not sure what kind of device you are using, but within my script i'm using the following command in DzVents
Code: Select all
local Screen_Slaapkamer = dz.devices(613)
Screen_Slaapkamer.switchOn().checkFirst()
or
Code: Select all
local Screen_Slaapkamer = dz.devices(613)
Screen_Slaapkamer.dimTo(50)