.checkFirst() not working on Fibaro Roller Shutter

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
Ragdag
Posts: 149
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

.checkFirst() not working on Fibaro Roller Shutter

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

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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.
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
Ragdag
Posts: 149
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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')
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

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

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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).
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
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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
Quality outlives Quantity!
solarboy
Posts: 336
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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 !
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 336
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post by solarboy »

On further examination, "Set Level" also doesn't work in Blockly either, only "Open" and "Close".
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
waltervl
Posts: 5770
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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.
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
madpatrick
Posts: 662
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: .checkFirst() not working on Fibaro Roller Shutter

Post 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)
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest