1. 程式人生 > >Implement voice controls for a serverless home automation hub

Implement voice controls for a serverless home automation hub

Summary

Home automation has gone from science fiction to reality in a few short years. This code pattern shows you how easy it is to build a home automation hub using natural-language services and IBM Cloud Functions (formerly OpenWhisk) serverless technology.

Description

Over the past few years, we’ve seen a significant rise in the popularity of intelligent personal assistants – think of Apple Siri, Amazon Alexa, and Google Assistant. At first these apps seemed like little more than a novelty, but they’ve now evolved to become convenient, useful, and for a growing number of enthusiastic users, essential.

These apps provide users with an easy natural-language interface that enables them to interact with service APIs and IoT-connected devices. Now that natural-language interaction is taking the next step, developers are keen to provide voice interaction for a fully automated home.

This code pattern guides you into the world of interactive home automation. Homes are truly becoming “smart,” with more and more devices available to connect and control with voice commands. You learn how to set up your own starter home automation hub by using a Raspberry PI to turn power outlets off and on. After the circuit and software dependencies are installed and configured properly, you can use IBM Watson’s language services to control the power outlets with voice or text commands.

You also dive into the world of serverless development. This code pattern shows you how to use the serverless functions of IBM Cloud Functions to trigger those same outlets based on a timed schedule, changes to the weather, motion sensor activation, and other inputs. Learn to use Watson services to interpret user input and how IBM Cloud services can make a system more accessible using HTTP, SMS, MQTT and other protocols. You can expand the Watson IoT Platform to process analytics to determine how long specific devices stay on and adjust the IBM Cloud Functions sequence to control devices based on a schedule or triggered sensors.

So forget about the novelty factor – you need to stay current with your development skills to ensure that the apps you produce are in demand. People want smart homes, connected devices, and voice-activated appliances; this code sample shows you how to do it.

Flow

flow

  1. The user speaks a command into the microphone, or sends a text to the Twilio SMS number.
  2. The input is captured and embedded in an HTTP POST request to trigger an IBM Cloud Functions sequence.
  3. IBM Cloud Functions action 1 forwards the audio to the IBM Cloud Speech to Text service and waits for the response.
  4. The transcription is forwarded to IBM Cloud Functions action 2.
  5. IBM Cloud Functions action 2 calls the Assistant service to analyze the user’s text input and then waits for the response.
  6. The Assistant service result is forwarded to the final IBM Cloud Functions action.
  7. The IBM Cloud Functions action publishes an entity/intent pair (“fan/turnon,” for example) to the IoT MQTT broker.
  8. The Raspberry Pi, which is subscribed to the MQTT broker, receives the result.
  9. The Raspberry Pi transmits an RF signal to turn the outlet on or off.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README file.

相關推薦

Implement voice controls for a serverless home automation hub

Summary Home automation has gone from science fiction to reality in a few short years. This code pattern shows you how easy it is to

Build a unified home automation system

Summary Learn how to create a truly smart home by building a unified interface for interacting with all the connected devices in your

[IDEA]IntelliJ IDEA匯入JDK出現The selected directory is not a valid home for JDK問題的解決方法

昨天在實驗室的桌上型電腦上配置Java。之前一直在MAC上都是使用IntelliJ IDEA玩耍,這次也不能少了它。馬上上官網下載了一個Windows版的,用學生帳號註冊完之後,就可以直接使用了!但是在匯入JDK的時候遇到了問題 ,下圖是新增JDK的介面: 點選new按鈕後出現下圖:

a completely hackable home automation toolset | Hacker News

Hello Hacker News,My co-founder and I have spent the better part of years developing a completely hackable Home Automation toolset that runs on a Raspberry

What Reviewers Look For in a Take-home Coding Assignment

? First Impression: the assignment is your business cardBefore diving in, I’d like to highlight a general guideline.To the reviewer, the task you’ve submit

IntelliJ IDEA The selected directory is not a valid home for JDK 錯誤解決辦法

最近想學java,安裝了IntelliJ IDEA,建立了一個hello world專案。 可是說需要我首先配置SDK,那就配吧 可是當我選擇了java安裝目錄時,IntelliJ IDEA卻提示錯誤 The selected directory is not a valid home for JDK

How I use home automation for work – Noteworthy

How I use home automation for workSlack channel called `# availability` where we mark when we are working. It's not about tracking how many hours you work,

the training script for 'a implement of face alignment'

Hi, 大家好,這次帶給大家的,是 'a implement of face alignment'[github傳送門]對應的訓練程式碼,各位童鞋可以自己訓練模型了。有需要的童鞋可以到對應的網站地址下載相關程式碼了。

AWS Mobile gets Amplified: A new home for modern app development

In November 2017, we launched AWS Amplify, initially an open-source JavaScript library that makes it easier to develop cloud-connected mobile and

Search for a Range

new sorted param for art careful span get with O(logN) This question turns to find the first and last element of the target in a sorted

[leetcode-34-Search for a Range]

star earch tco leet ger ive sort size div Given an array of integers sorted in ascending order, find the starting and ending position of

java.sql.SQLTimeoutException: Timeout after 30001ms of waiting for a connection.

jdbc java 連接池HikariCP連接池出錯:java.sql.SQLTimeoutException: Timeout after 30001ms of waiting for a connection.出現這個問題的原因是 有的函數在用完connection的時候,沒有及時close,導致連接池

bzoj 4842: [Neerc2016]Delight for a Cat

cst des inf rip 小朋友 clas 最大 一行 return Description ls是一個特別墮落的小朋友,對於n個連續的小時,他將要麽睡覺要麽打隔膜,一個小時內他不能既睡覺也打隔膜 ,因此一個小時內他只能選擇睡覺或者打隔膜,當然他也必須選擇睡覺

[Leetcode] search for a range 尋找範圍

earch exit 查找 run grand order pan leetcode [] Given a sorted array of integers, find the starting and ending position of a given target v

Search for a Range問題

rgba 找到 lang 分法 ria http 並且 plan bin Search for a Range問題leetcodejava二分查找 1. 問題描述 Given an array of integers sorted in ascending or

34. Search for a Range

sea int mod style boolean color pan target -1 public class Solution { public int[] searchRange(int[] nums, int target) {

WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK!的分析

waited too long for a row cache enqueue lock!的分析今天我的數據庫hang住了,查看告警日誌提示WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! pid=31AIX 5.3 是一個RAC環境,10.2.0.4由於問題一致,我

ENGINEERING: YOUR CHANCE FOR A HIGH PAYING ENTRY LEVEL JOBS?

HIGH PAYING ENTRY LEVEL JOBS High paying entry level jobs are always in demand, and we believe there’s no need to elaborate on this. Con

[LeetCode] Search for a Range

ted runt found vector class arch algorithm com pty Given an array of integers sorted in ascending order, find the starting and ending po

Suggestion in searching for a job in NZ

his search achieved n-n minutes user jea log youtube https://ivangrigoryev.com/en/silver-fern-visa-or-how-i-got-work-in-new-zealand-in-te