Make your home
smarter with
Alexa
Alexa meetup #01,
hosted by Haarlem.tech
@sparkgene
市川 純 (Jun Ichikawa)
infrastructure engineer
https://jawsug-iot.connpass.com/
Make your home
smarter with
Alexa
Smart home devices in amazon.com
smart home devices in amazon.co.jp
Many category in amazon.com
What is Smart Home Skill?
Smart Home Skill
▸No Invocation Name
▸Built-in Voice User Interface
▸Rich, multi-device experiences
https://developer.amazon.com/alexa/smart-home
Alexa, turn on the living room lights
OK
Smart Home device with device cloud
Alexa, turn on living
room lights
Device Cloud
Smart Home Skill
Echo Plus + ZigBee
- supported device types: In-wall switches, Plugs and outlets,
Lights, Locks
- Currently, EchoPlus supports ZigBee Home Automation 1.2
(HA1.2)
https://developer.amazon.com/docs/smarthome/echo-plus-zigbee-support.html
Alexa, turn on living lights
Supported Operations
▸Turn lights on and off
▸Set light level and power percentages
▸Change the color of color-capable bulbs
▸Change the color temperature of tunable white lights
▸Lock a device
(US, UK, Germany, Japan)
▸Control entertainment/AV devices
(US, UK, Canada, Australia)
▸Control cloud-enabled cameras
(US, UK, Germany)
▸Control air conditioner/fans
(US, UK, Germany , Canada, Australia)
▸Control microwave
(US)
https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html#what-
kind-of-devices-are-supported
Steps to use
Smart Home Skill
Account linking
Alexa App
Amazon
Alexa
device cloud
enable skill
Login URL
Login
redirect URL
State, Code
request token
token
Linking OK
Device discovery
Customer Amazon Alexa
Smart Home
Skill
Alexa, Discover devices
discovery request
discovery response
one device found
Control device
Customer Amazon Alexa
Smart Home
Skill
Alexa, turn on living lights
TurnOn request
request response
OK
Device Cloud
call turn on api
return status
the device is on
ReportState request
call device status
Can I make my home
smarter?
Categories in japan
Use IR device
through Alexa
Smart Home Controller for Alexa(in Japan)
eRemote
Nature Remo Glamo iRemocon
Programmable Remote Controller
LIRC(Linux Infrared Remote Control)
https://www.hackster.io/sparkgene/alexa-makes-home-smarter-7e1981
LIRC is a great library
http://www.lirc.org/
Programmable Remote Controller Skill
Alexa, turn on living
room lights
AWS Lambda
(Smart Home SKill)AWS IoT
IoT shadow
https://youtu.be/nT20o2uv2h0
demo video
Control TV
Some TV do not use IR
2.4GHz radio
https://www.sony.jp/bravia/products/KDL-46HX920/feature_7.html
HDMI CEC
Consumer Electronics Control (CEC) is a feature of HDMI
designed to allow users to command and control devices
connected through HDMI by using only one remote control.
Power On Through HDIM!
“
“”https://en.wikipedia.org/wiki/Consumer_Electronics_Control
TV Power control
IoT
shadow
Alexa, TurnOn TV
AWS Lambda
https://qiita.com/sparkgene/items/de4c4b6185363f15ab69
AWS IoT
https://youtu.be/SWgoA-lQKj8
demo video
Security Camera
Cameras that work with Alexa
No Cameras in Japan!!
Echo with display
Technical and security requirements for cameras
https://developer.amazon.com/ja/docs/smarthome/build-smart-home-camera-skills.html
Echo with display support Video apps
https://developer.amazon.com/ja/docs/custom-skills/videoapp-interface-reference.html
AWS Lambda
Alexa, open pi camera
https://qiita.com/sparkgene/items/4447e97ed4850cff761c
Raspberry Pi Camera Skill
https://youtu.be/nquF0SOXNdQ
demo video
Summary
▸Smart Home Device is not available in all country
▸If the device is not supported, just develop it
▸AWS IoT and device shadow great for smart home skill
Thank You

Make your home smarter with Alexa

Editor's Notes

  • #3 Hi my name is jun ichikawa. My job is a infrastructure engineer. Almost using AWS. At the private time I am a core member of Japan Aws Users Group IoT Special branch. I am glad to talk at this first meet up in Netherlands.
  • #4 Today I want to talk about how to make your home smarter with amazon alexa.
  • #5 There are a lot of devices in amazon.com. You can make your home smarter with buying these devices.
  • #6 But the amazon store in japan, there are only few category and few devices.
  • #7 amazon.com has Thermostats, Cameras, TV & Video Control. There are many category and devices. These devises can use with smart home skill. When alexa come to Netherlands I think it will be a same situation in early stage.
  • #8 So what is smart home skill?
  • #9 No Invocation Name. This means Customer do not need to remember any invocation name to use the device. Built-in Voice User Interface You don’t have to design a voice user interface. They can use the device like just saying “Alexa, turn on the living room lights.” Rich, multi-device experiences You can simplify customer use of your devices with Alexa Routines and Groups. 
  • #10 If your company selling a smart home device like philips hue, you can easily add voice interface to your devices. Create a smart home skill and bring voice control to your device.
  • #11 Amazon Echo Plus has a built-in smart home hub. So it can connect and control ZigBee smart devices without separate hub or a smart home skill. For now it support few device types.
  • #12 Smart home skill support many operations. you can turn on lights or tv. change the bulb color. check security cameras. Controlling microwave is only available in United States. You can cook like "Alexa, cook a frozen pizza in the microwave". This starts the preset pizza mode which microwave have.
  • #14 Smart Home Skill control the device thru the device cloud. So you need to link customers alexa account with your device cloud account. the Device cloud need to support OAuth 2.0.
  • #15 next step is Device discovery. this is used to find out customer connected devices. Smart home skill return the device name and what operation is supported.
  • #16 When the customer say turn on to alexa Amazon Alexa send the turn on request to smart home skill. The smart home skill call a api and receive the response. but some device need a long time to finish the request. for example, if the door lock request is called, the device cloud control the door lock and it verify the lock is complete with some sensor. Alexa skill need to response in 8 seconds. In this situation it will timeout. so smart home skill return before the lock is complete. but after that, report state request arrive from amazon alexa and check the status.
  • #17 that’s all a summary of smart home skill. next question is can I make my home smarter?
  • #18 I want to make a smart home. but there are not enough devices in japan. So I try to create it.
  • #19 first use Infrared Remote Control device through alexa
  • #20 There are some smart home controller in amazon japan. but these controller can not control all device which I have.
  • #21 So I made a programmable remote controller with raspberry pi.
  • #22 LIRC is a great library to create a programmable remote controller. You only need raspberry pi , IR Led, and IR receiver.
  • #23 This Smart Home Skill use AWS IoT to communicate raspberry pi. When the Lambda function update AWS IoT device shadow. IoT client recive the shadow update. and it invoke the lirc command.
  • #26 My sony bravia TV is great. This use 2.4GHz radio for remote control. so I don't need to point the remote controller to the tv. This means I can not control from the programable remote controler.
  • #27 But Google Home can wake up TV with chrome cast. And I found HDMI CEC. Consumer Electronics Control is a feature of HDMI This allow users to control devices connected through HDMI
  • #28 raspberry pi and TV is connected with hdmi cable. and hdmi can use from raspberry pi with cec-client library. other part is similar with programable remote controler.
  • #31 There are no camera category in Amazon japan
  • #32 Echo with display can play video. and I have an echo show. so I wanted to use a camera. And smart home skill can create camera skills
  • #33 Smart home skill need RTSP for streaming protocol. what is RTSP? It looks pretty difficult to use with raspberry pi for me.
  • #34 Echo with display support video app. Video app support HLS. It looks easier to use on raspberry pi for me.
  • #35 This is a custom skill. when the costumer say “Alexa, open pi camera”, custom skill return a video app response and tell the url to stream video. echo device use the url to play video.
  • #37 OK the summary is