KAA平台数据下发的四种方式

KAA平台系列文章:

一、网页形式

官网:http://kaaproject.github.io/kaa/docs/v0.10.0/Programming-guide/Key-platform-features/Notifications/

配置: 通知 --> 通知主题 --> 端点组,即可在“通知主题”下发通知
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
注:代码见KAA平台的数据上传
在这里插入图片描述

二、脚本形式

接口地址:
http://192.168.0.110:8080/kaaAdmin/rest/api/sendUnicastNotification

得到通知模式的schema_id:  db.notification.find()
授权:  chmod +x *.sh

其他数据在MariaDB数据库获取

1262358.sh

curl -v -S -u WDJL_SYH:kaa123  -F 'notification={"applicationId":"131072","schemaId":"163845","topicId":"98304","type":"USER"};
type=application/json'  -F 'endpointKeyHash=74xdPqVyQZ0eLmrLSj2P2Q8kPfo=;
type=text/plain'  -F file=@/usr/local/S/168369519.json
"http://192.168.0.110:8080/kaaAdmin/rest/api/sendUnicastNotification"

1262358.json

{"Message": "fn:24,seq:1502097735986,type:request,du:[{epid:31431793435902E0,controlType:1},
{epid:31431793435902E1,controlType:1}]"}

123.json

{"Message": "下发消息:12345,上山打老虎。"}

三、Postman

接口地址:
http://192.168.0.110:8080/kaaAdmin/rest/api/sendUnicastNotification
在这里插入图片描述
在这里插入图片描述

四、JAVA代码

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值