Temperature from humidity sensor

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Temperature from humidity sensor

Michael Hughes
If I read the humidity from:
 
/uncached/1F.49D100000000/main/26A829150000002E/humidity

and then read the temperature from:

/1F.49D100000000/main/26A829150000002E/temperature

will I get the temperature that was used to calculate the humidity?
--
Michael D Hughes

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

attachment0 (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Temperature from humidity sensor

Jan Kandziora
Am 14.10.2016 um 00:01 schrieb Michael Hughes:

> If I read the humidity from:
>
> /uncached/1F.49D100000000/main/26A829150000002E/humidity
>
> and then read the temperature from:
>
> /1F.49D100000000/main/26A829150000002E/temperature
>
> will I get the temperature that was used to calculate the
> humidity?
>
No. Reading "temperature" will start another temperature conversion. You
have to read "latesttemp" to read the contents of the temperature
register from last conversion (which was triggered by the humidity
conversion in this case.)

"latesttemp" is available since owfs-3.1p2.

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Temperature from humidity sensor

Colin Law
On 14 October 2016 at 00:25, Jan Kandziora <[hidden email]> wrote:
Am 14.10.2016 um 00:01 schrieb Michael Hughes:
> If I read the humidity from:
>
> /uncached/1F.49D100000000/main/26A829150000002E/humidity
>
> and then read the temperature from:
>
> /1F.49D100000000/main/26A829150000002E/temperature
>
> will I get the temperature that was used to calculate the
> humidity?
>
No. Reading "temperature" will start another temperature conversion. You
have to read "latesttemp" to read the contents of the temperature
register from last conversion (which was triggered by the humidity
conversion in this case.)

What is the difference between ../temperate and uncached/../temperature?

Colin
 

"latesttemp" is available since owfs-3.1p2.

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Temperature from humidity sensor

Matthias Urlichs-3
On 14.10.2016 09:36, Colin Law wrote:
> What is the difference between ../temperate and uncached/../temperature?
uncached/temperature will always trigger a conversion and then read the
value.
uncached/latesttemp will never trigger a conversion but read the last
value from the device.

What the cached versions will do is anybody's guess, mainly depending on
how long ago you last read them.

Since all of my 18b20 devices are powered, I simply write 1 to
simultaneous/temperature, wait a second, then read every chip's
uncached/latesttemp, write these values to whatever wants them (MQTT,
AMQP, etcd, …), wait 30 seconds, repeat.

I don't use the cached versions at all.

--
-- Matthias Urlichs


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Temperature from humidity sensor

Jan Kandziora
In reply to this post by Colin Law
Am 14.10.2016 um 09:36 schrieb Colin Law:

> On 14 October 2016 at 00:25, Jan Kandziora <[hidden email]> wrote:
>
>> Am 14.10.2016 um 00:01 schrieb Michael Hughes:
>>> If I read the humidity from:
>>>
>>> /uncached/1F.49D100000000/main/26A829150000002E/humidity
>>>
>>> and then read the temperature from:
>>>
>>> /1F.49D100000000/main/26A829150000002E/temperature
>>>
>>> will I get the temperature that was used to calculate the
>>> humidity?
>>>
>> No. Reading "temperature" will start another temperature conversion. You
>> have to read "latesttemp" to read the contents of the temperature
>> register from last conversion (which was triggered by the humidity
>> conversion in this case.)
>>
>
> What is the difference between ../temperate and uncached/../temperature?
>
The "normal" cached tree, under some circumstances, will return a cached
value from the latest access to that particular node.

However, as Michael did not read .../temperature but ../humidity, there
should be no cached value for the temperature node. (Well, in reality,
it is, because reading .../humidity in fact reads .../temperature
internally and *does not* bypass the cache. Good riddance.)

But it's better not to rely on the cache.

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Temperature from humidity sensor

Colin Law
On 14 October 2016 at 13:47, Jan Kandziora <[hidden email]> wrote:
Am 14.10.2016 um 09:36 schrieb Colin Law:
> On 14 October 2016 at 00:25, Jan Kandziora <[hidden email]> wrote:
>
>> Am 14.10.2016 um 00:01 schrieb Michael Hughes:
>>> If I read the humidity from:
>>>
>>> /uncached/1F.49D100000000/main/26A829150000002E/humidity
>>>
>>> and then read the temperature from:
>>>
>>> /1F.49D100000000/main/26A829150000002E/temperature
>>>
>>> will I get the temperature that was used to calculate the
>>> humidity?
>>>
>> No. Reading "temperature" will start another temperature conversion. You
>> have to read "latesttemp" to read the contents of the temperature
>> register from last conversion (which was triggered by the humidity
>> conversion in this case.)
>>
>
> What is the difference between ../temperate and uncached/../temperature?
>
The "normal" cached tree, under some circumstances, will return a cached
value from the latest access to that particular node.

However, as Michael did not read .../temperature but ../humidity, there
should be no cached value for the temperature node. (Well, in reality,
it is, because reading .../humidity in fact reads .../temperature
internally and *does not* bypass the cache. Good riddance.)

OK, thanks

Colin
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers