我的Node-RED画布中的MQTT元素将不会保持与设备的连接。如果我添加一个MQTT元素,它将在断开连接之前每隔15到18秒连接大约1秒(有时长达10秒)。例如,这里是设备日志的摘录。
Token auth succeeded: ClientID='d:pw2bfk:temperature:tempfrontdoor', ClientIP=198.11.231.56 13 Aug 2016 7:53:03 pm
Token auth succeeded: ClientID='d:pw2bfk:temperature:tempfrontdoor', ClientIP=198.11.231.56 13 Aug 2016 7:52:47 pm
Token auth succeeded: ClientID='d:pw2bfk:temperature:tempfrontdoor', ClientIP=198.11.231.56 13 Aug 2016 7:52:41 pm
Token auth succeeded: ClientID='d:pw2bfk:temperature:tempfrontdoor', ClientIP=198.11.231.56 13 Aug 2016 7:52:36 pm
Token auth succeeded: ClientID='d:pw2bfk:temperature:tempfrontdoor', ClientIP=198.11.231.56 13 Aug 2016 7:52:21 pm
Closed connection from 198.11.231.56. The client ID was reused. 13 Aug 2016 7:52:20 pm
我确信导致问题的原因很简单。我花了好几个小时都没有用。
这是Node-RED画布 - > https://motion.mybluemix.net/red/#