{"id":2644,"date":"2022-12-03T15:26:04","date_gmt":"2022-12-03T15:26:04","guid":{"rendered":"https:\/\/csiag.eu\/?p=2644"},"modified":"2023-01-12T09:37:13","modified_gmt":"2023-01-12T09:37:13","slug":"sv_it-query-of-the-inside-should-and-is-temperatures","status":"publish","type":"post","link":"https:\/\/csiag.eu\/en\/blog\/2022\/12\/03\/sv_it-abfrage-der-innen-soll-und-ist-temperaturen\/","title":{"rendered":"SV_IT_set \u2013 heating control \u2013 query of the indoor target and actual temperatures"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading time<\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<p class=\"wp-block-paragraph\">For the heating control, switching on when the target temperature falls below and switching off when it is reached, a request is sent to the wall thermostat regarding both value channels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The values received back are written into a variable. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both variable values are then compared with each other and the required action is carried out according to the result.<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installed hardware<br>\u2013 Homematic 4-way relay module&nbsp;<a href=\"https:\/\/www.amazon.de\/HomeMatic-HM-LC-SW4-PCB-4-Kanal-Schaltaktor-Komplettbausatz\/dp\/B002BZGBA0\/ref=sr_1_1?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;crid=Z241YRYEPSUX&amp;keywords=homematic+HM-LC-Sw4-WM&amp;qid=1667671691&amp;sprefix=homematic+hm-lc-sw4-wm%2Caps%2C137&amp;sr=8-1\" target=\"_blank\" rel=\"noreferrer noopener\">HM-LC-Sw4-WM<\/a><br>\u2013 Homematic wall thermostat <a href=\"https:\/\/de.elv.com\/homematic-funk-wandthermostat-hm-tc-it-wm-w-eu-fuer-smart-home-hausautomation-132030\" target=\"_blank\" rel=\"noreferrer noopener\">HM-TC-IT-WM-W-EU<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The program:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"246\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-1024x246.png\" alt=\"\" class=\"wp-image-2764\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-1024x246.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-300x72.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-768x184.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-1536x369.png 1536w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-2048x491.png 2048w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-17-1560x374.png 1560w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">SV_IT_set<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The script:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>real Var_SV_IT_set;<br>real Var_SV_IT_actual;<br>var SV_IT_set;<br>var SV_IT_actual;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Var_SV_IT_set = dom.GetObject(&quot;BidCos-RF.MEQ1576103:2.SET_TEMPERATURE&quot;).Value();<br>WriteLine(&quot;Var_SV_IT_set&quot;);WriteLine(Var_SV_IT_set);<br>dom.GetObject(&quot;SV_IT_set&quot;).State(Var_SV_IT_set);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Var_SV_IT_actual = dom.GetObject(&quot;BidCos-RF.MEQ1576103:1.TEMPERATURE&quot;).Value();<br>WriteLine(&quot;Var_SV_IT_actual&quot;);WriteLine(Var_SV_IT_actual);<br>dom.GetObject(&quot;SV_IT_actual&quot;).State(Var_SV_IT_actual);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>if (Var_SV_IT_set &gt; Var_SV_IT_actual)<br>{<br>dom.GetObject(&#039;SV_IT&#039;).State(0);<br>WriteLine(&quot;Var_SV_IT_actual&quot;);WriteLine(&quot;small Var_SV_IT_set&quot;);<br>}<br>else<br>{<br>dom.GetObject(&#039;SV_IT&#039;).State(1);<br>WriteLine(&quot;Var_SV_IT_actual&quot;);WriteLine(&quot;greater than Var_SV_IT_set&quot;);<br>}<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The output of the script (if the lines <code>WriteLine(&quot; ... &quot;)<\/code> are not commented out):<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Var_SV_IT_set<br>23.000000<br>Var_SV_IT_actual<br>22.300000<br>Var_SV_IT_actual<br>small Var_SV_IT_set<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here the target temperature is, for example, 23 \u00b0C. The actual temperature is 22.3 \u00b0C and is therefore smaller than the target temperature. The target temperature has not been reached and the query result is therefore \u201cwrong\u201d, which is why the heating is switched ON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The line of code introduced with the sequence <code>dom.GetObject<\/code>, followed by the device type \u201c<code>BidCos RF.<\/code>\u201c for non-IP devices<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>dom.GetObject(&quot;BidCos-RF.IEQ0101895:1.STATE&quot;).State(1);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">transfers to the switching actuator with the specified address \u201c<code>IEQ0101895<\/code>\u201c on his channel \u201c<code>1.STATE<\/code>\u201c the status \u201c1\u201d, for \u201con\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the target temperature is reached, the query result becomes \u201ctrue\u201d and the heating is switched OFF, which is initiated analogously when the status changes to \u201c0\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <a href=\"https:\/\/github.com\/mdzio\/ccu-historian\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">CCU Historian<\/a> (Statistics Add-On) the regulation then looks like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"456\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-1024x456.png\" alt=\"\" class=\"wp-image-2768\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-1024x456.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-300x134.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-768x342.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-1536x684.png 1536w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18-1560x694.png 1560w, https:\/\/csiag.eu\/wp-content\/uploads\/2022\/12\/image-18.png 1784w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">CCU historian evaluation<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The top two curve sections show the status of the two relays, which switch the heating coils with 500 W or 1,000 W (1 = ON, 0 = OFF).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The third section represents the relay connected in parallel to the existing ALDE thermostat that switches the pump. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fourth section shows the target temperature set on the wall thermostat with the blue curve and the measured actual temperature in the purple curve.<br>The inertia of the control is 0.2 \u00b0C, the switch-on accuracy is 0.1 \u00b0C.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fifth section shows the course of the outside temperature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The sixth section shows the continuous power consumption. The small dips represent the off\/on periods of the refrigerator, the peaks represent the temporary consumption of, for example, a coffee machine or vacuum cleaner.<\/p>","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading time<\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>For heating control, switching on when the temperature falls below the setpoint temperature and switching off when it is reached, a request is sent to the wall thermostat for both value channels. The values received back are written to a variable. Both variable values are then compared with each other and the required action is carried out according to the result. The program: The script: real Var_SV_IT_set;real Var_SV_IT_actual;var...&nbsp;<a href=\"https:\/\/csiag.eu\/en\/blog\/2022\/12\/03\/sv_it-abfrage-der-innen-soll-und-ist-temperaturen\/\" rel=\"bookmark\">Read More \"<span class=\"screen-reader-text\">SV_IT_set \u2013 heating control \u2013 query of the indoor target and actual temperatures<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[347],"tags":[428,403,407,404,384,405,408,406],"class_list":["post-2644","post","type-post","status-publish","format-standard","hentry","category-smarthome-im-wohnmobil","tag-ccu-historian","tag-heizungssteuerung","tag-historian","tag-ist-temperatur","tag-schaltaktor","tag-soll-temperatur","tag-statistik","tag-wandthermostat"],"modified_by":"Achim Goerner","_links":{"self":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/comments?post=2644"}],"version-history":[{"count":0,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/posts\/2644\/revisions"}],"wp:attachment":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/media?parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/categories?post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/tags?post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}