Z-Uno with VeraEdge

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
Miklux
Posts: 31
Joined: 01 Oct 2018 17:02

Z-Uno with VeraEdge

Post by Miklux »

Hi all,
I have some problem with Z-Uno and VeraEdge Home Controller.
I try to explain.

I just want to use the Dynamic Approach using this sketch:

Code: Select all

#define MAP_TO_ZEROCHANNEL 0x80
ZUNO_SETUP_PRODUCT_ID(0xAB, 0xCD);
ZUNO_ENABLE(WITH_CC_SENSOR_MULTILEVEL);
ZUNO_DYNAMIC_CHANNELS(3);

byte nIngressi;
byte nUscite;
byte nPresenze;


void setup(){
  Serial.begin(115200);
  nIngressi = 0;
  nUscite = 0;
  nPresenze = 0;
  ZUNO_START_CONFIG();
  ZUNO_SET_ZWCHANNEL(1| MAP_TO_ZEROCHANNEL); // <- this channel will be provided via 1 & 0 channels
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_SET_ZWCHANNEL(2);
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_SET_ZWCHANNEL(3);
  ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
  ZUNO_COMMIT_CONFIG();
}

void loop() {
  byte selection=0;
  if (Serial.available() > 0) {
    // read the incoming byte:
    selection = Serial.read();
    switch(selection) {
    case '0':
      nIngressi++;
      g_channels_data[0].bParam = nIngressi;
      break;
    case '1':
      nUscite++;
      g_channels_data[1].bParam = nUscite;
      break;
    default:
      break;   
    }
    nPresenze=nIngressi-nUscite;
    if(nPresenze<0) nPresenze=0;
    g_channels_data[2].bParam = nPresenze;
    Serial.println(nPresenze);
  }
  //delay(30000); 
}
I just want to modify the variables nIngressi, nUscite and nPresenze via serial communication between Z-Uno and a PC or another device.
Now I'm using a PC with the Arduino IDe Serial Monitor.
When I send '0' the nIngressi will increase +1 and when I send '1' nUscite increase +1.
I want to create a sensor that send the 3 values via zwave to my controller.

When I compile the sketch i don't have any problem: all is regular, and the same when I upload the sketch on the zuno device.
When I try to communicate with the serial monitor I see the all is regular except a double print on the screen , but I think it's not a great problem.

When I associate the sensor to the VeraEdge Network is ok, i see this:

Image

And now the questions:
1) what is the device named "_GET_LANG(generic_sensor,sensor) " ???
2) why if I change the values of nIngressi, nUscite and nPresenze I don't see values in the veraEdge page?
3) how could I change manufacturer informations?

Do you have some idea/suggestion to give me?

Thank you in advance for your help
Mik
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Z-Uno with VeraEdge

Post by PoltoS »

1) _GET_LANG(generic_sensor,sensor) is the mapping of channel 1 to channel 0.
2) make sure to set up MultiChannelAssociation to 1:0 instead of a simple association.
3) ZUNO_SETUP_PRODUCT_ID(0xAB, 0xCD) is changing product ID. What do you mean by manufacturer information?
Miklux
Posts: 31
Joined: 01 Oct 2018 17:02

Re: Z-Uno with VeraEdge

Post by Miklux »

Hi PoltoS,
thank you for your answer and sorry for the late reply.
For the point n. 2, how and where i can set up MultiChannelAssociation to 1:0 ?
Do you mean in the VeraEdge configuration or in the Zuno?

Sorry for the questions bu I'm not an expert of ZWave, even I have good skills in electronic.
Thank you for your help,
Mik
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Z-Uno with VeraEdge

Post by PoltoS »

MultiChannelAssociation is set up in Vera UI in Configuration & Associations
lkosoj
Posts: 3
Joined: 27 Oct 2019 11:03

Re: Z-Uno with VeraEdge

Post by lkosoj »

I tryed find how do it week.
Poltos, add please this in manual Z-Uno for Vera
https://forum.z-wave.me/viewtopic.php?t=25727&start=30
Post Reply