I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Manurev
Posts: 24
Joined: 30 Apr 2023 19:35

I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by Manurev »

HC1 YUBII HOME FIBARO,
Z1 V2. gen 7 th Integrated no security and with S0 too
ARDUINO IDE V.204
I'm not a developer.
I try to send the values of a thermal solar panel up to 220 degrees.
I have tried everything. I have created several multilevel temperature channels, as the guide says. By default, and with double size and double precision celsius scale, with INT BYTE AND WORD variables. Source of variable "byte int word or float".
When I go from 125 degrees, or "12500" because the system seems to divide by 100. If I increase digits. The only thing that happens is that the decimals disappear, but I have never been able to transmit more temperature than 125 to the controller or the app. With or without decimals after the point.
When I increase to values above 125, I think there is some kind of oveflow. And this sends zero or stays at 125.
Is it a limitation of the dr fibaro driver? or am I configuring something wrong or my code is bad?
Multilevel channels are created well in the console. And read the data.
I know that in the z1 v2 guide it refers to signed values, but I don't quite understand how to translate that to send, for example, 210 degrees to the controller. And therefore to the app.
Oh, I haven't been able to send anything through the multilevel sensor either, it doesn't do anything, even if I change values.
I don't know what to do anymore, can someone help me?

Thank you very much in advance

Code
```cpp
// demo sketch for connecting DHT11 humidity and temperature sensor to Z-Uno

// add library
#include "ZUNO_DHT.h"
// pin connection
#define DHTPIN 9

DHT dht(DHTPIN, DHT22);

float humidity; // here we will store the humidity
float temperature; // here we will store the temperature
int temperature0 = 140; //
dword temperature1 = 12500; //overflow en este modo con word o dwor para temp mayor que 125
float temperature2 = 125.00;// overflow en este modo que llega hasta 125
int temperature3 = -29;// overflow en este modo que llega -29
byte rele1 = 00;

// set up channels me falta un report
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature),
ZUNO_SENSOR_MULTILEVEL_HUMIDITY(getterHumidity),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemperature1),
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature0),
ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature2),
ZUNO_SENSOR_MULTILEVEL_WATER_TEMPERATURE(getterTemperature3),
ZUNO_SENSOR_BINARY_GENERAL_PURPOSE(getterRele1)
);

void setup() {
dht.begin();
Serial.begin();
Serial.println("start");
}

void loop() {
// obtaining readings from the sensor DHT
humidity = dht.readHumidity();
temperature = dht.readTemperature();
Serial.print("Humidity = ");
Serial.print(humidity);
Serial.print(" % ");
Serial.print("Temperature = ");
Serial.print(temperature);
Serial.println(" *C");
// send data to channels
zunoSendReport(1);
zunoSendReport(2);
zunoSendReport(3);
zunoSendReport(4);
zunoSendReport(5);
zunoSendReport(6);
zunoSendReport(7);
// send every 30 second
delay(30000);
}

byte getterTemperature() {
return temperature;
}

byte getterHumidity() {
return humidity;
}
byte getterTemperature0() {
return temperature0;
}
dword getterTemperature1() {
return temperature1;
}

byte getterTemperature2() {
return temperature2;
}
byte getterTemperature3() {
return temperature3;
}

byte getterRele1() {
return rele1;
}
```
Manurev
Posts: 24
Joined: 30 Apr 2023 19:35

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by Manurev »

I meant really. SEND MORE THAN 125 DEGREES TEMPERATURE THROUGH 1 DEVICE Z1- ZWAVE V2 gen 7th Y
Zwave Yubii home HC1 BY FIBARO AS A CONTROLLER.
Can somebody help me?

ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTE, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, GETTER)
OR GETTER or VARIABLE.
Greetings
lanbrown
Posts: 291
Joined: 01 Jun 2021 08:06

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by lanbrown »

DHT11 Specifications
Operating Voltage: 3.5V to 5.5V
Operating current: 0.3mA (measuring) 60uA (standby)
Output: Serial data
Temperature Range: 0°C to 50°C
Humidity Range: 20% to 90%
Resolution: Temperature and Humidity both are 16-bit
Accuracy: ±1°C and ±1%
Even if you went with the ds18b20

https://www.analog.com/media/en/technic ... s18b20.pdf
Measures Temperatures from -55°C to +125°C
(-67°F to +257°F)
Manurev
Posts: 24
Joined: 30 Apr 2023 19:35

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by Manurev »

Thanks lanbrown for responding but;
Well actually, the measurement that I want to measure is from a Thermal Solar Panel, with a PT1000 probe. up to 220 degree. And the DTH22 is another peripheral connected to Z1 that works well. Now I realize that by introducing it I may confuse you.
I "have assigned values to the variables, directly", for the other channels, to verify different values.
As you can see in the program
int temperature0 = 140; // Send zero or nothing.
dword temperature1 = 12500; //this mode with word or dword sends 125
float temperature2 = 125.00;// Send 125
int temperature3 = -29;// in this mode it sends -29
dword temperature1 = 1342; // Send zero or nothing
word temperature2 = 1491;// Send zero or nothing
word temperature3 = 124;// Send 124
As you can see, it does not exceed 125, no matter the scale size or precision, there must be something that limits the values transmitted by Z1, or it is due to some configuration that I do not know.
Example of a channel
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL,temperature1),
I don't know what I can do anymore.
lanbrown
Posts: 291
Joined: 01 Jun 2021 08:06

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by lanbrown »

