{"id":2547,"date":"2018-12-16T00:00:40","date_gmt":"2018-12-15T23:00:40","guid":{"rendered":"https:\/\/iot.fkainka.de\/?p=2547"},"modified":"2018-11-21T13:03:56","modified_gmt":"2018-11-21T12:03:56","slug":"day16-2018","status":"publish","type":"post","link":"https:\/\/iot.fkainka.de\/en\/day16-2018","title":{"rendered":"Day 16: Universal Remote-Control"},"content":{"rendered":"<p>The door today reveals the counterpart to yesterday\u2019s component, namely an IR diode. Now you can build a real remote-control for your TV and control it conveniently via smartphone and website.\u00a0 We will use the following setup.<\/p>\n<div id=\"attachment_2548\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine.png\"><img aria-describedby=\"caption-attachment-2548\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-2548\" src=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine-827x1024.png\" alt=\"Der Aufbau der Fernbedienungen mit IR-Empf\u00e4nger und Sendediode\" width=\"464\" height=\"574\" data-id=\"2548\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine-827x1024.png 827w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine-242x300.png 242w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine-768x951.png 768w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/Day16_IRremotefzz_Steckplatine.png 879w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/a><p id=\"caption-attachment-2548\" class=\"wp-caption-text\">Setup of remote controls with IR receiver and transmitter diode<\/p><\/div>\n<p>Select the program for today. The board will start again in headless mode; the board\u2019s website will not be available but you will have the board\u2019s MQTT feature. To switch to default mode, remove the jumper on pin 23 and restart the board.<\/p>\n<div id=\"attachment_2549\" style=\"width: 493px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow.png\"><img aria-describedby=\"caption-attachment-2549\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-2549\" src=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow.png\" alt=\"Der Flow des heutigen Tages\" width=\"483\" height=\"486\" data-id=\"2549\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow.png 747w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow-150x150.png 150w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow-298x300.png 298w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Flow-60x60.png 60w\" sizes=\"(max-width: 483px) 100vw, 483px\" \/><\/a><p id=\"caption-attachment-2549\" class=\"wp-caption-text\">The flow today<\/p><\/div>\n<p><iframe style=\"border: none; width: 100%;\" src=\"https:\/\/pastebin.com\/embed_iframe\/jjX34igy\"><\/iframe><\/p>\n<p>Our flow today looks rather complicated; however, basically these are just all UI buttons writing to the same topic. But before you import and start the flow, rewrite all topics to your personal topic using the &#8220;Replace all&#8221; trick. Again, disable all previous flows. Now start the flow and switch to the UI page. You will see a bunch of buttons that are not yet calibrated to your TV. Go to the second tab labelled <strong>Day16 Receive IR Codes<\/strong>. The page looks a bit unexciting because it has only a text box, but it is very useful. Point now a remote control at the receiver and press a key and a text will appear in the window that may look like this:<\/p>\n<p><strong>{&#8220;cmd&#8221;:&#8221;ir_send&#8221;,&#8221;type&#8221;:3,&#8221;value&#8221;:551494365,&#8221;length&#8221;:32}<\/strong><\/p>\n<p>The text was received by <strong>NodeESP\/[PID]\/ir\/recv\/out <\/strong>and contains the data of the received code. Very few small things were changed by the flow. On the one hand repetition codes are filtered out and on the other hand, the command was changed from <strong>ir_recv<\/strong> to <strong>ir_send<\/strong>. This allows you to basically just copy the text and insert it into the payload area of\u00a0 a button. If pressed, the button sends the command with the data of the code to the board at once, which will send the code via IR diode to the TV. Like that you are able to hardcode and create your own remote code by code.<\/p>\n<div id=\"attachment_2550\" style=\"width: 654px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload.png\"><img aria-describedby=\"caption-attachment-2550\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-2550\" src=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload.png\" alt=\"So werden die Kommandos als Payload des Buttons gespeichert\" width=\"644\" height=\"401\" data-id=\"2550\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload.png 990w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload-300x187.png 300w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload-768x478.png 768w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16ButtonPayload-972x605.png 972w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><p id=\"caption-attachment-2550\" class=\"wp-caption-text\">Commands are saved as payload of the button<\/p><\/div>\n<p><strong>Note:<\/strong> The GUI layout is based on an average modern remote. Icons on the buttons indicate its function. You can find a list of useful buttons on the website <strong><a href=\"https:\/\/klarsys.github.io\/angular-material-icons\/\">https:\/\/klarsys.github.io\/angular-materi<\/a><\/strong><strong><a href=\"https:\/\/klarsys.github.io\/angular-material-icons\/\">al-icons\/<\/a><\/strong><a href=\"https:\/\/klarsys.github.io\/angular-material-icons\/\">.<\/a><\/p>\n<p><div id=\"attachment_2551\" style=\"width: 438px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png\"><img aria-describedby=\"caption-attachment-2551\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2551\" src=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png\" alt=\"Das User Interface\" width=\"428\" height=\"659\" data-id=\"2551\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png 428w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote-195x300.png 195w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/a><p id=\"caption-attachment-2551\" class=\"wp-caption-text\">The UI<\/p><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>The door today reveals the counterpart to yesterday\u2019s component, namely an IR diode. Now you can build a real remote-control for your TV and control it conveniently via smartphone and website.\u00a0 We will use the following setup. Select the program&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/iot.fkainka.de\/en\/day16-2018\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":2551,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[315,312,313],"tags":[],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Day 16: Universal Remote-Control - Internet of Things with the NanoESP<\/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:\/\/iot.fkainka.de\/en\/day16-2018\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 16: Universal Remote-Control - Internet of Things with the NanoESP\" \/>\n<meta property=\"og:description\" content=\"The door today reveals the counterpart to yesterday\u2019s component, namely an IR diode. Now you can build a real remote-control for your TV and control it conveniently via smartphone and website.\u00a0 We will use the following setup. Select the program...Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iot.fkainka.de\/en\/day16-2018\" \/>\n<meta property=\"og:site_name\" content=\"Internet of Things with the NanoESP\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-15T23:00:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-21T12:03:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png\" \/>\n\t<meta property=\"og:image:width\" content=\"428\" \/>\n\t<meta property=\"og:image:height\" content=\"659\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"fk\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"fk\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iot.fkainka.de\/en\/day16-2018\",\"url\":\"https:\/\/iot.fkainka.de\/en\/day16-2018\",\"name\":\"Day 16: Universal Remote-Control - Internet of Things with the NanoESP\",\"isPartOf\":{\"@id\":\"https:\/\/iot.fkainka.de\/#website\"},\"datePublished\":\"2018-12-15T23:00:40+00:00\",\"dateModified\":\"2018-11-21T12:03:56+00:00\",\"author\":{\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a\"},\"breadcrumb\":{\"@id\":\"https:\/\/iot.fkainka.de\/en\/day16-2018#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iot.fkainka.de\/en\/day16-2018\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iot.fkainka.de\/en\/day16-2018#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/iot.fkainka.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Day 16: Universal Remote-Control\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/iot.fkainka.de\/#website\",\"url\":\"https:\/\/iot.fkainka.de\/\",\"name\":\"Internet of Things with the NanoESP\",\"description\":\"The webpage for the Arduino compatible WiFi-Board\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/iot.fkainka.de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a\",\"name\":\"fk\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g\",\"caption\":\"fk\"},\"url\":\"https:\/\/iot.fkainka.de\/en\/author\/fk\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Day 16: Universal Remote-Control - Internet of Things with the NanoESP","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:\/\/iot.fkainka.de\/en\/day16-2018","og_locale":"en_US","og_type":"article","og_title":"Day 16: Universal Remote-Control - Internet of Things with the NanoESP","og_description":"The door today reveals the counterpart to yesterday\u2019s component, namely an IR diode. Now you can build a real remote-control for your TV and control it conveniently via smartphone and website.\u00a0 We will use the following setup. Select the program...Read more","og_url":"https:\/\/iot.fkainka.de\/en\/day16-2018","og_site_name":"Internet of Things with the NanoESP","article_published_time":"2018-12-15T23:00:40+00:00","article_modified_time":"2018-11-21T12:03:56+00:00","og_image":[{"width":428,"height":659,"url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png","type":"image\/png"}],"author":"fk","twitter_card":"summary_large_image","twitter_misc":{"Written by":"fk","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/iot.fkainka.de\/en\/day16-2018","url":"https:\/\/iot.fkainka.de\/en\/day16-2018","name":"Day 16: Universal Remote-Control - Internet of Things with the NanoESP","isPartOf":{"@id":"https:\/\/iot.fkainka.de\/#website"},"datePublished":"2018-12-15T23:00:40+00:00","dateModified":"2018-11-21T12:03:56+00:00","author":{"@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a"},"breadcrumb":{"@id":"https:\/\/iot.fkainka.de\/en\/day16-2018#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iot.fkainka.de\/en\/day16-2018"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iot.fkainka.de\/en\/day16-2018#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/iot.fkainka.de\/"},{"@type":"ListItem","position":2,"name":"Day 16: Universal Remote-Control"}]},{"@type":"WebSite","@id":"https:\/\/iot.fkainka.de\/#website","url":"https:\/\/iot.fkainka.de\/","name":"Internet of Things with the NanoESP","description":"The webpage for the Arduino compatible WiFi-Board","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/iot.fkainka.de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a","name":"fk","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g","caption":"fk"},"url":"https:\/\/iot.fkainka.de\/en\/author\/fk"}]}},"jetpack_featured_media_url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2018\/11\/T16Remote.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6McI0-F5","_links":{"self":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/2547"}],"collection":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/comments?post=2547"}],"version-history":[{"count":3,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/2547\/revisions"}],"predecessor-version":[{"id":2554,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/2547\/revisions\/2554"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media\/2551"}],"wp:attachment":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media?parent=2547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/categories?post=2547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/tags?post=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}