Multiples Channels

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
Chiquitoloco
Posts: 17
Joined: 11 Sep 2016 11:26

Multiples Channels

Post by Chiquitoloco »

Hello,

i'm still playing with zuno and it's pretty cool!!!!

I've setted up multiples sketch

- 2 switchs
- 1 DHT 22
- 1 Motion sensor
- 1 Lux
- 1 door sensor

All work very well separately.

So for the fun i've try to put all these sketchs in one.
After include in the Fibaro HC2, i 've some troubles :

- The motion sensor appears like switch and the value is return to the root devices (see attachment file)
- I've 2 Lux sensor
- 3 weirds sensors these with the red dot
- the door sensor doesn't appears.

There is the configuration of my report channels
Switch 1 : zunoSendReport(1);
Switch 2 : zunoSendReport(2);
Lux : zunoSendReport(3);
Motion : zunoSendReport(4);
Temperature : zunoSendReport(5);
Humidity : zunoSendReport(6);
Door : zunoSendReport(7);

here a part of the sketch

Code: Select all

//Routing Slave Node
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);

//Setup 7 Channels (up to 10 Channels)
ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_BINARY(getterSwitch01, setterSwitch01),
                    ZUNO_SWITCH_BINARY(getterSwitch02, setterSwitch02),
                    ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE, SENSOR_MULTILEVEL_SCALE_LUX, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS, getterLuminance),
                    ZUNO_SENSOR_BINARY_MOTION(getterMotion),
                    ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterTemperature),
                    ZUNO_SENSOR_MULTILEVEL_HUMIDITY(getterHumidity),
                    ZUNO_SENSOR_BINARY_GENERAL_PURPOSE(getterReedInput));

//Setup SceneId & Associations Group
ZUNO_SETUP_ASSOCIATIONS(ZUNO_ASSOCIATION_GROUP_SCENE_CONTROL);

Code: Select all

// Getters and setters
void setterSwitch01(byte value) {
    digitalWrite(relay01, (value > 0) ? HIGH : LOW);
    zunoSendReport(1);
}

byte getterSwitch01(){
  switchValue01 = digitalRead(relay01);
  return switchValue01;
}

void setterSwitch02(byte value) {
    digitalWrite(relay02, (value > 0) ? HIGH : LOW);
    zunoSendReport(2);
}

byte getterSwitch02(){
  switchValue02 = digitalRead(relay02);
  return switchValue02;
}

word getterLuminance() {
  Serial.println("Zwave value Lux sent");
  return lastLuxValue;
}

byte getterMotion() {
  Serial.println("Zwave value Motion sent");  
  return lastMotionValue;
}

word getterTemperature() {
  Serial.println("Zwave value Temperature sent");
  return temperature * 10; //*10 beacause Zwave channel for size 2 and precision 1, value 366 represents 36.6 see : https://z-uno.z-wave.me/Reference/ZUNO_SENSOR_MULTILEVEL/
}

byte getterHumidity() {
  Serial.println("Zwave value Humidity sent");
  return humidity;
}

byte getterReedInput() {
  Serial.println("Zwave value Reed Input sent");
  return reedValueToSend;
}    
if you have some ideas...

thx
Attachments
zuno.PNG
zuno.PNG (63.74 KiB) Viewed 5135 times
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

Re: Multiples Channels

Post by ftrueck »

Chiquitoloco
Posts: 17
Joined: 11 Sep 2016 11:26

Re: Multiples Channels

Post by Chiquitoloco »

Thanx ftrueck, but i still don't understand what you did.

Did you put all your report on the channel 1, like that :

zunoSendReport(1);

Because i think i tried and it didn't work.

This is not very clear for me, i follow the official 10 sensor sketch from zuno and they put each sensor with a different channel.

Can you publish in your post your final sketch to get an example??
Let me know.

Thx
Post Reply