How about this:
https://electronics.stackexchange.com/q ... ture-value

Since the Z-Uno is a generic device that can be programmed to do many things, it still relies on bits. Notice the scale for 10 bits. Do the temp ranges look similar to the max you're seeing? The temp range you're looking for exceeds the bits that is available.

https://z-uno.z-wave.me/Reference/analogRead/
analogRead()
Reads the value from the specified analog pin. The Z-Uno board contains a 4 channel, 10-bit analog to digital converter.
For further reference:
Table 5. 13-Bit Temperature Data Format
Temperature Digital Output (Binary) Bits[15:3]
−40°C 1 1101 1000 0000
−25°C 1 1110 0111 0000
−0.0625°C 1 1111 1111 1111
0°C 0 0000 0000 0000
+0.0625°C 0 0000 0000 0001
+25°C 0 0001 1001 0000
+105°C 0 0110 1001 0000
+125°C 0 0111 1101 0000
+150°C 0 1001 0110 0000
So even with 13 bits, you wouldn't get the temperature maximum you're looking for.
Table 13. 14-Bit Temperature Data Format
TEMPERATURE (°C) DIGITAL OUTPUT BINARY HEX
128 01 0000 0000 0000 1000
127.96875 00 1111 1111 1111 0FFF
100 00 1100 1000 0000 0C80
75 00 1001 0110 0000 0960
50 00 0110 0100 0000 0640
25 00 0011 0010 0000 0320
0.25 00 0000 0000 1000 0008
0.03125 00 0000 0000 0001 0001
0 00 0000 0000 0000 0000
–0.25 11 1111 1111 1000 3FF8
–25 11 1100 1110 0000 3CE0
–40 11 1011 0000 0000 3B00
So even with 14 bits, it won't get to the temperature you're looking for.
lanbrown
Posts: 291
Joined: 01 Jun 2021 08:06

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by lanbrown »

With that said, maybe the workaround is if you can remap the table. In the first example, it shows the first 8 bits as the whole number and the last 2 bits as the decimal point value. Maybe the decimal point could be just ignored. That still wouldn't get you to the values you're looking for, so maybe the resolution can be changed. Maybe just even or odd numbers. So instead of 0,1,2,3,4.....128 it would be 0,2,4,6,8....256. The system showing the temp (the Z-Wave system) would need to know of the remapping. In your example you mentioned 220 and probably at those temps, the sensor might be 1 or 2% accurate. So the loss of some resolution may not be a big deal.

How you would go about remapping the values is beyond me. It might be the only path for what you're looking for though.
Manurev
Posts: 24
Joined: 30 Apr 2023 19:35

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by Manurev »

Hello lanbrown, thank you very much again.
I'm not sure if I understood you correctly, are those tables you inserted how the Z1 device works inside? Storing the temperature variable that I have created? Byte word or Dword? Or is it a representation of how analog-digital converter values are stored?
Because then I must explain myself a little more. I do not use a digital analog input to read the values, in reality I decode a deltasol thermostat, through a program, and from there I extract the result of the temperatures, and store them in variables defined by me. With the type defined by me, and I reuse them in the Z1 program only to transmit them to the Zwave network.
Therefore, I am not sure about the implication of these tables, in my case.
In any case, the precision I really need is zero decimals, because that is enough for me to create rules in the controller. I think I have understood that it is better to eliminate the precision, so that they do not consume space. Okay, I have done it, and the same problem continues, what's more, if we really have an int or byte variable, to reach 220, we only need 8 bits and 2 bits for the sign, right?
Well, then a 16-bit 65536 word variable should suffice.
or a dword variable 32 bits 4294967296 32 values.
The truth is, excuse my ignorance, I am not an experienced programmer, but it is difficult for me to think that we cannot transmit a value of 220 degrees, through a Zwave channel??.
As always, thank you very much for the collaboration you are offering me.
yves
Posts: 50
Joined: 17 Sep 2021 18:05

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by yves »

Hi,
I did not dig deeply in this post and I do not use 'getter' functions in my application but, to me, as soon as you declare:

byte getterWhatEverName()
{
return WhatEverVariable
}


The result of getterWhatEverName will be between +/-127, this is the maximum a byte can do...
To see if I am wrong try:
byte getterWhatEverName()
{
return 200;
}


If your HC3 answer is 200 then I am wrong...

Regards
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by PoltoS »

BTW, in your code

Code: Select all

ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTemperature1),
should match the getter:

Code: Select all

dword getterTemperature1() {
return temperature1;
}
SENSOR_MULTILEVEL_SIZE_ONE_BYTE -> byte
SENSOR_MULTILEVEL_SIZE_TWO_BYTES -> word
SENSOR_MULTILEVEL_SIZE_FOUR_BYTES -> dword
Manurev
Posts: 24
Joined: 30 Apr 2023 19:35

Re: I CANNOT SEE TEMPERATURES HIGHER THAN 125 ºcº ON MULTILEVEL CHANNEL HC1 HC3 FIBARO CONTROLLER

Post by Manurev »

Hello Yves, for the response. Oh actually, the system is Yubii home by Fibaro HC1. Yes I will do the test. Although I have already done many, and I have changed everything. Type, and size of the channel, variables, and getter. I'll tell you something.
Greetings
Post Reply