Page 1 of 1

How to registrate temperature differences in a floor heating system??

Posted: Tuesday 09 February 2016 16:14
by peternl
In our floorheating system I mounted several temperature measuring devices (in total 10 1-wire digital thermoelements type DS18B20) at the inlet and outlet of the 5 floorheating circuits and the main heating water circuit.
In the attachment is represented a screenshot of the Domoticz dashboard.
Now I want to registrate also the temperature differences (e.g. temperature difference in main heating water circuit and one or more floorheating circuits). My question is: is this possible in Domoticz?? And how to do that.

Re: How to registrate temperature differences in a floor heating system??

Posted: Wednesday 13 April 2016 7:05
by Egregius
Create a script that gets the values you have, do some calculations and sent it back to a dummy thermometer.

Re: How to registrate temperature differences in a floor heating system??

Posted: Wednesday 08 March 2017 10:49
by DomoticaRob
Hello PeterNL,

I am building a house and want to use floorheating as the main heating systeem. I want to control every room seperatly. Every room some kind of temperature sensor and Domoticz gives a signal to a actuator on the group divider. Do you use something like that? Where do I find a DIY in Jip and Janneke language?

Have a nice day,

Rob

Re: How to registrate temperature differences in a floor heating system??

Posted: Wednesday 08 March 2017 10:59
by emme
if you want to calculate the deltaT between in and out temp you could do like this:

Create a custom temperature sensor using Dummy Hardware
Create a LUA Device Event:

Code: Select all

TEMPIN = 'Device IN Name'
TEMPOUT = 'Device OUT Name'
TEMPD= 'Device Delta Name'

commandArray = {}

   if devicechanged[TEMPIN] or devicechanged[TEMPOUT] then
      deltaT = tonumber(otherdevices[TEMPIN]) - tonumber(otherdevices[TEMPOUT])
      commandArray[TEMPD] = tostring(deltaT)
   end if
   
return commandArray
at any change of the temp in the water sensors it calucluates the difference and update a custom temperature sensor

you can create a script for each room(zone) you have
or create a global script (maybe using arrays) that calculate delta every minute (or at every temp change)

Re: How to registrate temperature differences in a floor heating system??

Posted: Wednesday 08 March 2017 12:53
by K3rryBlue
Or use PHP and store all vaules for later references into a SQLIte database. So you can generate reports with for example Highcharts, which is already distributed with Domoticz.

Code: Select all

<?php
/* Get id from sensors via devices
+----+-----------------+---------+
| Idx| NAME			   | VAR     |
+----+-----------------+---------+
| 10 | fKetelin		  | $fktin  |
| 11 | fKeteluit       | $fktuit |
| 12 | fKeukenin       | $fkkin  |
| 13 | fLKeukenuit     | $fkkuit |
| 14 | fWoonkamernin   | $fwkin  |
| 15 | fWoonkameruit   | $fwkuit |

*/

# Standard url (change to your settings)
$ip  = "http://xxx.xxx.xxx.xxx:8080";

# Get Device information
$urlA = "/json.htm?type=devices&rid=";
# Set device value
$urlC = "/json.htm?type=command&param=udevice&idx=";
$date = date('now');
$time = time('now') * 1000;

function getJson($idx,$url,$val){
    $json_string_LRM = file_get_contents("$url" . "$idx");
    $parsed_json_LRM = json_decode($json_string_LRM, true);
    $parsed_json_LRM = $parsed_json_LRM['result'][0];
    $temp = $parsed_json_LRM[$val];
    return $temp;
}

function setTemp($idx,$url,$temp){
    $ch = curl_init();
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); #No need for feedback from server
    curl_setopt($ch,CURLOPT_URL, "$url" . "$idx&nvalue=0&svalue=$temp");
   $rr= curl_exec($ch);
	curl_close($ch);
}

 $fktin  = getJson(10, $ip . $urlA, 'Temp'); 
 $fktuit = getJson(11, $ip . $urlA, 'Temp'); 
 $fkkin  = getJson(12, $ip . $urlA, 'Temp'); 
 $fkkuit = getJson(13, $ip . $urlA, 'Temp'); 
 $fwkin  = getJson(14, $ip . $urlA, 'Temp'); 
 $fwkuit = getJson(15, $ip . $urlA, 'Temp'); 

//Do whatever you like with these values
 $favg = round(( (1*$fktin ) + (3*$fkkin) + (2*$fwkin)) / 6,2) ;  
 $diva = $fktuit - $fktin;
 $divb =  $fkkuit -  $fkkin;
 $divc =  $fwkuit -  $fwkin;
 
//Open a SQLite database
$db = new SQLite3('/home/pi/domoticz/heating.db');
//insert row
$db->exec("INSERT INTO temp_log (DATE, TIME, fKetelin, fKeteluit, Keukenin, fLKeukenuit,fWoonkamernin, fWoonkameruit, AVERAGE_TEMP)   VALUES ( $date,$time, $fktin , $fktuit,$fkkin, $fkkuit , $fwkin, $fwkuit ,$favg )");
?>