Z-Wave controller not getting updated

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
cmpts_cmp
Posts: 26
Joined: 26 Aug 2019 14:14

Z-Wave controller not getting updated

Post by cmpts_cmp »

Hi all,

I've a simple program to detect voltage changes on A0 pin.

The serial output works and shows the correct voltage. If it detects a difference to the previous value it sends (well it's supposed to) the updated value to the ZWave controller (AEON Gen 5 USB Controller).

If I do a node refresh on the controller I see the updated value correctly, but the Z-Uno isn't sending it by itself. What am I missing?

float vcc = 3.0; // supply voltage
float vout = 0.0; //
float vin = 0.0;
float vinUpdated = 0.0;
float R1 = 100000.0; // resistance of R1 (100K)
float R2 = 10000.0; // resistance of R2 (10K)
float errorCorrection = 1.027431421446384; // % tolerance correction of resistors - start with 0, use real multimeter value of input voltage divided by value output to "vin" and then enter calculated value here
int value = 0;

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);

ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL(
ZUNO_SENSOR_MULTILEVEL_TYPE_VOLTAGE,
SENSOR_MULTILEVEL_SCALE_VOLT,
SENSOR_MULTILEVEL_SIZE_FOUR_BYTES,
SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
getter)
);

void setup() {
pinMode(A0, INPUT);
Serial.begin(9600);
Serial.println("DC Voltage");
}

void loop() {
// read the value at analog input
value = analogRead(A0);
vout = (value * vcc) / 1023.0;
vin = vout / ((R2 / (R1 + R2)) / errorCorrection);
if (vin < 0.09) {
vin = 0.0; // zero min undesired value
}
if (value > 900) {
vin = 0.0; // zero max undesired value
}
Serial.println("A0 Value: ");
Serial.println(value);
Serial.println("Voltage on A0: ");
Serial.println(vout);
Serial.println("Actual Voltage: ");
Serial.println(vin);
delay(1000);
if (vin != vinUpdated) {
vinUpdated = vin;
zunoSendReport(1);
delay(35000);
}
}

// send voltage to zwave controller

word getter(void) {
return (vinUpdated * 100);
}
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Z-Wave controller not getting updated

Post by PoltoS »

1. Taking into account that ADC values do fluctuates, the vin != vinUpdated will almost always be true.

You can remove the if since Z-Uno is sending reports on multilevel not often than every 30 sec anyway.

2. Please check that the Association group #1 has your controller in. Otherwise the unsolicited report will not be sent.
cmpts_cmp
Posts: 26
Joined: 26 Aug 2019 14:14

Re: Z-Wave controller not getting updated

Post by cmpts_cmp »

Where do I check the association group?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Z-Wave controller not getting updated

Post by PoltoS »

In your controller s/w. What are you using?
cmpts_cmp
Posts: 26
Joined: 26 Aug 2019 14:14

Re: Z-Wave controller not getting updated

Post by cmpts_cmp »

It's ok. I found it. I'll test tomorrow. Thanks!
cmpts_cmp
Posts: 26
Joined: 26 Aug 2019 14:14

Re: Z-Wave controller not getting updated

Post by cmpts_cmp »

Ok, the zuno is definitely showing the controller in Association Group #1.

I'm using OpenZwave software.

I am seeing these errors every 35 seconds or so, so the controller is receiving data, but can't handle it. Any thoughts? (I've removed any sensitive details with <SECRET CODE>):

2019-08-30 08:42:25.023 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:42:25.024 Detail,
2019-08-30 08:42:25.024 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:43:01.281 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:43:01.282 Detail,
2019-08-30 08:43:01.282 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:43:39.759 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:43:39.759 Detail,
2019-08-30 08:43:39.760 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:44:16.154 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:44:16.155 Detail,
2019-08-30 08:44:16.155 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:44:53.592 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:44:53.593 Detail,
2019-08-30 08:44:53.593 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:45:29.987 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:45:29.988 Detail,
2019-08-30 08:45:29.988 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:46:07.423 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:46:07.423 Detail,
2019-08-30 08:46:07.423 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:46:45.900 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:46:45.900 Detail,
2019-08-30 08:46:45.900 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:47:22.296 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:47:22.297 Detail,
2019-08-30 08:47:22.297 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:48:00.772 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:48:00.772 Detail,
2019-08-30 08:48:00.772 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:48:38.209 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:48:38.210 Detail,
2019-08-30 08:48:38.210 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
2019-08-30 08:49:14.606 Detail, Node075, Received: <SECRET CODE>
2019-08-30 08:49:14.607 Detail,
2019-08-30 08:49:14.607 Error, Node075, Cannot find endpoint map to instance for Command Class COMMAND_CLASS_SENSOR_MULTILEVEL endpoint 0
cmpts_cmp
Posts: 26
Joined: 26 Aug 2019 14:14

Re: Z-Wave controller not getting updated

Post by cmpts_cmp »

Ok, this is now resolved. I tried a newer version of Home Assistant with probably a newer version of OpenZWave and it's now working.

I did what you said and took out the "if" statement and this also works and updates the value to the controller ever 30 seconds or so.

Many thanks for the assistance.

Now to put this in a neat case and use!

Cheers
Post Reply