added unix time to /iotcc/device topic. devices ca nuse this when using rtctime
[iot-control-center.git] / assets / js / iotcc.js
blob:a/assets/js/iotcc.js -> blob:b/assets/js/iotcc.js
--- a/assets/js/iotcc.js
+++ b/assets/js/iotcc.js
@@ -397,7 +397,7 @@
         }
     },
     refreshDevices: function() {
-        this.mqttClient.publish('/iotcc/device', '{"clientId": "' + this.mqttConfig.clientId + '"}', {qos: 1, retained: false});
+        this.mqttClient.publish('/iotcc/device', '{"clientId": "' + this.mqttConfig.clientId + '", "time": "' + (new Date().getTime() / 1000) + '"}', {qos: 1, retained: false});
     },
     addEvent: function(on, callback) {
         if (!$.isFunction(callback)) return;

comments