bme280: change temperature offset with rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

bme280: change temperature offset with rules

#1 Post by chromo23 » 08 Jun 2021, 08:45

Good morning,

is it possible to change the temperature offset value of the bme280 with rules?
because the humidity is important too i would like to do it with changing the offset rather than a simple calculation....

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: bme280: change temperature offset with rules

#2 Post by Ath » 08 Jun 2021, 08:58

That should be a value that is set once, when calibrating the sensor, and not changed regularly.

In general, unless the plugin supports it, no settings can be changed from rules.
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: bme280: change temperature offset with rules

#3 Post by chromo23 » 08 Jun 2021, 09:08

Thats true, especially in terms of flash writes if you do something stupid in your rules.
But.... :) ..... i build a sensor for my brother which acts also as a night light. the temp deviation is very small when the light is on (+1,5°)
So i thought i do the offset with a rule when the light is on (i know this sounds stupid to put a heat-source into the sensor casing but the light is used very seldom)
Maybe i could calculate everything on the fly but i didn´t find a formula yet. and it is probably not that simple either.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: bme280: change temperature offset with rules

#4 Post by TD-er » 08 Jun 2021, 23:49

The formula for correcting the humidity is in the BME280 code :)
It is quite simple.
First you compute the dew point based on measured temp and hum.
Then you offset the temperature and compute the humidity based on the new temp and dew point.

To compute dew point, I already included a conversion which is shown at the bottom of the system variables page.
But to compute humidity from temp and dew point is not (yet) present as a conversion.
It is also a formula which is hard to do in rules I guess.

User avatar
chromo23
Normal user
Posts: 821
Joined: 10 Sep 2020, 16:02
Location: germany

Re: bme280: change temperature offset with rules

#5 Post by chromo23 » 09 Jun 2021, 21:44

I am not very good with code but i will dive right into it. :)
Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests