Mode-selector / multistate device
Moderators: leecollings, remb0
- StanHD
- Posts: 347
- Joined: Friday 12 July 2013 16:09
- Target OS: Windows
- Domoticz version:
- Location: East Sussex, UK
- Contact:
Re: Mode-selector / multistate device
We really like this:-
Made a Blockly to read the states:-
Works great, thanks Devs.
Merry Christmas Everyone
Made a Blockly to read the states:-
Works great, thanks Devs.
Merry Christmas Everyone
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Re: Mode-selector / multistate device
Hello all
I am beginner...
Please explaine me how i can write script or set to button level other function/command ?
For example as for command ON and OFF.
I want maybe use this to control my AV Reciver and i want have function:
1. ON/ OFF (it is ok i know how)
ON - http://DENON_IP/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON
OFF - http://DENON_IP/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF
But when i select action ON and OFF icon button is not active... Only can OFF by leve name OFF
2. Select INPUT (defined by me)
also by http
3. Control volume up and down
also by http but must be not button than only PUSH BUTTON
Is any chance to correct it in domoticz to user by set level can also select type button:
Button ON/OFF
or
PUSH BUTTON
and correct also in Domoticz when user create level also with create can set command to this level action on (Should start with http:// or script://)
and add option to set display text as in virtual switch text ?? Please developer to add this features....
Please help
I am beginner...
Please explaine me how i can write script or set to button level other function/command ?
For example as for command ON and OFF.
I want maybe use this to control my AV Reciver and i want have function:
1. ON/ OFF (it is ok i know how)
ON - http://DENON_IP/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON
OFF - http://DENON_IP/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FOFF
But when i select action ON and OFF icon button is not active... Only can OFF by leve name OFF
2. Select INPUT (defined by me)
also by http
3. Control volume up and down
also by http but must be not button than only PUSH BUTTON
Is any chance to correct it in domoticz to user by set level can also select type button:
Button ON/OFF
or
PUSH BUTTON
and correct also in Domoticz when user create level also with create can set command to this level action on (Should start with http:// or script://)
and add option to set display text as in virtual switch text ?? Please developer to add this features....
Please help
-
- Posts: 8
- Joined: Thursday 14 May 2015 0:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Rambouillet, France
- Contact:
Re: Mode-selector / multistate device
I'm still working on it :
- add a parameter to hide 'Off' "level" ;
- add an action to execute when a "level" is selected.
These features should be available next week.
- add a parameter to hide 'Off' "level" ;
- add an action to execute when a "level" is selected.
These features should be available next week.
- remb0
- Posts: 499
- Joined: Thursday 11 July 2013 22:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Mode-selector / multistate device
whats the lua coding for changing the selector?
The only code worked is: commandArray['Fan']='Off'
I have a selector 'Fan'
it had 4 states: off, _1 , _2, _3
What is the commandArray for changing my selector to _3 (value 30) ?
I can control them manually and check what the value is, but changing in a script doesn't work...
The only code worked is: commandArray['Fan']='Off'
I have a selector 'Fan'
it had 4 states: off, _1 , _2, _3
What is the commandArray for changing my selector to _3 (value 30) ?
I can control them manually and check what the value is, but changing in a script doesn't work...
-
- Posts: 81
- Joined: Tuesday 03 November 2015 5:07
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Mode-selector / multistate device
I'm also curious to know this. I'd like to be able to set specific modes programmatically - LUA is OK but preferably with blocky.remb0 wrote:whats the lua coding for changing the selector?
The only code worked is: commandArray['Fan']='Off'
I have a selector 'Fan'
it had 4 states: off, _1 , _2, _3
What is the commandArray for changing my selector to _3 (value 30) ?
I can control them manually and check what the value is, but changing in a script doesn't work...
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Mode-selector / multistate device
Set level 10, set level 20 etc.
-
- Posts: 81
- Joined: Tuesday 03 November 2015 5:07
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Mode-selector / multistate device
Thanks. I'm sure I tried that but it didn't seem to work for me. I'll take another look...bizziebis wrote:Set level 10, set level 20 etc.
- remb0
- Posts: 499
- Joined: Thursday 11 July 2013 22:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: Mode-selector / multistate device
commandArray['Fan']= 'set level 30' doesn't work for me either. name of device is correct. and it had til level 40 so the level also exist.
in blocky it works. but lua don't (I hope I made an stupid fault)
in blocky it works. but lua don't (I hope I made an stupid fault)
-
- Posts: 81
- Joined: Tuesday 03 November 2015 5:07
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Mode-selector / multistate device
Just re-tested in blocky and not working for me.bizziebis wrote:Set level 10, set level 20 etc.
- bizziebis
- Posts: 182
- Joined: Saturday 19 October 2013 14:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8805
- Location: The Netherlands
- Contact:
Re: Mode-selector / multistate device
That's strange, I use it like this and it works:remb0 wrote:commandArray['Fan']= 'set level 30' doesn't work for me either. name of device is correct. and it had til level 40 so the level also exist.
in blocky it works. but lua don't (I hope I made an stupid fault)
Code: Select all
commandArray['Selector']='Set Level 30'
-
- Posts: 81
- Joined: Tuesday 03 November 2015 5:07
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Mode-selector / multistate device
Would you mind trying in blocky too please to confirm what I'm seeing?bizziebis wrote:That's strange, I use it like this and it works:remb0 wrote:commandArray['Fan']= 'set level 30' doesn't work for me either. name of device is correct. and it had til level 40 so the level also exist.
in blocky it works. but lua don't (I hope I made an stupid fault)
Code: Select all
commandArray['Selector']='Set Level 30'
-
- Posts: 8
- Joined: Thursday 14 May 2015 0:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Rambouillet, France
- Contact:
Re: Mode-selector / multistate device
Sorry for the delay but it is :
Where 20 is the level value, not the level name.
Where Level3 is a level name.
Code: Select all
commandArray = {}
if (devicechanged['MyDeviceName'] == 'On') then
commandArray['Test Selector']='Set Level: 20'
end
return commandArray
Code: Select all
commandArray = {}
if (devicechanged['Test Selector''] == 'Level3') then
commandArray['MyDeviceName']='Off'
end
return commandArray
-
- Posts: 8
- Joined: Thursday 14 May 2015 0:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Rambouillet, France
- Contact:
Re: Mode-selector / multistate device
It is the same in blockly :
-
- Posts: 68
- Joined: Wednesday 30 December 2015 23:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Poland
- Contact:
Re: Mode-selector / multistate device
I have the same problem on V2.4123 version. Is there any additional step required in order to be able to define Levels for Selector?SQ9MDD wrote:I'm confused, how can you did this?
I have a problem with selector cant add levels simply this button doesn't work, and after save dont have any option.
At the moment, all I can get is a Selector with Off level.
Update: 2016/01/14 For the benefit of others - you cannot create a dummy switch from Devices tab. You need to do this (at least for the first one) via Manual switch on Switches tab. Only then, it will work as expected. I could not understand this when reading the thread
Last edited by mKotek on Thursday 14 January 2016 1:56, edited 2 times in total.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
-
- Posts: 8
- Joined: Thursday 14 May 2015 0:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Rambouillet, France
- Contact:
Re: Mode-selector / multistate device
You are right.
At this time you should avoid the following 4 characters : : ' | "
I will try to fix it or prevent the user to use these characters.
At this time you should avoid the following 4 characters : : ' | "
I will try to fix it or prevent the user to use these characters.
-
- Posts: 8
- Joined: Thursday 14 May 2015 0:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Rambouillet, France
- Contact:
Re: Mode-selector / multistate device
This issue has been fixed this morning in beta version.
Now the following characters will be simply removed from the level name while adding or renaming it : :;|<>
Now the following characters will be simply removed from the level name while adding or renaming it : :;|<>
- jcjames13009
- Posts: 33
- Joined: Monday 09 March 2015 15:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: France / Marseille
- Contact:
Re: Mode-selector / multistate device
Now my heating system is managed using selector switch
But I can't see it in ImperiHome Hope it'll be available soon.
Thanks again to the developpers
JC
But I can't see it in ImperiHome Hope it'll be available soon.
Thanks again to the developpers
JC
Re: Mode-selector / multistate device
But in switch selector you dont have problem with action to level?
I assigned to level acction but swich selector wrong assigned. I add to level 10 but action was run on level 0 or when i add to level 20 action is run on level 10.
Wysłane z mojego SM-G920F przy użyciu Tapatalka
I assigned to level acction but swich selector wrong assigned. I add to level 10 but action was run on level 0 or when i add to level 20 action is run on level 10.
Wysłane z mojego SM-G920F przy użyciu Tapatalka
- jcjames13009
- Posts: 33
- Joined: Monday 09 March 2015 15:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: France / Marseille
- Contact:
Re: Mode-selector / multistate device
No issue. I use "Level Name" in lua script to control selector switch.
Something like:
JC
Something like:
Code: Select all
if (otherdevices[Heating] == 'Eco') then ...
if (otherdevices[Heating] == "Confort") then ...
if (otherdevices[Heating] == 'Off') then ...
Who is online
Users browsing this forum: No registered users and 0 guests