{"id":145,"date":"2021-06-18T13:12:44","date_gmt":"2021-06-18T13:12:44","guid":{"rendered":"https:\/\/csiag.eu\/?p=145"},"modified":"2022-12-31T15:13:28","modified_gmt":"2022-12-31T15:13:28","slug":"smarthome-system-variables","status":"publish","type":"post","link":"https:\/\/csiag.eu\/en\/blog\/2021\/06\/18\/smarthome-systemvariablen\/","title":{"rendered":"SmartHome \u2013 system variables"},"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>Some system variables are predefined, but you can also create them yourself and can be accessed via the \u201cSettings \u2013 System Variables\u201d menu. System variables must be unique and may therefore only be assigned once per control center. Special characters in the name should be avoided.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-1024x471.png\" alt=\"\" class=\"wp-image-146\" width=\"572\" height=\"263\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-1024x471.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-300x138.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-768x353.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-1536x706.png 1536w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21-1560x717.png 1560w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-21.png 1666w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/figure>\n\n\n\n<p>In the view of the system variables you can click on the \u201cNew\u201d button at the bottom left<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"36\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-1024x36.png\" alt=\"\" class=\"wp-image-148\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-1024x36.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-300x10.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-768x27.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-1536x54.png 1536w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-2048x71.png 2048w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-22-1560x54.png 1560w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>a system variable can be created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"187\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-1024x187.png\" alt=\"\" class=\"wp-image-151\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-1024x187.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-300x55.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-768x140.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-1536x281.png 1536w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25-1560x285.png 1560w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-25.png 2002w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The desired name of the system variable is entered in the \u201cName\u201d field, e.g. \u201cPresence\u201d. The description of the system variable can be different from the name or identical.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-27-1024x205.png\" alt=\"\" class=\"wp-image-153\" srcset=\"https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-27-1024x205.png 1024w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-27-300x60.png 300w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-27-768x154.png 768w, https:\/\/csiag.eu\/wp-content\/uploads\/2021\/06\/image-27.png 1500w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>There are several options to choose from as a variable type.<\/p>\n\n\n\n<p>If you want to check the &quot;presence&quot; of a person, the only choice is &quot;logic value&quot;, because the statement of the system variable &quot;presence&quot; can only assume the state &quot;true&quot; or &quot;false&quot;. \u201cTrue\u201d is therefore equivalent to \u201cthe person is <em>present<\/em>&quot; or &quot;<em>not present<\/em>\u201c. Here \u201cnot present\u201d was deliberately chosen instead of \u201cabsent\u201d because \u201cpresent\u201d and \u201cabsent\u201d can easily be confused with each other<\/p>\n\n\n\n<p>A list of values is interesting when a condition needs to be fulfilled depending on several values.<\/p>\n\n\n\n<p>A list of values can contain numbers, but also numeric values, such as \u201cSummer; \u201cAutumn\u201d, each separated from the other by a semicolon.<\/p>\n\n\n\n<p>All data in the \u201cnumber\u201d format are served via this type. You can take positive and negative values,<\/p>\n\n\n\n<p>Data of type \u201cString\u201d consists of any string of alphanumeric values including special characters.<\/p>\n\n\n\n<p>The system variable \u201cAlarm\u201d is set by the system to \u201ctriggered\u201d, corresponding to \u201ctrue\u201d, if an error occurs, otherwise to \u201cnot triggered\u201d, corresponding to \u201cfalse\u201d.<\/p>\n\n\n\n<p>In the \u201cUnit of measurement\u201d field, \u201ckW\u201d or \u201c\u00b0C\u201d, for example, can be entered if these are power values or temperatures, for example.<\/p>\n\n\n\n<p>The information in the \u201cValue\u201d field defines the initial value at system start, whether this should be assumed as \u201ctrue\u201d or \u201cfalse\u201d by default.<\/p>\n\n\n\n<p>If you assign a channel of a device to the system variable, click on the radio button \u201cwith\u201d under \u201cChannel assignment\u201d. In this case, the system variable is no longer displayed under \u201cSystem Variables\u201d, but rather in the web frontend for the corresponding device.<\/p>\n\n\n\n<p>In the script language you call the value of a system variable <\/p>\n\n\n\n<p><kbd>var myvar= dom.GetObject(&quot;Sysvar&quot;).Value();<\/kbd><\/p>\n\n\n\n<p>from, or sets a value with<\/p>\n\n\n\n<p><kbd>dom.GetObject(&quot;Sysvar&quot;).State(myvar);<\/kbd>.<\/p>\n\n\n\n<p>You can call up the value of a device channel<\/p>\n\n\n\n<p><kbd>var myvar = dom.GetObject(&quot;BidCos-RF.MEQ0817107:1.LOWBAT&quot;).Value();<\/kbd><\/p>\n\n\n\n<p>away. Here \u201cBidCos-RF.\u201d is the standardized header, and the following character string is the unique ID of the respective device, which was transmitted when the control center was trained, separated by a colon from the channel, here \u201c1\u201d, its value, here \u201cLOWBAT\u201d. , the battery charge level, should be queried.<\/p>\n\n\n\n<p>With<\/p>\n\n\n\n<p><kbd>WriteLine(myvar);<\/kbd> <\/p>\n\n\n\n<p>the determined value can be output.<\/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>Some system variables are predefined, but you can also create them yourself and access them via the \"Settings - System variables\" menu. System variables must be unique, i.e. they may only be assigned once per control center. Special characters in the name should be avoided. In the system variables view, a system variable can be created by clicking on the \"New\" button at the bottom left...&nbsp;<a href=\"https:\/\/csiag.eu\/en\/blog\/2021\/06\/18\/smarthome-systemvariablen\/\" rel=\"bookmark\">Read More \"<span class=\"screen-reader-text\">SmartHome \u2013 system variables<\/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":[346,352],"tags":[736,742,740,370,741,373,739,743],"class_list":["post-145","post","type-post","status-publish","format-standard","hentry","category-smarthome","category-smarthome-systemvariablen","tag-anwesenheit","tag-kanalzuprdnung","tag-logikwert","tag-smarthome","tag-string","tag-systemvariable","tag-systemvariablen","tag-zeichenkette"],"modified_by":"Achim Goerner","_links":{"self":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/posts\/145","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=145"}],"version-history":[{"count":0,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"wp:attachment":[{"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csiag.eu\/en\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}