Page 1 of 1

eedomus and multiple binary channels

Posted: 05 Feb 2017 14:37
by SergioP
Hi,
I have an eedomus z-wave controler and I have been playing with the z-uno in a multichannel sketch where I have set up 4 bynary channels connected to pins 9 to 12 and 2 multilevel connected to pins 14 and 15. All have a led connected so I can identify when they are getting fired and when not. I have compiled, upload to z-uno and make exclusion and inclusion in eedomus.
What I see is that both multilevel work fine. bynary are all asociated with th same led (I cannot identify which one as eedomus has renumbered channels to 1 up to 4).
I have made unit testing but removing all code and leaving only 1 switch (have tried this with all 4) and is working fine.
Is there anything missing in my sketch? I am attaching the code and also what I see in eedomus.
Thanks for your help.
Regards,
Sergio

Re: eedomus and multiple binary channels

Posted: 05 Feb 2017 14:40
by SergioP
Sorry I cannot upload attachments.... so I put my sketch here:

// LED pin number
#define LED_PIN9 9 // swith on/off
#define LED_PIN10 10 // swith verano/invierno
#define LED_PIN11 11 // dimmer TempCal (seleccion Temperatura caldera)
#define LED_PIN12 12 // dimmer ACS (seleccion temperatura Agua caliente)


// Global variables to store data reported via getters
byte switchValue9 = 0;
byte switchValue10 = 0;
byte switchValue11 = 0;
byte switchValue12 = 0;
byte switchValue14 = 0;
byte switchValue15 = 0;

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);

// Set up 6 channels
ZUNO_SETUP_CHANNELS(
ZUNO_SWITCH_BINARY(getterSwitch9, setterSwitch9),
ZUNO_SWITCH_BINARY(getterSwitch10, setterSwitch10),
ZUNO_SWITCH_BINARY(getterSwitch11, setterSwitch11),
ZUNO_SWITCH_BINARY(getterSwitch12, setterSwitch12),
ZUNO_SWITCH_MULTILEVEL(getterSwitch14, setterSwitch14),
ZUNO_SWITCH_MULTILEVEL(getterSwitch15, setterSwitch15)
);

// ZUNO_SETUP_DEBUG_MODE(DEBUG_ON);
// ZUNO_SETUP_DEBUG_MODE(DEBUG_OFF);


void setup() {
// set up I/O pins. Analog and PWM will be automatically set up on analogRead/analogWrite functions call
pinMode(LED_PIN9, OUTPUT);
pinMode(LED_PIN10, OUTPUT);
pinMode(LED_PIN11, OUTPUT);
pinMode(LED_PIN12, OUTPUT);
//pinMode(LED_PIN14, OUTPUT);
//pinMode(LED_PIN15, OUTPUT);



}

void loop() {
// Empty
}

// Getters and setters

void setterSwitch9(byte value) {
digitalWrite(LED_PIN9, (value > 0) ? HIGH : LOW);
switchValue9 = value;
}

byte getterSwitch9(){
return switchValue9;
}

void setterSwitch10(byte value10) {
digitalWrite(LED_PIN10, (value10 > 0) ? HIGH : LOW);
switchValue10 = value10;
}

byte getterSwitch10(){
return switchValue10;
}

void setterSwitch11(byte value11) {
digitalWrite(LED_PIN11, (value11 > 0) ? HIGH : LOW);
switchValue11 = value11;
}

byte getterSwitch11(){
return switchValue11;
}

void setterSwitch12(byte value12) {
digitalWrite(LED_PIN12, (value12 > 0) ? HIGH : LOW);
switchValue12 = value12;
}

byte getterSwitch12(){
return switchValue12;
}


void setterSwitch14(byte value14) {
byte tempVariable14;
// value is a variable, holding a "new value"
// which came from the controller or other Z-Wave device
if (value14 > 99) {
// by Z-Wave specification, this value can't be more then 99
value14 = 99;
}
// but the LED brightness scale ranges from 0 to 255
// we need to prepare our "value" for this new scale
tempVariable14 = (((word)value14) * 255 / 99);

// now we set the LED brightness
analogWrite(PWM2, ((long)value14) * 255 / 99);

// we'll save our value for the situation, when the controller will ask us about it
switchValue14 = value14;
}

byte getterSwitch14(){
return switchValue14;
}

void setterSwitch15(byte value15) {
byte tempVariable15;
// value is a variable, holding a "new value"
// which came from the controller or other Z-Wave device
if (value15 > 99) {
// by Z-Wave specification, this value can't be more then 99
value15 = 99;
}
// but the LED brightness scale ranges from 0 to 255
// we need to prepare our "value" for this new scale
tempVariable15 = (((word)value15) * 255 / 99);

// now we set the LED brightness
analogWrite(PWM3, ((long)value15) * 255 / 99);

// we'll save our value for the situation, when the controller will ask us about it
switchValue15 = value15;
}

byte getterSwitch15(){
return switchValue15;
}

Re: eedomus and multiple binary channels

Posted: 05 Feb 2017 18:52
by SergioP
Hi,

I have made another test by miodifying mi sketch to have 4 multilever switch and 2 binary switch and the multilevers work fine while binaries still both acting on the same pin (asume same channel).

So the problem is with the binary switches.

Regards,

Sergio

Re: eedomus and multiple binary channels

Posted: 13 Feb 2017 15:16
by PoltoS
Are you sure your controller is sending commands on individual channels? May be controller sends always to the same channel?

Re: eedomus and multiple binary channels

Posted: 13 Feb 2017 15:16
by PoltoS
Are you sure your controller is sending commands on individual channels? May be controller sends always to the same channel?

Re: eedomus and multiple binary channels

Posted: 18 Feb 2017 21:48
by SergioP
Hi PoltoS,
Thanks for your reply. Do you hace any idea on how to check ?

Re: eedomus and multiple binary channels

Posted: 23 Feb 2017 01:30
by PoltoS
Check logs of eedomus.

Re: eedomus and multiple binary channels

Posted: 04 Jul 2017 16:34
by eedomus-team
Hi SergioP,

You are right. We have found an issue with the integration of Z-Uno with multiple binary channels with eedomus gateway.
It is now corrected (available in next version, contact our support for immediate update).

Thanks Z-Wave-Me for this innovative Z-Uno product.

Best regards
Clark - eedomus team

Re: eedomus and multiple binary channels

Posted: 14 Jul 2017 12:07
by PoltoS
Clark, thanks for adding support of Z-Uno in eedomus.

If you can give me a summary what is supported and what is not (channel types, multiple channels of same type, polymorphism) and a screenshot of a 10 channel sketch and we will publish it on our page about controllers support: https://z-uno.z-wave.me/z-wave/interope ... ntrollers/

Re: eedomus and multiple binary channels

Posted: 24 Jul 2017 23:20
by SergioP
Poltos, Clark,

Thanks with your help on this Issue. I can help testing many of the required features of z-uno and I have gota año eedomus. Just let me know. I have límited bandwith but am quite interested ni making this workable. Also , we may engage other people using eedomus ( and eedomus plus ) to help with the testing.

Regards,

Sergio