This is an old revision of the document!
Set or get the (virtual) DIP switch state. The DIP switches are a set
of "switches" that allow you to control Vizy's power-on or power-off
behavior. Once they are set, they will retain the setting even if
power is removed. hello here.
The switches are a set of values that can be ORed together:
- DIPSWITCH_EXT_BUTTON, used to set external/remote power button,
e.g. with outdoor enclosure. Default disabled.
- DIPSWITCH_MUTE_BUZZER, used to mute the buzzer. Default disabled.
- DIPSWITCH_NO_BG_LED, used to disable the background LED, which is
normally set to yellow upon power up. Default disabled.
- DIPSWITCH_POWER_DEFAULT_OFF, if this power mode is set and you
plug in power via the 12V power input, Vizy will remain off by default
until you press the button to power Vizy on. And if power is
interrupted while Vizy is on, Vizy will turn off. If power is
interrupted while Vizy is off, Vizy will remain off. This is the
default power mode.
- DIPSWITCH_POWER_DEFAULT_ON, if this power mode is set and you
plug in power via the 12V power input, Vizy will turn on by default
without pressing the button. And if power is interrupted while Vizy
is on, Vizy will reset, but remain on. If power is interrupted while
Vizy is off, Vizy will turn on. Default disabled.
- DIPSWITCH_POWER_SWITCH, if this power mode is set and you plug in
power via the 12V power input, Vizy will remain off (as in
DIPSWITCH_POWER_DEFAULT_OFF mode), unless power was
removed while Vizy was on. In this case Vizy will turn on when you
(re)apply power. If power is interrupted while Vizy is off, Vizy
will remain off. This behavior is similar to the behavior of a real
power switch in that it retains the power "state" (on or off) and acts
accordingly. Default disabled.
- DIPSWITCH_POWER_PLUG, if this power mode is set Vizy will remain
powered on as long as it receives power through the 12V power plug,
and you will not be able to turn off Vizy via button or software as
long as it's plugged in and receiving power. Default disabled.
For example:
dip_switches(DIPSWITCH_EXT_BUTTON | DIPSWITCH_POWER_SWITCH) # set external power button and power switch mode