贾维斯智能系统
(→Tmall Genie) |
(→Reference) |
||
第255行: | 第255行: | ||
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference | * https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference | ||
+ | |||
+ | |||
* https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015050 | * https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015050 | ||
* https://developer.apple.com/homekit/ | * https://developer.apple.com/homekit/ | ||
+ | |||
+ | |||
+ | * [http://doc-bot.tmall.com/docs/doc.htm?treeId=393&articleId=107674&docType=1 AliGenie 接入流程] | ||
+ | * [http://doc-bot.tmall.com/docs/doc.htm?spm=0.0.0.0.Vl1zjo&treeId=393&articleId=107454&docType=1 AliGenie智能家居接入协议] | ||
2018年11月18日 (日) 14:29的版本
目录 |
1 Overview
1.1 Home Assistant
Windows we require at least Python 3.5 and for other operating systems at least Python 3.4.2:
$ sudo pip3 install homeassistant $ sudo hass --open-ui # sudo hass --demo-mode
1.2 Home Bridge
1.2.1 PC
$ wget https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz $ tar -xvf node-v6.9.1-linux-x64.tar.gz $ cd node-v6.9.1-linux-x64 $ sudo cp -R * /usr/local/
1.2.2 Raspberry Pi Model A, B, B+
$ wget https://nodejs.org/dist/v4.7.3/node-v4.7.3-linux-armv6l.tar.xz $ tar -xvf node-v4.7.3-linux-armv6l.tar.xz $ cd node-v4.7.3-linux-armv6l $ sudo cp -R * /usr/local/
1.2.3 Raspberry Pi 2 Model B
$ wget https://nodejs.org/dist/v4.7.3/node-v4.7.3-linux-armv7l.tar.xz $ tar -xvf node-v4.7.3-linux-armv7l.tar.xz $ cd node-v4.7.3-linux-armv7l $ sudo cp -R * /usr/local/
$ sudo apt-get install libavahi-compat-libdnssd-dev $ sudo npm install -g --unsafe-perm homebridge hap-nodejs node-gyp $ cd /usr/local/lib/node_modules/homebridge/ $ sudo npm install --unsafe-perm bignum $ cd /usr/local/lib/node_modules/hap-nodejs/node_modules/mdns $ sudo node-gyp BUILDTYPE=Release rebuild $ sudo apt-get install avahi-daemon avahi-discover libnss-mdns $ sudo npm install -g homebridge-homeassistant
1.2.4 Auto start
homebridge under /etc/default/ and homebridge.service under /etc/systemd/system/ on your Raspberry Pi.
homebridge (under /etc/default/ ):
# Defaults / Configuration options for homebridge # The following settings tells homebridge where to find the config.json file # and where to persist the data (i.e. pairing and others) HOMEBRIDGE_OPTS=-U /var/lib/homebridge # If you uncomment the following line, homebridge will log more # You can display this via systemd's journalctl: journalctl -f -u homebridge # DEBUG=*
homebridge.service (under /etc/systemd/system/ ):
[Unit] Description=Node.js HomeKit Server After=syslog.target network-online.target [Service] Type=simple User=homebridge EnvironmentFile=/etc/default/homebridge # Adapt this to your specific setup (could be /usr/bin/homebridge) # See comments below for more information ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS Restart=on-failure RestartSec=10 KillMode=process [Install] WantedBy=multi-user.target
$ sudo useradd -M --system homebridge $ sudo mkdir /var/lib/homebridge $ sudo systemctl daemon-reload $ sudo systemctl enable homebridge $ sudo systemctl start homebridge $ systemctl status homebridge
On subsequent reboots, it should start automatically, if not, use the journalctl -u homebridge to check the error cause.
2 Amazon Alexa
>> Amazon Alexa
3 Tmall Genie
>> Tmall Genie
4 软硬件基础
4.1 环境
NEST Protect 智能烟雾探测
4.2 视觉
4.3 主人
乐心体重秤网络版
EPRS
5 交互接口
5.1 问询接口
1. 我在哪儿呢
2. 嘎嘎在哪儿呢
Jarvis: 系统记录显示,嘎嘎现在在XXX
3. 嘎小多种哪儿呢
Jarvis: 系统记录显示,嘎小多2014年3月26日13:30时在宇宙的中心回龙观,此后没有新的记录
4. 今日天气
Jarvis: 主人你在深圳那吧,今日深圳天气不赖!晴空万里,温度25,湿度43%,小暖风,空气质量良好!
5. 家里怎么样
Jarvis: 家里现在温度27,湿度22%,可吸入颗粒 133,其他一切正常
5.2 本地生活信息智能提示
1. 比如在接近影院时,自动提示今日该影院上映的电影
2. 检测到主人是去商场时,能否自动搜索这家商场的打折信息
......
5.3 警告提示
在主人离家时,自动监控门窗开闭情形,如有非法入侵,及时报警
6 天气交互服务
清晨自动获取本地天气资讯,友好提醒
7 影院信息服务
自主判断主人是否去往影院
自动获取目标影院当前影讯,友好显示
8 家庭感知防控
1. 门窗开闭监控
2. 摄像头自动记录
3. 烟雾探测
4. 环境感知(温、湿度、PM2.5)
9 Reference
- http://www.makermusings.com/2015/07/19/home-automation-with-amazon-echo-apps-part-1/
- http://www.makermusings.com/2015/08/22/home-automation-with-amazon-echo-apps-part-2/
- https://gismo141.github.io/configure-your-homebridge-2/
- https://krrisztian.wordpress.com/2016/08/08/home-assistant-and-homebridge-homekit/
- https://home-assistant.io/blog/2016/02/20/community-highlights/
- https://github.com/probonopd/ESP8266HueEmulator/wiki/Hue-API
- https://rawgit.com/francescou/iot-timeseries/master/slides.html
- https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015050
- https://developer.apple.com/homekit/