SmartThings 是什么

  • 一个被称为开放物理图(Open Physical Graph)的平台
  • 一个对真实物理世界的虚拟的在线的展示(representtion)
  • 一个可以对物理世界进行编程( Programmable)的环境

设备和智能的分离

  • 便于大规模部署
  • 设备成本更低

    目前实现

    云第一(cloud first)

    • 应用(App)只能在云端运行
    • Hub 需要连接网络

组成

  • End-Device
  • Hub
  • Cloud
    • Connectivity
    • Device Management & Capability Abstraction
    • Event Processing & Routing
    • Application (SmartApps)
    • Web Services
  • User Experience

Hub支持的设备连接协议

  • zigbee
  • z-wave
  • IP-Connected Devices
  • Cloud-Connected Devices

SmartThings架构

设备类型

  • Device

    • SmartThings Device
    • ThirdParty Device
  • Hub

连接管理 (Connectivity Management)

  • Hub 连接到Cloud
  • Client Device 连接到Cloud

设备类型处理(Device-Type Execution)

  • 输入 : 设备信息
  • 输出:SmartThings event

订阅管理(Subscription Management)

  • 订阅event
  • event发生时调用相应handler处理

应用执行

  • event 触发
  • 外部调用
  • 定时任务

SmartThings 概念

容器(Container)

  • Account
  • Location
  • Group

SmartThings开发

DeviceHandler 开发

metadata

  • definition

    • capability(定义设备能力)
    • attribute(定义设备属性)
    • command(定义设备命令)
  • simulator

  • titles

    • standTile
    • valueTile
    • controlTile
    • carouselTile

消息处理

parse 处理设备上送的消息

命令实现

command

SmartApp 开发

definition

preferences

控件
+ icon
+ href
+ label
+ mode
+ paragraph
+ input

布局

  • section
  • page

pre-defined method

  • installed() - Called when a SmartApp is first installed
  • updated() - Called when the preferences of an installed smart app are updated
  • uninstalled() - Called when a SmartApp is uninstalled.
  • childUninstalled() - Called for the parent app when a child app is uninstalled

state

  • app不是一直在运行,需要有一个地方保存数据
  • app数据使用state来保存
  state.count = 0// we can store maps in statestate.myMap = [foo: "bar", baz: "fee"]// booleans are ok of coursestate.myBoolean = true// we can use array index notation if we wantstate['key'] = 'value'// we can store lists and maps, so we can make some interesting structuresstate.myListOfMaps = [[key1: "val1", bool1: true],[otherKey: ["string 1", "string 2"]]]

subscribe event

subscribe(deviceName, “eventToSubscribeTo”, handlerMethodName)

preferences {section {input "theSwitch", "capability.switch"}
}
def install() {subscribe(theSwitch, "switch.on", switchOnHandler)
}def switchOnHandler(evt) {log.debug "switch turned on!"
}

SmartThings相关推荐

  1. 智能家庭本周锋闻:式微的三星和老气的SmartThings

    紧急通知,三星未收购智能家居公司 SmartThings 虽是创业公司,但做的事情非常"老气". 这么类比一下,很多技术控坚持认为 Symbian 是智能手机操作系统,但所有人都知 ...

  2. xctf secret galaxy_三星SMARTTHINGS FIND正式发布 可帮助轻松查找GALAXY设备

    除了智能手机,可穿戴设备和家用电器,三星还以其子品牌SmartThings提供各种产品和服务.这家韩国巨头多年来一直专注于这个子品牌,试图创建一个强大的生态系统.三星已经在SmartThings的支持 ...

  3. 共享没有权限访问权限_如何与家人共享SmartThings访问权限

    共享没有权限访问权限 If you have multiple people in your household and want them all to have access to SmartTh ...

  4. 进入房间时如何使用SmartThings自动打开灯光

    If you're sick of having to find and fumble with the light switch every time you enter a dark room, ...

  5. ninja blocks、SmartThings和Twine

    原文地址:http://news.dichan.sina.com.cn/2012/11/06/593198.html 目前物联网产品的发展受到了众多行业内人士的关注.EliseAckerman,一位长 ...

  6. gohu恒温花洒使用教程_打开窗户时如何使用SmartThings自动关闭恒温器

    gohu恒温花洒使用教程 If the weather is really nice out and you decide to open up windows, it's easy to forge ...

  7. 三星使用android auto,在车上关掉家中的灯:Android Auto 宣布集成三星 SmartThings

    软餐(ruancan.com)获悉,三星和谷歌本周四共同宣布,三星的 SmartThings 服务将从下周开始集成到 Android Auto 中. 通过这一集成,Android Auto 用户将可以 ...

  8. 提高智能家居设备的兼容性

    提高智能家居设备的兼容性 Group looks to improve smart home device compatibility 亚马逊.苹果.谷歌和Zigbee联盟宣布成立一个新的工作组,负责 ...

  9. AI一分钟 | 厉害了!英特尔正式发布电动飞行汽车;贝佐斯笑了,多家PC厂商结盟亚马逊Alexa,直怼微软Cortana

    一分钟AI 1. CES 2018 专题:英特尔正式发布电动飞行汽车Volocopter:华硕发布Chromebox 3,采用英特尔8代酷睿处理器:三星宣布2018年智能电视全部搭载智能助手Bixby ...

最新文章

  1. 伪站创建代码-山东理工
  2. Node的Web应用框架Express的简介与搭建HelloWorld
  3. P2714-四元组统计【数论,容斥】
  4. 移动应用开发——实验四
  5. 我为什么用 SQLite 和 FMDB 而不用 Core Data
  6. linux php7 composer,Linux 系统 Composer 安装
  7. Hexo高级教程之代码高亮
  8. 数独游戏——数模处理(MATLAB整数规划)
  9. 米家扫地机器人怎么加水_扫地机买什么 篇十:极速开箱! 米家扫地机1S 升级了啥?...
  10. vab宏与数据据笔记一(启用宏)
  11. gdata_YouTube GData API和Android
  12. js打印倒三角形和正三角形
  13. 径向基函数网络初认识
  14. 化工厂人员定位系统--化工厂定位--新导智能
  15. 目标检测评价指标:精确度mAP
  16. SpringCloud微服务注册和消费模式总结
  17. oracle如何判断数字中有字母,SQL 判断含有字母和数字的字符串
  18. Struts2学习笔记——StrutsTags(标签)
  19. python视频网站项目_Python Flask 项目实战—构建微电影视频网站
  20. sonar最新版9.0安装攻略

热门文章

  1. 大学计算机课迟到检讨,大学生专业课迟到检讨书
  2. IT求职宝典-微软十佳金牌讲师孔文达作序推荐!
  3. 远程控制浇花系统(第一版)
  4. 在windows系统制作mac os的U盘启动盘
  5. 如何查看Windows的版本信息
  6. layuimini后台管理系统的简单使用
  7. All elements are null
  8. Mipony Pro(网盘下载工具)专业版
  9. pandas----difference()
  10. Simlink与PX4硬件在环仿真(HIL)实现