jdplus

command module
v0.0.0-...-f20c846 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2014 License: Apache-2.0 Imports: 15 Imported by: 0

README

jdplus

京东智能云-智能硬件服务平台测试

本软件暂时只支持云家居产品,云健康产品暂不支持

本软件用于测试JD+平台的RESTFUL API,供软硬件开发提供帮助

开发文档详见: http://devsmart.jd.com/dev/api/home/index

可能JD会修改API接口协议,发现问题请提Issues

HOWTO

本软件使用golang开发,如需要使用go命令,请先搭建go运行环境

WINDOWS: 请使用Cygwin 运行,获得更好体验

LINUX: 请直接搭建go运行环境,使用go run ...命令启动

在运行此命令前,你可能需要先安装如下第三方软件包

 $ go get github.com/Unknwon/com
 $ go get github.com/Unknwon/goconfig
 $ go get github.com/bitly/go-simplejson 
 $ go get github.com/tobyzxj/beego/httplib	 
  1. 先成为开发者,并在开发者页面创建并发布一个产品,本软件需要在产品定义时定义以下两个参数:

    参数名称 参数Id 是否可控 参数值类型
    温度 temperature float
    开关 switch string
    显示数据 传输数据
    1
    0
  2. 再运行 go run devsmart.go(or devsmart.exe),模拟一个硬件设备

    此时设备可以进行如下功能测试:

    • 发送心跳,维持设备和EventServer的SSL连接
    • 数据上传,可以模拟温度采集
    • 模拟一个开关,可以接受APP的远程控制
  3. 再运行一个模拟APP的应用程序 go run app-cli.go(or app-cli.exe)

    此软件可以进行如下命令行操作

    需要输入回车才能执行命令

    • 查询设备在线或是离线
    • 查询当前的温度值
    • 远程控制设备开
    • 远程控制设备关
    功能列表命令简化命令
    命令查询listl
    设备激活activea
    查询设备在线或是离线statuss
    查询当前的温度值temperaturet
    远程控制设备开switchonson
    远程控制设备关switchoffsoff
    退出应用quitq

LICENSE

jdplus is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html).

Documentation

Overview

app demo for JD+ test

smart device demo for JD+ test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL