远程遥控电视

huang.b 850c4f642b 远程遥控电视应用项目 10 months ago
app 850c4f642b 远程遥控电视应用项目 10 months ago
configinfo 850c4f642b 远程遥控电视应用项目 10 months ago
core 850c4f642b 远程遥控电视应用项目 10 months ago
gradle 850c4f642b 远程遥控电视应用项目 10 months ago
.gitignore 850c4f642b 远程遥控电视应用项目 10 months ago
838P.keystore 850c4f642b 远程遥控电视应用项目 10 months ago
README.md 850c4f642b 远程遥控电视应用项目 10 months ago
VERSION.md 850c4f642b 远程遥控电视应用项目 10 months ago
build.gradle 850c4f642b 远程遥控电视应用项目 10 months ago
gradle.properties 850c4f642b 远程遥控电视应用项目 10 months ago
gradlew 850c4f642b 远程遥控电视应用项目 10 months ago
gradlew.bat 850c4f642b 远程遥控电视应用项目 10 months ago
settings.gradle 850c4f642b 远程遥控电视应用项目 10 months ago

README.md

###接口文档地址 [https://book.tclyun.cn/thotel/dev/yuan-cheng-yao-kong-dian-shi-gong-neng-mqtt-zhi-ling.html]

测试工具

[https://www.xiaozhu.link/backstage/tcl/index.html]

版本释放

  1. 正式版第一版1.0.5
  2. 1.0.6版:改进调用第三应用有home属性,导致获取不到主Activity的问题。
  3. 1.0.7版: a. connectOptions.setCleanSession(true); //false 改为 true 即qos = 0 b. 增加重试机制,处理 "Throwable:无效客户机标识 (2)" 的bug

  4. 1.0.8版:

  5. 1.0.9版: 修改mqtt配置数据,优化重联机制

  6. 1.1.0版: 修改poha mqtt版本为1.2.5 a.通过主动的杀死的方式,取消mqtt缓冲。过时数据会无法收到 b. 断网后重新连接时间有时候会在70s左右

  7. 1.1.5版 :延时启动mqtt ,delayTime = 100s

  8. 1.1.6版: 修改延时 delayTime = 5s

  9. 1.1.7版:a. 修改循环提交Subtopic 延时30s ;b, 启动mqtt的时间节点以联通外网为准,以前是检测网络是否连接为准

问题

  1. 一定概率出现:无效客户机标识
  2. 断网后,可能会无法收到mqtt消息
  3. 有一定概率会被杀死

备注

TV重启后,监听P0广播启动应用,有一定的概率读取不到 HotelInfoHelper 中的数据

mqtt测试

测试分店:0100001 mosquitto_pub -h 192.168.5.202 -p 1883 -u tcl -P tcl801 -t tv/control/Y020002/11/ac5d5c196125 -m "test" mosquitto_pub -h 192.168.5.202 -p 1883 -u tcl -P tcl801 -t tv/update/0100001/117/0200003a1b01 -m "{\"op\": \"update_img_message\", \"message_id\": 12}" //tv/update/0100001/116/0200003a1b01 mosquitto_sub -h 192.168.5.202 -p 1883 -u tcl -P tcl801 -t tv/control/Y020002/11/ac5d5c196125

正式店 十堰 mosquitto_sub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980003/807/# mosquitto_sub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980003/701/d814df519809 d814df5c595d d814df519809

武昌

mosquitto_sub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980006//1990/345180ad4dca D814DF6199F9 d814df617257 d814df617b81

测试: mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control///0200003a1b01 -m "test" -d mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/Y140003/123458/d814df9dc559 -m "test" -d mosquitto_pub -h 192.168.5.202 -p 1883 -u tcl -P tcl801 -t tv/control/Y140003/123458/d814df9dc559 -m "test" -d

mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980006/1990/0200003a1b01 -m "test" -d mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980005/1993/0200003a1b01 -m "test" -d mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980005/1993/0200003a1b01 -m "{\"data\":\"2RlIjoicG9Tk=3ZXJzdGF0ZSIsInZhbHVlIjowfToxNjQyMzg1ODU5LjeyJjbIxO\"}" -d mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980005/99999/34518061abc5 -m "{\"data\":\"2RlIjoicG9Tk=3ZXJzdGF0ZSIsInZhbHVlIjowfToxNjQyMzg1ODU5LjeyJjbIxO\"}" -d 佛山 mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980009/2021/2CE03213EF6D -m "{\"data\":\"2RlIjoicG9Tk=3ZXJzdGF0ZSIsInZhbHVlIjowfToxNjQyMzg1ODU5LjeyJjbIxO\"}" -d 2ce03213ef6d mosquitto_pub -h mqtt.tclyun.cn -p 1883 -u tcl -P tcl801 -t tv/control/0980003/807/ -m "test" -d

am startservice com.tcl.ah.tvcontrol/.service.MyMqttService

###数据 10-13 5-8 {"data":"2RlIjoicG9Tk=3ZXJzdGF0ZSIsInZhbHVlIjowfToxNjQyMzg1ODU5LjeyJjbIxO"}

####启动服务 Android 6.0 以下 am startservice com.tcl.ah.tvcontrol/.service.MqttService

0200003a1b01_1631170580763

报错信息

1=无效协议版本 2=无效客户机标识 3=代理程序不可用 4=错误的用户名或密码 5=无权连接 6=意外错误 32000=等待来自服务器的响应时超时 32100=已连接客户机 32101=已断开客户机连接 32102=客户机正在断开连接 32103=无法连接至服务器 32104=客户机未连接 32105=指定的 SocketFactory 类型与代理程序 URI 不匹配 32106=SSL 配置错误 32107=不允许通过回调方法断开连接 32108=不可识别的包 32109=已断开连接 32110=已在进行连接 32111=客户机已关闭 32200=持久性已在使用中 32201=令牌已在使用中 32202=正在进行过多的发布