Page 1 of 1

Selector Switch operations

Posted: Sunday 28 January 2018 14:22
by Jem101
My apologies as this is probably a very simple thing to do but I've not found an easy way of doing this.

I have a number of 'push on' switches, five in total, lets call them 'Switch 1', 'Switch 2' etc. What I want to do is create a dummy selector switch with five settings such that if I press one of the options on it, then the corresponding Switch 1 etc. is triggered.

I'm sure it's trivially easy to do using Lua or (even better) dzVents but I've not been able to work out how to read the status change of the selector switch (let's call that 'Main Switch') and based on that, trigger the matching push-on switch.

Any hints or advise would be gratefully received.

Many thanks in advance

Re: Selector Switch operations

Posted: Monday 29 January 2018 11:44
by emme
I thin you won't need to create a selector that act a pushbutton that act something else

let's have the selector act streight the action you need....
then... you probably want (to simulate a pushbutton) that once pressed the selector will return to off position.

Well, I do have few scenarios like this...
example: SkyQ decoder, my selector uses both commands and shortcuts
skyQSelector.jpg
skyQSelector.jpg (44.22 KiB) Viewed 1783 times
the configuration of the switch will trigger an action (in my case a bash/python script)
skyQSelectorCfg.jpg
skyQSelectorCfg.jpg (147.68 KiB) Viewed 1783 times
and to be able to move back the selector to 0 I use a dzScript

Code: Select all

return {
	active = true,
	on = { devices = {'skyQ'}, 
	     },
	 
	execute = function(dz, devVol)
           devVol.switchOff().afterSec(2).checkFirst().silent()
    end
}
hope this would help
ciao
M