Fibaro Dimmer 2 association to control the z uno

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Hillie
Posts: 25
Joined: 15 Nov 2018 14:11

Re: Fibaro Dimmer 2 association to control the z uno

Post by Hillie »

Thanks. I tried it without success some time ago. I will try it again. Why isn’t this described in the quick quide and in the examples? It’s confusing.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Fibaro Dimmer 2 association to control the z uno

Post by PoltoS »

It is a bit too technical for QSG
Plazma
Posts: 1
Joined: 16 Dec 2020 14:34

Re: Fibaro Dimmer 2 association to control the z uno

Post by Plazma »

Hello, I still do not understand where to insert this line in the code. help me please.
The way it is done in the code below does not work

// Global variables

byte pin4SwitchBinaryState = 0;

byte pin14SwitchMultilevelState = 0;

ZUNO_DISABLE(NO_MULTIBINARY_SWITCH0);

// Z-Wave channels
ZUNO_SETUP_CHANNELS(
ZUNO_SWITCH_BINARY(pin4SwitchBinaryGetter, pin4SwitchBinarySetter),
ZUNO_SWITCH_MULTILEVEL(pin14SwitchMultilevelGetter, pin14SwitchMultilevelSetter)
);

void setup() {
pinMode(4, OUTPUT);

pinMode(14, OUTPUT);
}

void loop() {
digitalWrite(4, pin4SwitchBinaryState ? HIGH : LOW);

analogWrite(14, (word)pin14SwitchMultilevelState * 255 / 99);

delay(20);
}

// Getters and setters

void pin4SwitchBinarySetter(byte value) {
pin4SwitchBinaryState = value;
}

byte pin4SwitchBinaryGetter() {
return pin4SwitchBinaryState;
}

void pin14SwitchMultilevelSetter(byte value) {
pin14SwitchMultilevelState = value;
}

byte pin14SwitchMultilevelGetter() {
return pin14SwitchMultilevelState;
}
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Fibaro Dimmer 2 association to control the z uno

Post by PoltoS »

Should be ok. You can also try to change the order of the two channels to get the desired effect
Post Reply