Page 1 of 1
3 way switch
Posted: Tuesday 18 July 2017 1:40
by markjgabb
hi everyone
im looking to see if a particular type of button is possible, but i cant seem to find it, and am not sure if im just barking up the wrong tree
so i would like a light switch with 3 states
one/auto/off
this way if i switch it to on, its on, if i switch it to off its off, but i can also switch it to auto where my normal rules can apply....
am i going about this the wrong way?
im having trouble with my lounge lamps and the logic behind them....
Re: 3 way switch
Posted: Tuesday 18 July 2017 6:28
by tozzke
You could use a selector switch which you use in events next
Re: 3 way switch
Posted: Tuesday 18 July 2017 6:42
by markjgabb
this is brilliant
o so i cant setup a switch exactly as i want

- heater selector.PNG (168.27 KiB) Viewed 2256 times
the only issue i have is is it possible to alter and add custom switch states?
below are the current options.....can you add more?
or perhaps is there a way to make the blocky logic use the value levels of 10, 20, 30 for the switch state?

- switch state list.PNG (32.42 KiB) Viewed 2256 times
Re: 3 way switch
Posted: Tuesday 18 July 2017 6:56
by Jan Jansen
Yes, you can use Blockly (see tab logic > Level%)
Re: 3 way switch
Posted: Tuesday 18 July 2017 7:58
by markjgabb
ahhh excelent, thank you both for this it will make life much simpler for me...well not so much for me, but for family, as im "trying" to keep it as simple as possible to all family members are comfortable with this setup....
have a simple selector like this should make things much easier..... as with a single button you can change many things, no just auto or not, but full control
Re: 3 way switch
Posted: Wednesday 19 July 2017 7:24
by markjgabb
unfortunatly it seems level " " % can only be used in a do statement, it cant be used as a factor in the if part...or at least i cant get it to work........
how ever ive now changed it to off/timer/on and that works within the parameters allowed
is there any way to go about changing the available switch states?
Re: 3 way switch
Posted: Wednesday 19 July 2017 8:34
by Jan Jansen
Click tab User variables. Then click " ". Then fill the field with for example Level1.
succes
Re: 3 way switch
Posted: Wednesday 19 July 2017 17:07
by tozzke
In the if-statement you're supposed to use the name you've given each level and in the Do-block you should use the level % indeed
Re: 3 way switch
Posted: Thursday 20 July 2017 1:05
by markjgabb
@tozzke where can i get that name ive given to each level from though....if switch = "auto" for example...under switch i have no where i can select that name as far as i can tell and any of the text input fields say from log for example seem to not work?
Re: 3 way switch
Posted: Thursday 20 July 2017 17:04
by tozzke
doesn't really matter where you get the block. You could either get it @ 'Messages', 'User variables' or 'Debug/log'

Re: 3 way switch
Posted: Friday 21 July 2017 1:40
by markjgabb
hey tozzke
thanks for you tip
i have done as you suggested and pasted blocky below.....
everything seems to work except temp too high or temp to low parts of blocky....im not sure that its perhaps not a seperate issues, but events currently seem to not be being triggered by temp values

- heating.PNG (69.89 KiB) Viewed 2114 times
Re: 3 way switch
Posted: Friday 21 July 2017 6:30
by tozzke
markjgabb wrote:hey tozzke
thanks for you tip
i have done as you suggested and pasted blocky below.....
everything seems to work except temp too high or temp to low parts of blocky....im not sure that its perhaps not a seperate issues, but events currently seem to not be being triggered by temp values
heating.PNG
In your first if-statement you've got 'or [LoungeRoom Heating] = [Off] and [Heating Selector] = [On]' but a selector switch doesn't have the state 'On'. Or have you called one of the states of the selector switch 'On'? In that case you have to use 'or [LoungeRoom Heating] = [Off] and [Heating Selector] = [
"On
"]'. This doesn't fix the problem with the temp you're having though.
How did you call the level "timer"? isn't it by any chance "
Timer"? Because this might be the problem that it won't trigger @ temp
