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);
}
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:
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