I have problems with Z-UNO
First I used Arduino IDE 1.88 and I had many problems with Z-Uno.
Then I installed the correct version of Arduino IDE 1.65
Then Z-uno worked for many days, then the channels started to mess up.
Maybe I installed and changed the skecth too many times, and then came the message below.
Devices without templates
Some devices in your Z-Wave network do not have Z-Wave templates.
If they do not work properly or miss some functionalities, download the device's template and send it to support@fibaro.com.
We will prepare the appropriate Z-Wave template to fix the problem and provide full support of the device.
The lack of parameters template does not mean that device is not supported. You can still add configuration parameters manually according to device's manual using the Advanced Configuration page.
This notification will disappear when all devices will have Z-Wave templates.
I also restore the z-wave settings from Fibaro HC2
No help?
Code: Select all
#define LEN 12
unsigned char incomingByte = 0;
unsigned char buf[LEN];
word Value1 = 0;//vallox outdoor
word Value2 = 0;//vallox supply
word Value3 = 0;//vallox excract
word Value4 = 0;//vallox exhaust
byte Value5 = 0;//humadity
byte Value6 = 0;//fanspeed
byte Value7 = 0;//pm2.5
byte Value8 = 0;//pm10
byte Value9 = 0;//luminance
// set up channels
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature1),
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature2),
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature3),
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature4),
ZUNO_SENSOR_MULTILEVEL_HUMIDITY(getterHumidity),
ZUNO_SENSOR_MULTILEVEL_GENERAL_PURPOSE(getterFanlevel),
ZUNO_SENSOR_MULTILEVEL_GENERAL_PURPOSE(getterPM2),
ZUNO_SENSOR_MULTILEVEL_GENERAL_PURPOSE(getterPM10)
);
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
int i;
unsigned char checksum;
Serial.println("Start...");
if (Serial1.available() > 0) {
// read the incoming byte:
incomingByte = Serial1.read();
Serial.print("mega start data must be AA ");
Serial.println(incomingByte, HEX);
if (incomingByte == 0xAA) {
Serial1.readBytes(buf, LEN);
if ((buf[0] == 0xC0) && (buf[11] == 0xAB)) {
for (i=1; i<=9; i++) {
checksum = buf[1]+buf[2]+buf[3]+buf[4]+buf[5]+buf[6]+buf[7]+buf[8]+buf[9];
}
if (checksum == buf[10]) {
Value1 = (buf[1])-100;
Serial.print("Outdoor ");
Serial.println(Value1);
Value2 = (buf[2])-100;
Serial.print("Supply air ");
Serial.println(Value2);
Value3 = (buf[3])-100;
Serial.print("Extract air ");
Serial.println(Value3);
Value4 = (buf[4])-100;
Serial.print("Exhaust air ");
Serial.println(Value4);
Value5 = buf[5];
Serial.print("Humadity ");
Serial.println(Value5);
Value6 = buf[6];
Serial.print("Fanspeed ");
Serial.println(Value6);
Serial.print("PM2.5 ");
Value7 = buf[7];
Serial.println(Value7);
Value8 = buf[8];
Serial.print("PM10 ");
Serial.println(Value8);
Serial.print("Luminance ");
Value9 = buf[9];
Serial.println(Value9);
}
else {
Serial.println("checksum :");
Serial.println(buf[10], HEX);
Serial.println(checksum, HEX);
}
}
}
}
// send data to channels
zunoSendReport(1);
zunoSendReport(2);
zunoSendReport(3);
zunoSendReport(4);
zunoSendReport(5);
zunoSendReport(6);
zunoSendReport(7);
zunoSendReport(8);
// send every 30 second
Serial.println("delay 30s ");
delay(30000);
}
// Getters and setters
byte getterTemperature1() {
return Value1;
}
byte getterTemperature2() {
return Value2;
}
byte getterTemperature3() {
return Value3;
}
byte getterTemperature4() {
return Value4;
}
byte getterHumidity() {
return Value5;
}
byte getterFanlevel() {
return Value6;
}
byte getterPM2() {
return Value7;
}
byte getterPM10() {
return Value8;
}