贾维斯智能系统

来自Jack's Lab
(版本间的差异)
跳转到: 导航, 搜索
(Home Bridge)
(Reference)
(未显示1个用户的25个中间版本)
第17行: 第17行:
  
 
<source lang=bash>
 
<source lang=bash>
$ wget https://nodejs.org/dist/v4.7.3/node-v4.7.3-linux-x64.tar.gz
+
$ wget https://nodejs.org/dist/v6.9.1/node-v6.9.1-linux-x64.tar.gz
$ tar -xvf node-v4.7.3-linux-x64.tar.gz  
+
$ tar -xvf node-v6.9.1-linux-x64.tar.gz  
 
$ cd node-v6.9.1-linux-x64
 
$ cd node-v6.9.1-linux-x64
 
$ sudo cp -R * /usr/local/
 
$ sudo cp -R * /usr/local/
第59行: 第59行:
 
$ sudo npm install -g homebridge-homeassistant
 
$ sudo npm install -g homebridge-homeassistant
 
</source>
 
</source>
 +
 +
<br>
 +
 +
==== Auto start ====
 +
 +
homebridge under /etc/default/ and homebridge.service under /etc/systemd/system/ on your Raspberry Pi.
 +
 +
'''homebridge (under /etc/default/ ):'''
 +
 +
<source lang=bash>
 +
# 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=*
 +
</source>
 +
 +
 +
'''homebridge.service (under /etc/systemd/system/ ):'''
 +
 +
<source lang=bash>
 +
[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
 +
</source>
 +
 +
 +
<source lang=bash>
 +
$ 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
 +
</source>
 +
 +
On subsequent reboots, it should start automatically, if not, use the journalctl -u homebridge to check the error cause.
  
 
<br><br>
 
<br><br>
 +
 +
== Amazon Alexa ==
 +
 +
>> [[Amazon Alexa]]
 +
 +
<br>
 +
 +
== Tmall Genie ==
 +
 +
>>  [[Tmall Genie]]
 +
 +
<br>
  
 
== 软硬件基础 ==
 
== 软硬件基础 ==
第75行: 第142行:
  
 
[[无线风光雨感应系统分析]]
 
[[无线风光雨感应系统分析]]
 
CAMGO - 人人可用的微信智能安防系统
 
 
墨迹空气果
 
  
 
NEST Protect 智能烟雾探测
 
NEST Protect 智能烟雾探测
 +
 +
[[upnp]]
  
 
<br><br>
 
<br><br>
第160行: 第225行:
  
 
自动获取目标影院当前影讯,友好显示
 
自动获取目标影院当前影讯,友好显示
 
<br><br>
 
 
== 主人行踪感知 ==
 
  
 
<br><br>
 
<br><br>
第183行: 第244行:
 
* http://www.makermusings.com/2015/07/19/home-automation-with-amazon-echo-apps-part-1/
 
* 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/
 
* 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/
  
<br><br>
+
 
<br><br>
+
* https://github.com/probonopd/ESP8266HueEmulator/wiki/Hue-API
<br><br>
+
* https://rawgit.com/francescou/iot-timeseries/master/slides.html
<br><br>
+
 
<br><br>
+
 
<br><br>
+
* https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference
<br><br>
+
 
<br><br>
+
 
<br><br>
+
* https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015050
<br><br>
+
* 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智能家居接入协议]
 +
 
 +
 
 +
* https://www.html5rocks.com/zh/mobile/touch/
 +
 
 +
<br><br><br><br><br><br>

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 环境

红外遥控分析

天使之翼遥控晾衣架分析

DOOYA 遥控窗帘分析

无线遥控开窗器分析

无线风光雨感应系统分析

NEST Protect 智能烟雾探测

upnp



4.2 视觉

Wowwee Rovio 家用WiFi视频机器人

Hacking the Wowwee Rovio

Wowwee Rovio 核心库 libNS 逆向工程

xiaoyi

图像识别库



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












个人工具
名字空间

变换
操作
导航
工具箱