HYT 939(HYTxxx) Accurate temperature and humidity I2C sensor

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: HYT 939(HYTxxx) Accurate temperature and humidity I2C se

Post by mdietinger@gmail.com » 08 Nov 2016 07:54

Michael,
Tonight i had a real World test. Temperature dropped bellow 0.
Hat one Sensor with int and one with unsigned int.
The one with int went flad at 0 degrees.
So type matters, like i though.
Direct conversion doesnt show Same result as from Byte.
Guess we need to get a Statement from devolopers.
Regards,
Markus

michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

Re: HYT 939(HYTxxx) Accurate temperature and humidity I2C se

Post by michap » 08 Nov 2016 09:45

Hi,
of course not all types are good for all values - it was only an example ;)

I will test it some later with other sensor, just made Honeywell sensor function for Z-Uno.
Will tell you some later.

Michael

michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

Re: HYT 939(HYTxxx) Accurate temperature and humidity I2C se

Post by michap » 08 Nov 2016 11:26

ok,... have checked - and developers confirm it.

temperature value should be (signed) integer.

And the getter function like this

Code: Select all

int getterTemp1(void) {
  return temperature1;
}
Other things are compiler "issues" - may work or not.

I see negative temperature values in Z-Way using the Honeywell sensor.

Michael

mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: HYT 939(HYTxxx) Accurate temperature and humidity I2C se

Post by mdietinger@gmail.com » 08 Nov 2016 11:34

OK, Loks like signed - signed and unsigned -unsigned works, but not a combination of them.
I am out of contry and can only test on the weekend.

Regards,

Markus

mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: HYT 939(HYTxxx) Accurate temperature and humidity I2C se

Post by mdietinger@gmail.com » 14 Nov 2016 09:52

Tested int for variable and int for getter over the weekend.
This combination doesn't work either.
Seems like getter requires an unsigned variable not as described in documentation signed!
Getter in all examples is correctly unsigned, but some of the temperature examples use signed variables for the temperature.
Based on my own testing I guess they might only work down to 0°
Would be great if we get this confirmed and all examples updated.

Post Reply