{"id":388,"date":"2020-03-30T20:35:27","date_gmt":"2020-03-31T01:35:27","guid":{"rendered":"https:\/\/sundrysites.com\/?page_id=388"},"modified":"2020-03-31T09:21:49","modified_gmt":"2020-03-31T14:21:49","slug":"venstar-control","status":"publish","type":"page","link":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/","title":{"rendered":"Venstar Control"},"content":{"rendered":"\n<p>The second of the three (info, control and runtimes) Venstar projects that I&#8217;ll discuss is the control, discussing how to enable HCA to control the Venstar, doing such things as setting the mode, fan operation, heat point and cool point.<\/p>\n\n\n\n<p>This project is made up of the following components:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A program in HCA which initiates the control.<\/li><li>A Perl program that sends out the appropriate command and lets HCA know if it was received.<\/li><li>A Venstar T5800 with the API enabled.<\/li><\/ul>\n\n\n\n<p>The Venstar T5800 is fully programmable and can be controlled from the Skyport web site as well.  So there&#8217;s no compelling reason to have HCA also control it.  Still, I can think of times when it would be useful and this project has the details.<\/p>\n\n\n\n<p>Per section 3.2 of <a href=\"https:\/\/sundrysites.com\/wp-content\/uploads\/vennstar-api.pdf\">Venstar&#8217;s API reference<\/a> there are 3 main things you can control: mode (auto, heat, cool, off), fan (auto, on) and the heat\/cool set points.  Instead of a straight-forward http request you now must use an http post that is url encoded.  Luckily Perl is able to do this with little effort.<\/p>\n\n\n\n<p><strong>HCA Initiates the Control<\/strong><\/p>\n\n\n\n<p>For whatever you want to control you must first set up an HCA flag.  In my example, I only control the heat and cool set points, so I have just two flags: vennewhsp and vennewcsp.  Just defining them in a compute box is sufficient to create them.  In the compute box you&#8217;d have one or more statements like: vennewhsp = 72;.  Once the appropriate flags are set to their desired values you use the execute external program box, which looks like:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"76\" height=\"63\" src=\"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg\" alt=\"\" class=\"wp-image-464\"\/><\/figure><\/div>\n\n\n\n<p>Inside that box you would define the Perl program to execute and pass the flags as parameters.  Here&#8217;s the definitions:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"407\" src=\"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/ven-ctl.jpg\" alt=\"\" class=\"wp-image-466\" srcset=\"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/ven-ctl.jpg 556w, https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/ven-ctl-300x220.jpg 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure><\/div>\n\n\n\n<p>The first line calls the Perl interpreter, the second sets the folder where all the files reside.  The third line is the most interesting: <em>venstar-control.pl %vennewhsp% %vennewcsp%.<\/em>  It names the Perl script that sends the control along with 2 parameters &#8211; the flags (enclosed in %&#8217;s) as mentioned above.<\/p>\n\n\n\n<p><strong>Perl Sends the Control<\/strong><\/p>\n\n\n\n<p>The Perl program, listed <a rel=\"noreferrer noopener\" href=\"http:\/\/homeautomationprojects.org\/?page_id=227\" target=\"_blank\">here<\/a>, picks the values of the flags up as arguments in order &#8211; so you must be careful to line them up.  It issues the control and awaits a response, setting a flag to indicate success.  If you wanted to check this response with HCA you&#8217;d write the flag to a file that HCA would subsequently read &#8211; see <a href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-query-info\/\">the query\/info posting<\/a> to get an idea of how this is done.<\/p>\n\n\n\n<p><strong>The Venstar with its API Enabled<\/strong><\/p>\n\n\n\n<p>There&#8217;s not much to add to <a href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-t5800-api-setup\/\">this posting<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The second of the three (info, control and runtimes) Venstar projects that I&#8217;ll discuss is the control, discussing how to enable HCA to control the Venstar, doing such things as setting the mode, fan operation, heat point and cool point. This project is made up of the following components: A program in HCA which initiates &hellip; <a href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Venstar Control<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":384,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-388","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Venstar Control - Sundrysites<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Venstar Control - Sundrysites\" \/>\n<meta property=\"og:description\" content=\"The second of the three (info, control and runtimes) Venstar projects that I&#8217;ll discuss is the control, discussing how to enable HCA to control the Venstar, doing such things as setting the mode, fan operation, heat point and cool point. This project is made up of the following components: A program in HCA which initiates &hellip; Continue reading Venstar Control &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/\" \/>\n<meta property=\"og:site_name\" content=\"Sundrysites\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-31T14:21:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/\",\"url\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/\",\"name\":\"Venstar Control - Sundrysites\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sundrysites.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/venstar-record-flow.jpg\",\"datePublished\":\"2020-03-31T01:35:27+00:00\",\"dateModified\":\"2020-03-31T14:21:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sundrysites.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/venstar-record-flow.jpg\",\"contentUrl\":\"https:\\\/\\\/sundrysites.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/venstar-record-flow.jpg\",\"width\":76,\"height\":63},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/venstar-control\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Home Info\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Arduino Projects\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Venstar\",\"item\":\"https:\\\/\\\/sundrysites.com\\\/index.php\\\/home-info\\\/arduino-projects\\\/venstar\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Venstar Control\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#website\",\"url\":\"https:\\\/\\\/sundrysites.com\\\/\",\"name\":\"Sundrysites\",\"description\":\"As In Various and Sundry\",\"publisher\":{\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#\\\/schema\\\/person\\\/1e11ce6af1587a3431e57dfc0797ab61\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sundrysites.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/sundrysites.com\\\/#\\\/schema\\\/person\\\/1e11ce6af1587a3431e57dfc0797ab61\",\"name\":\"Wayne Gulden\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\",\"caption\":\"Wayne Gulden\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/sundrysites.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Venstar Control - Sundrysites","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/","og_locale":"en_US","og_type":"article","og_title":"Venstar Control - Sundrysites","og_description":"The second of the three (info, control and runtimes) Venstar projects that I&#8217;ll discuss is the control, discussing how to enable HCA to control the Venstar, doing such things as setting the mode, fan operation, heat point and cool point. This project is made up of the following components: A program in HCA which initiates &hellip; Continue reading Venstar Control &rarr;","og_url":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/","og_site_name":"Sundrysites","article_modified_time":"2020-03-31T14:21:49+00:00","og_image":[{"url":"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/","url":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/","name":"Venstar Control - Sundrysites","isPartOf":{"@id":"https:\/\/sundrysites.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/#primaryimage"},"image":{"@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/#primaryimage"},"thumbnailUrl":"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg","datePublished":"2020-03-31T01:35:27+00:00","dateModified":"2020-03-31T14:21:49+00:00","breadcrumb":{"@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/#primaryimage","url":"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg","contentUrl":"https:\/\/sundrysites.com\/wp-content\/uploads\/2020\/03\/venstar-record-flow.jpg","width":76,"height":63},{"@type":"BreadcrumbList","@id":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/venstar-control\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sundrysites.com\/"},{"@type":"ListItem","position":2,"name":"Home Info","item":"https:\/\/sundrysites.com\/index.php\/home-info\/"},{"@type":"ListItem","position":3,"name":"Arduino Projects","item":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/"},{"@type":"ListItem","position":4,"name":"Venstar","item":"https:\/\/sundrysites.com\/index.php\/home-info\/arduino-projects\/venstar\/"},{"@type":"ListItem","position":5,"name":"Venstar Control"}]},{"@type":"WebSite","@id":"https:\/\/sundrysites.com\/#website","url":"https:\/\/sundrysites.com\/","name":"Sundrysites","description":"As In Various and Sundry","publisher":{"@id":"https:\/\/sundrysites.com\/#\/schema\/person\/1e11ce6af1587a3431e57dfc0797ab61"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sundrysites.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/sundrysites.com\/#\/schema\/person\/1e11ce6af1587a3431e57dfc0797ab61","name":"Wayne Gulden","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g","caption":"Wayne Gulden"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/c0392cdfb7826ed5407aad362998bc6dd03fe293560ce15ccc2211357e3cec6e?s=96&d=mm&r=g"},"sameAs":["https:\/\/sundrysites.com"]}]}},"_links":{"self":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/comments?post=388"}],"version-history":[{"count":3,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/388\/revisions"}],"predecessor-version":[{"id":484,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/388\/revisions\/484"}],"up":[{"embeddable":true,"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/pages\/384"}],"wp:attachment":[{"href":"https:\/\/sundrysites.com\/index.php\/wp-json\/wp\/v2\/media?parent=388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}