How to use temperature adjustment option?

Moderator: leecollings

Post Reply
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

How to use temperature adjustment option?

Post by ThinkPad »

Hi,

I am using a temperature + humidity sensor based on ESP8266 + DHT22: http://domoticz.com/forum/viewtopic.php ... 741#p40343

However, i have the idea that the temperature reported is too high. I tried to adjust the sensor (click 'Edit' underneath virtual temp sensor and then fill in adjustment). However, it doesn't seem to affect the indicated temperature?

How do i use this? I tried:
'-0.8'
'0.8'
'-0,8'

But none of these values seem to do anything. I also tried '-10' to see if it is because of the decimal, but that didn't do anything either.....
As a last resort i could do the calculation in my script, but Domoticz has the option already built in, so why not use that ;)
I am not active on this forum anymore.
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: How to use temperature adjustment option?

Post by dannybloe »

Not that I can answer your question but why don't you adjust the value in the esp8266 itself?

/me is heavily playing with the esp himself
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: How to use temperature adjustment option?

Post by ThinkPad »

Yeah i will probably do that in my script, but i am curious why Domoticz ignores the adjustment setting.
I am not active on this forum anymore.
User avatar
bizziebis
Posts: 182
Joined: Saturday 19 October 2013 14:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8805
Location: The Netherlands
Contact:

Re: How to use temperature adjustment option?

Post by bizziebis »

It should work. But maybe not for all types of temperature sensors. I use -1.5 correction and it indeed is adjusted by 1.5 degrees.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: How to use temperature adjustment option?

Post by ThinkPad »

I think it doesn't work for a virtual sensor then....

How can i do the adjustment in the Bash script i am using?

Code: Select all

#!/bin/bash
# This script retrieves the temperature and humidity from the webpage
# generated by the code running on ESP8266 that is posted here
# http://harizanov.com/2014/11/esp8266-powered-web-server-led-control-dht22-temperaturehumidity-sensor-reading/

# Fill in variables
ESP_IP="192.168.4.248"
DOMO_IP="192.168.4.4"
DOMO_PORT="8084"
DOMO_IDX="121"

# Retrieve webpage and strip out relevant information and put information (position 13 & 16) into two variables (temp, hum)
curl -s http://$ESP_IP/dht22.tpl | grep "reading is" | awk '{print $13, $16;}' | sed 's/*C,//g' | while read temp hum
do
if awk "BEGIN {exit $hum <= 25 ? 0 : 1}"
then
   #echo "Dry"
    hum_status="2"
elif awk "BEGIN {exit $hum > 60 ? 0 : 1}"
then
    #echo "Wet"
    hum_status="3"
elif awk "BEGIN {exit (($hum >= 25)&&($hum <= 60)) ? 0 : 1}"
then
      #echo "Comfortable"
    hum_status="1"    
else
    #echo "Normal"
    hum_status='0'  
fi   
# Send data to virtual sensor in Domoticz ("Temp + Humidity").
OUTPUT=`curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$DOMO_IDX&nvalue=0&svalue=$temp;$hum;$hum_status"`
done
I tried something like:
$tempcorrected = $temp-1.2

But that won't work...
I am not active on this forum anymore.
oopee
Posts: 40
Joined: Monday 12 August 2013 11:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.x
Location: Finland
Contact:

Re: How to use temperature adjustment option?

Post by oopee »

The adjustment setting kicks in when the sensor value is updated next time.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: How to use temperature adjustment option?

Post by ThinkPad »

gizmocuz told me at the (Dutch) Domoticz forum on Tweakers.net that the adjustment option only works for real, physical sensors. When you update a virtual sensor through JSON, the value is passed 1:1 to the database of Domoticz. And thus, ignoring the adjustment option.

So i have to fix it in my script. Will mark the topic as solved.
I am not active on this forum anymore.
D'rMorris
Posts: 138
Joined: Thursday 01 May 2014 9:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands - Sittard
Contact:

Re: How to use temperature adjustment option?

Post by D'rMorris »

ThinkPad wrote:gizmocuz told me at the (Dutch) Domoticz forum on Tweakers.net that the adjustment option only works for real, physical sensors. When you update a virtual sensor through JSON, the value is passed 1:1 to the database of Domoticz. And thus, ignoring the adjustment option.

So i have to fix it in my script. Will mark the topic as solved.
@ Thinkpad: one remark on the correction in the script. I would do the correction in a uservariable and use that in the script. This to avoid changing numerous scripts later. If you later want to change the correction, just change the uservariable and everything is updated automatically. Just my 2 cents ;)
janegils
Posts: 7
Joined: Thursday 03 October 2013 18:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: How to use temperature adjustment option?

Post by janegils »

I'm wondering why you can only adjust temperature values, and not humidity values.
Should be easy to add...
Running Domoticz on Ubuntu Linux server
RFXCOM_Transceiver
Aeon Labs Z-Stick S2
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest