Beta Domoticz: method switchSelector not available for type Blinds Percentage

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

Moderator: leecollings

Post Reply
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

Hi All,

regarding continous Problems with ZWave I buyed some BleBox Shutters
BleBox Addon also making some Problems, so I Updated to Domoticz Beta Version from 04.09.19
Now I see Error Messages from DZVents in My Log:
2019-09-05 12:30:00.324 Error: dzVents: Error: (2.4.28) method switchSelector not available for type Blinds Percentage

This is strage cause Blinds Percentage was allways possible to use SwitchSelector(xx)
Any Idea whats maybe wrong here?

Best Regards
________________________________________________________________________
global chief of permanent lightning and strike detonator
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

No Idea?
I think this is a Bug coming with new Domoticz Beta Version last Week
My Scripts can no longer control my Blinds
2019-09-09 09:18:00.245 Error: dzVents: Error: (2.4.28) method switchSelector not available for type Blinds Percentage
Last edited by mastadook on Tuesday 10 September 2019 12:07, edited 1 time in total.
________________________________________________________________________
global chief of permanent lightning and strike detonator
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by waaren »

mastadook wrote: Monday 09 September 2019 9:20 I think this is a Bug coming with new Domoticz Beta Version last Week
My Scripts can no longer control my Blinds
2019-09-09 09:18:00.245 Error: dzVents: Error: (2.4.28) method switchSelector not available for type Blinds Percentage
What was your previous domoticz / dzVents version ?

Can you please share the script and the output of the command.

Code: Select all

domoticz.devices('name of your blind').dump() 
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

Yes, I have many of them, all worked before, and did not worked after Update.
Here is one Examle:

Code: Select all

return {
   on = {
        timer = {"every 10 Minutes between 08:30 and 19:30"}},
   execute = function(domoticz, timer)
      if domoticz.devices('Rolladenautomatik').state == 'On' then
      if (domoticz.time.matchesRule('between 10:00 and 14:00')) and domoticz.devices('Sensor Ostseite').temperature > 40 and domoticz.devices('Rolladen').level <= 80 then
         domoticz.devices('Rolladen').switchSelector(80)
         domoticz.log('Temp > 40 and Level < 80')
      elseif domoticz.devices('Sensor Ostseite').temperature > 30 and domoticz.devices('Rolladen').level <= 60 then
         domoticz.devices('Rolladen').switchSelector(60)
         domoticz.log('Temp > 30 and Level < 60')
      elseif domoticz.devices('Lichtstärke Ostseite').lux > 800 and domoticz.devices('Sensor Ostseite').temperature > 25 and domoticz.devices('Rolladen').level <= 60 then
        domoticz.devices('Rolladen').switchSelector(60)
        domoticz.log('LUX > 800 and Temp > 25 and Level < 60')
      end
end
end
}
Error Message when they try to set the Percentage is allways:

Code: Select all

2019-09-10 11:50:00.456 Error: dzVents: Error: (2.4.28) method switchSelector not available for type Blinds Percentage
I don´t know my Old Version, it was the latest Stable Version, I think from May this Year.
After the Update to Beta Versions, I run into this Errors

I´m not 100% sure, but I think, before, I was running this Config:

Code: Select all

Version 4.10717 (May 9th 2019)
- Updated: dzVents (version 2.4.19, See dzVents/documentation/history.md)
Now I´m running:

Code: Select all

Version: 4.11295
Build Hash: 588d244d2
Compile Date: 2019-09-09 08:57:05
dzVents Version: 2.4.28
Python Version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
________________________________________________________________________
global chief of permanent lightning and strike detonator
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by waaren »

mastadook wrote: Tuesday 10 September 2019 11:59 Yes, I have many of them, all worked before, and did not worked after Update.
Thx. Can you try it with the script below ? (I changed switchSelector to dimTo and add some code to help debugging)

Code: Select all

return 
{
    on =
    {
        timer = 
        { 
            "every 10 Minutes between 08:30 and 19:30",
        },
    },

    logging =
        {   
            level = domoticz.LOG_DEBUG,
            marker = "Rolladen" 
        },

    execute = function(domoticz, timer)

        local dz = domoticz

        blind = dz.devices('Rolladen')
        for key,value in pairs(blind) do
            if type(value) ~= 'function' then
                 dz.log(key .. ': ' .. tostring(value),dz.LOG_DEBUG)
            end
        end

        if domoticz.devices('Rolladenautomatik').state == 'On' then
            if (domoticz.time.matchesRule('between 10:00 and 14:00')) and domoticz.devices('Sensor Ostseite').temperature > 30 and domoticz.devices('Rolladen').level <= 80 then
                domoticz.devices('Rolladen').dimTo(80)
                domoticz.log('Temp > 40 and Level < 80')
            elseif domoticz.devices('Sensor Ostseite').temperature > 30 and domoticz.devices('Rolladen').level <= 60 then
                domoticz.devices('Rolladen').dimTo(60)
                domoticz.log('Temp > 30 and Level < 60')
            elseif domoticz.devices('Lichtstärke Ostseite').lux > 800 and domoticz.devices('Sensor Ostseite').temperature > 25 and domoticz.devices('Rolladen').level <= 60 then
                domoticz.devices('Rolladen').dimTo(60)
                domoticz.log('LUX > 800 and Temp > 25 and Level < 60')
            end
        end
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

Ok, here is the Debug, what you need I think:

Code: Select all

2019-09-10 15:10:00.412 OpenZWave: Domoticz has send a Switch command!, Level: 60, NodeID: 6 (0x06)
2019-09-10 15:10:00.538 (ZWave01) Light/Switch (Rolladen Theo)
2019-09-10 15:10:00.670 (RFXCOM) Temp + Humidity (Terrasse)
2019-09-10 15:10:00.307 Status: dzVents: Info: ------ Start internal script: Fußbodenheizung_DZVents:, trigger: every 5 minutes
2019-09-10 15:10:00.352 Status: dzVents: Info: ------ Finished Fußbodenheizung_DZVents
2019-09-10 15:10:00.352 Status: dzVents: Info: ------ Start internal script: Heizung_Bad_DZVents:, trigger: every 5 minutes
2019-09-10 15:10:00.358 Status: dzVents: Info: ------ Finished Heizung_Bad_DZVents
2019-09-10 15:10:00.358 Status: dzVents: Info: ------ Start internal script: Luftentfeuchter_Keller_DZVents:, trigger: every 5 minutes
2019-09-10 15:10:00.362 Status: dzVents: Info: ------ Finished Luftentfeuchter_Keller_DZVents
2019-09-10 15:10:00.362 Status: dzVents: Info: ------ Start internal script: RolllädenNassia_hellwarm:, trigger: every 10 minutes between 08:30 and 19:30
2019-09-10 15:10:00.367 Status: dzVents: Info: ------ Finished RolllädenNassia_hellwarm
2019-09-10 15:10:00.367 Status: dzVents: Info: ------ Start internal script: RolllädenNassia_truebe:, trigger: every 10 minutes between 08:30 and 19:30
2019-09-10 15:10:00.369 Status: dzVents: Info: ------ Finished RolllädenNassia_truebe
2019-09-10 15:10:00.369 Status: dzVents: Info: ------ Start internal script: RolllädenTheo_hellwarm:, trigger: every 10 minutes between 08:30 and 19:30
2019-09-10 15:10:00.374 Status: dzVents: Info: Temp > 30 and Level < 60
2019-09-10 15:10:00.374 Status: dzVents: Info: ------ Finished RolllädenTheo_hellwarm
2019-09-10 15:10:00.374 Status: dzVents: Info: ------ Start internal script: RolllädenTheo_truebe:, trigger: every 10 minutes between 08:30 and 19:30
2019-09-10 15:10:00.374 Status: dzVents: Info: Theo Rolladen Temp < 35 and Level > 40
2019-09-10 15:10:00.374 Status: dzVents: Info: ------ Finished RolllädenTheo_truebe
2019-09-10 15:10:00.374 Status: dzVents: Info: ------ Start internal script: RolllädenWestseite_hellwarm:, trigger: every 10 minutes between 08:30 and 19:45
2019-09-10 15:10:00.382 Status: dzVents: Info: ------ Finished RolllädenWestseite_hellwarm
2019-09-10 15:10:00.382 Status: dzVents: Info: Rolladen Theo: ------ Start internal script: Theo_Test:, trigger: every 1 minutes between 08:30 and 19:30
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: state: On
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: protected: false
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: hardwareType: OpenZWave USB
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: switchType: Blinds Percentage
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: deviceType: Light/Switch
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: sValue: Set Level: 60 %
2019-09-10 15:10:00.382 Status: dzVents: Debug: Rolladen Theo: _adapters: table: 0x27d6070
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: signalLevel: 12
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: hardwareId: 31
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: baseType: device
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: id: 9792
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: levelVal: 60
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: isScene: false
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: isVariable: false
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: switchTypeValue: 13
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: idx: 9792
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: icon: blinds
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: isSecurity: false
2019-09-10 15:10:00.383 Status: dzVents: Debug: Rolladen Theo: isGroup: false
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: hardwareName: ZWave01
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: hardwareTypeValue: 21
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: rawData: table: 0x6f5340d0
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: active: true
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: usedByCamera: false
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: deviceId: 00000601
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: lastLevel: 60
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: _state: Set Level: 60 %
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: changed: false
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: isHTTPResponse: false
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: hardwareID: 31
2019-09-10 15:10:00.384 Status: dzVents: Debug: Rolladen Theo: isTimer: false
2019-09-10 15:10:00.385 Status: dzVents: Debug: Rolladen Theo: _nValue: 2
2019-09-10 15:10:00.385 Status: dzVents: Debug: Rolladen Theo: unit: 1
2019-09-10 15:10:00.385 Status: dzVents: Debug: Rolladen Theo: isDevice: true
2019-09-10 15:10:00.385 Status: dzVents: Debug: Rolladen Theo: name: Rolladen Theo
2019-09-10 15:10:00.385 Status: dzVents: Debug: Rolladen Theo: timedOut: false
It is now at 60% in real.
I set the Script running every Minute, and it set the Shutters again to 60% every Minute.
Normaly, the Scripts requests the Position and don´t send any Commands, wehn it is at 60%.

This Part here:

Code: Select all

            elseif domoticz.devices('Sensor Ostseite').temperature > 30 and domoticz.devices('Rolladen Theo').level <= 60 then
                domoticz.devices('Rolladen Theo').dimTo(60)
                domoticz.log('Temp > 30 and Level < 60')
                
should not run.

Did this debugging will help you?
________________________________________________________________________
global chief of permanent lightning and strike detonator
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by waaren »

mastadook wrote: Tuesday 10 September 2019 15:17 Did this debugging will help you?
Yes, the debug helps.
It seems that script works now. Only issue left is that it keeps setting the levels because the script checks on less or equal

Code: Select all

domoticz.devices('Rolladen').level <= 60 
and because it is set to that level, naturally it is equal the next run. So I now changed the check to check only less .

Code: Select all

domoticz.devices('Rolladen').level < 60 
Can you try this

Code: Select all

return 
{
    on = 
    {
        timer = { "every 10 Minutes between 08:30 and 19:30"}
    },
        logging =
        {   
            level = domoticz.LOG_DEBUG, -- Change to domoticz.LOG_INFO when no longer need to debug
            marker = "Rolladen" 
        },
                        
   execute = function(domoticz, timer)
       
        local dz = domoticz
            
        blind = dz.devices('Rolladen')
        for key,value in pairs(blind) do
            if type(value) ~= 'function' then
        	     dz.log(key .. ': ' .. tostring(value),dz.LOG_DEBUG)
		    end
		end    
	
    	if domoticz.devices('Rolladenautomatik').state == 'On' then
    	    if (domoticz.time.matchesRule('between 10:00 and 14:00')) and domoticz.devices('Sensor Ostseite').temperature > 40 and domoticz.devices('Rolladen').level < 80 then
    		    domoticz.devices('Rolladen').dimTo(80)
    			domoticz.log('Temp > 40 and Level < 80')
		    elseif domoticz.devices('Sensor Ostseite').temperature > 30 and domoticz.devices('Rolladen').level < 60 then
    		    domoticz.devices('Rolladen').dimTo(60)
    			domoticz.log('Temp > 30 and Level < 60')
    	    elseif domoticz.devices('Lichtstärke Ostseite').lux > 800 and domoticz.devices('Sensor Ostseite').temperature > 25 and domoticz.devices('Rolladen').level < 60 then
    		    domoticz.devices('Rolladen').dimTo(60)
    		    domoticz.log('LUX > 800 and Temp > 25 and Level < 60')
    	    end
    	end
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

OK, great, thank you for your Help. This seems to wok now.
But will it remain .dimTo or will .switchSelector come back???
.switchSelector is more the correct for this Function then .DimTo...
________________________________________________________________________
global chief of permanent lightning and strike detonator
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by waaren »

mastadook wrote: Tuesday 10 September 2019 17:49 .switchSelector is more the correct for this Function then .dimTo...
In my opinion both method names are a bit far fetched for this type of device.
Would setLevel be an option ? I am open for other ideas.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
mastadook
Posts: 58
Joined: Wednesday 18 April 2018 13:03
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Deutschland
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by mastadook »

waaren wrote: Tuesday 10 September 2019 18:10
mastadook wrote: Tuesday 10 September 2019 17:49 .switchSelector is more the correct for this Function then .dimTo...
In my opinion both method names are a bit far fetched for this type of device.
Would setLevel be an option ? I am open for other ideas.
I would say, setLevel will fit both, Light Level and Shutter Level.
What do you think? :)
________________________________________________________________________
global chief of permanent lightning and strike detonator
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Beta Domoticz: method switchSelector not available for type Blinds Percentage

Post by waaren »

waaren wrote: Tuesday 10 September 2019 19:59
mastadook wrote: Tuesday 10 September 2019 18:15 I would say, setLevel will fit both, Light Level and Shutter Level.
Sent you a PM
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest