{"id":1807,"date":"2017-02-16T11:46:58","date_gmt":"2017-02-16T10:46:58","guid":{"rendered":"https:\/\/blog.mi.hdm-stuttgart.de\/?p=1807"},"modified":"2023-08-06T21:54:41","modified_gmt":"2023-08-06T19:54:41","slug":"building-a-hdm-alexa-skill-part-1","status":"publish","type":"post","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/16\/building-a-hdm-alexa-skill-part-1\/","title":{"rendered":"Building a HdM Alexa Skill &#8211; Part 1"},"content":{"rendered":"<h1>Introduction to the Project<\/h1>\n<h1><\/h1>\n<p><a href=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1816\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/16\/building-a-hdm-alexa-skill-part-1\/chatbot\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot.jpg\" data-orig-size=\"1200,800\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"chatbot\" data-image-description=\"&lt;p&gt;Vladgrin\\@Shutterstock&lt;br \/&gt;\nhttp:\/\/www.shutterstock.com\/gallery-803866p1.html&lt;\/p&gt;\n\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot-1024x683.jpg\" class=\"size-medium wp-image-1816 alignleft\" src=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot-300x200.jpg\" alt=\"\" width=\"300\" height=\"200\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot-300x200.jpg 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot-768x512.jpg 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot-1024x683.jpg 1024w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>It is becoming obvious that chatbots are quickly emerging to the next <em>Big Thing<\/em>. This is especially evident by the recent <em>flood<\/em> of publication of software development kits by major tech companies to encourage developers to build applications for their ecosystem.<\/p>\n<p><!--more--><\/p>\n<p>Microsoft offers a SDK to enable <a href=\"https:\/\/blogs.technet.microsoft.com\/microsoft_presse\/schichtwechsel-skype-bots\/\">chatbots in Skype<\/a>, Facebook is implementing chatbots into its\u00a0own <a href=\"http:\/\/t3n.de\/news\/f8-facebook-mark-zuckerberg-696459\/\">messenger<\/a>, Google is opening up their <a href=\"https:\/\/developers.google.com\/voice-actions\/\">voice assistant<\/a> to the public and Amazon already offers more than <a href=\"https:\/\/techcrunch.com\/2016\/09\/13\/amazons-alexa-app-store-hits-3000-skills-up-from-1000-in-june\/\">3.000 custom skills<\/a> for their Alexa voice service. Combined with Smart Speaker &#8211; take Amazon Echo, Google Home or the very <a href=\"https:\/\/blogs.windows.com\/buildingapps\/2016\/12\/13\/cortana-skills-kit-cortana-devices-sdk-announcement\/#HvrtmGpRTqC2OMcV.97\">recently announced device integration of Cortana by Microsoft<\/a> as an example &#8211; seamless voice interaction is introduced into our every day life and opens up a whole new market for developers to implement their products into the daily routine of their users.<\/p>\n<p>To gain expertise with this new technology we decided to develop our own voice service. Since &#8211; as of December 2016 &#8211; Amazon is slowly releasing their smart speakers Echo and Dot to Germany, we took the opportunity to be one of the first to release a German speaking <em>Skill<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2023\/08\/information_wall.jpg\" width=\"4032\" height=\"3024\" \/><\/p>\n<p>Now that we knew <strong>how to<\/strong> implement the project we needed to decide on <strong>what to<\/strong> implement. It was important to us that we don&#8217;t just implement a product that only serves us as a mean to learn and study but something that benefits others as well. The idea for a lightweight knowledge system which covers the basic functions to get through a regular university day at the HdM seemed fitting since we personally struggled with ever changing lecture halls. While there are possibilities to quickly lookup important updates using the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=de.hdmstuttgart.mi.hdmmobile\">mobile application<\/a> or one of the information displays which are distributed throughout the buildings, our team took the opportunity to further simplify the daily student life while using as much state of the art technology as possible.<\/p>\n<p>The video below shows an overview over the functionality of the finished project to give a brief preview on what to expect.<\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/BQi6T5bzs7c?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/p>\n<h2 id=\"markdown-header-task-overview-team-setup\">Task Overview &amp; Team Setup<\/h2>\n<p>If we were to start a new project from scratch, we wanted to develop it using both new or sophisticated software tools (e.g. serverless computing). At the same time, we faced a challenge concerning the hardware implementation: At the time of writing, the Amazon Echo \/ Dot devices are only available by invitation (and Amazon is very sparse giving them away). So, to be more independent, we initially decided to build our own Alexa powered device using a Raspberry Pi &#8211; which led to a whole other problem (more in the corresponding blog post). While two of our group worked on the Raspberry Pi &#8211; and later joined the skill development &#8211; Jonas and myself wrote the actual skill using Node.js while heavily relying on test driven development. To be able to seamlessly and automatically integrate our code from <a href=\"https:\/\/bitbucket.org\/E_Schmidt\/hdm-alexa-skill-blog\/src\/f44278370887f390d7461b22ff5aebbb2ab2c02c\/Introduction\/7\">Bitbucket<\/a> into Amazon Lambda we settled for Jenkins which was setup and configured by Malte.<\/p>\n<table>\n<thead>\n<tr>\n<th>Team Member<\/th>\n<th>Activity<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Andreas Fliehr<\/td>\n<td>Alexa Implementation on Raspberry Pi &amp; Skill Development<\/td>\n<\/tr>\n<tr>\n<td>Jos\u00e9 Egas<\/td>\n<td>Alexa Implementation on Raspberry Pi &amp; Skill Development<\/td>\n<\/tr>\n<tr>\n<td>Eric Schmidt<\/td>\n<td>Skill Development<\/td>\n<\/tr>\n<tr>\n<td>Jonas Scheffner<\/td>\n<td>HdM API Wrapper &amp; Skill Development<\/td>\n<\/tr>\n<tr>\n<td>Malte Vollmerhausen<\/td>\n<td>Jenkins<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Distribution of Labour<\/p>\n<h3 id=\"markdown-header-obtaining-the-data-writing-a-client-application\">Obtaining the Data: Writing a Client Application<\/h3>\n<p>Before we could start to write the actual skill we needed to gain access to the relevant information from various sources (The website of the university, menu schedule etc.). Fortunately for us, there is an API available which already parses the data of these sources and returns a JSON-Object containing the information. Jonas wrote a straightforward wrapper module for this API using Node.js which we later used to obtain the information we needed (The module is available on <a href=\"https:\/\/www.npmjs.com\/package\/hdm-client\">npm<\/a>). After the development on the module was completed, we were able to start with the actual development.<\/p>\n<h2 id=\"markdown-header-coming-up\">Coming Up<\/h2>\n<p>The following blog posts include in-depth coverage of the implementation techniques and reasoning of using Amazon&#8217;s Alexa Voice Service (AVS), Serverless Computing with Amazon Lambda, Jenkins as the continuous integration platform and Node.js as the programming environment all while heavily relying on test driven development. We hope you find the upcoming articles informative and that we could give you a little insight into our way of working.<\/p>\n<p>Further Remark: We plan to publish the skill and make it accessible through the amazon skill store! We will update this article as soon as it is available.<\/p>\n<h2 id=\"markdown-header-resources\">Resources<\/h2>\n<table>\n<thead>\n<tr>\n<th>Resource Name<\/th>\n<th>Link<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Skill Repository<\/td>\n<td><a href=\"https:\/\/bitbucket.org\/jscheffner\/hdm-alexa-skill\">https:\/\/bitbucket.org\/jscheffner\/hdm-alexa-skill<\/a><\/td>\n<\/tr>\n<tr>\n<td>Client Repository<\/td>\n<td><a href=\"https:\/\/bitbucket.org\/jscheffner\/hdm-node-client\">https:\/\/bitbucket.org\/jscheffner\/hdm-node-client<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>We present our own HdM Alexa Skill and share the experience we gained throughout this project.<\/p>\n","protected":false},"author":182,"featured_media":1816,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[120,650,22,651,2],"tags":[76,77,79,80,78,25,23],"ppma_author":[715],"class_list":["post-1807","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-technologies","category-scalable-systems","category-student-projects","category-system-designs","category-system-engineering","tag-amazon-alexa-skill","tag-amazon-web-services","tag-chatbot","tag-digital-assistant","tag-jenkins","tag-nodejs","tag-tdd"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/chatbot.jpg","jetpack-related-posts":[{"id":1863,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/02\/23\/building-an-hdm-alexa-skill-part-2\/","url_meta":{"origin":1807,"position":0},"title":"Building an HdM Alexa Skill &#8211; Part 2","author":"Andreas Fliehr","date":"23. February 2017","format":false,"excerpt":"We present our own HdM Alexa Skill and share the experience we gained throughout this project. This time: Decisions, Developed Modules and Implementation.","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/data_flow.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/data_flow.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/data_flow.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/data_flow.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/data_flow.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":2633,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/08\/28\/how-to-build-an-alexa-skill-to-get-information-about-your-timetable\/","url_meta":{"origin":1807,"position":1},"title":"How to build an Alexa Skill to get information about your timetable","author":"dm080@hdm-stuttgart.de","date":"28. August 2017","format":false,"excerpt":"Introduction With information technology today we can easily get any kind of information someone is interested in. Whether you want to know how the weather will be tomorrow or how to cook your favorite cake, you can find out almost anything today. But as a user it\u2019s getting more important\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/08\/RequestManager_UML.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1876,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/03\/03\/building-an-hdm-alexa-skill-part-3\/","url_meta":{"origin":1807,"position":2},"title":"Building an HdM Alexa Skill \u2013 Part 3","author":"je052","date":"3. March 2017","format":false,"excerpt":"We present our own HdM Alexa Skill and share the experience we gained throughout this project. This time: Developing the skill using Test-driven Development.","rel":"","context":"In &quot;Student Projects&quot;","block_context":{"text":"Student Projects","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/student-projects\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/test_coverage.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/test_coverage.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/test_coverage.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/test_coverage.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/test_coverage.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1984,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/03\/09\/building-an-hdm-alexa-skill-part-4\/","url_meta":{"origin":1807,"position":3},"title":"Building an HdM Alexa Skill &#8211; Part 4","author":"Malte Vollmerhausen","date":"9. March 2017","format":false,"excerpt":"We present our own HdM Alexa Skill and share the experience we gained throughout this project. This time: Automating tests and deployment with Continuous Integration via Jenkins.","rel":"","context":"In &quot;Student Projects&quot;","block_context":{"text":"Student Projects","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/student-projects\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/02\/jenkins.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":4213,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2018\/09\/02\/how-to-build-an-alexa-skill-to-get-information-about-your-timetable-2018-version\/","url_meta":{"origin":1807,"position":4},"title":"How to build an Alexa Skill to get information about your timetable 2018 Version","author":"nk068","date":"2. September 2018","format":false,"excerpt":"Imagine a student who just got up. He knows exactly that he has lectures today, but he does not remember which one or even when it begins. So, he asks his Alexa device: \u201cAlexa, which classes do I have today?\u2019\u201d His Alexa device is able to look into his timetable\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2018\/09\/Figure6.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2018\/09\/Figure6.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2018\/09\/Figure6.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2018\/09\/Figure6.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4306,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2018\/09\/14\/yet-another-connected-vehicle-cloud-platform\/","url_meta":{"origin":1807,"position":5},"title":"Yet another Connected Vehicle Cloud Platform","author":"dl045","date":"14. September 2018","format":false,"excerpt":"Getting Ideas...\u00a0write a User Story When I thought about an idea for a project, part of the lecture \"Software Development for Cloud Computing\", I had two related use-cases in mind. So I wrote down those high-level user-stories: As a user who owns a non-connected car, I want to access some\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"Material Data Logger","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2018\/09\/datalogger-sm-300x240.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"authors":[{"term_id":715,"user_id":182,"is_guest":0,"slug":"es096","display_name":"Eric Schmidt","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/dec7ed0ec34c8703d8643ab4d55eacab13c43b6aad56a2caa7e1ea82dc9752d6?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/users\/182"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/comments?post=1807"}],"version-history":[{"count":11,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1807\/revisions"}],"predecessor-version":[{"id":25540,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/1807\/revisions\/25540"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media\/1816"}],"wp:attachment":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media?parent=1807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/categories?post=1807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/tags?post=1807"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/ppma_author?post=1807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}