From d68be6d16e65bea8b3a504e8380b6d3c76032498 Mon Sep 17 00:00:00 2001 From: Ken Sanislo Date: Sun, 23 Dec 2018 11:42:59 -0800 Subject: [PATCH] milliseconds as the cache-buster --- tcc-exporter | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tcc-exporter b/tcc-exporter index cc9c7d6..aa95f72 100755 --- a/tcc-exporter +++ b/tcc-exporter @@ -12,7 +12,7 @@ import urllib.request from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.error import HTTPError -VERSION = '0.8.5' +VERSION = '0.8.6' PREFIX = 'https://mytotalconnectcomfort.com/' devices = list() @@ -127,8 +127,8 @@ class Client(object): return data def device_status(self, device_id): - utc_seconds = int(time.mktime(time.gmtime())) - path = 'portal/Device/CheckDataSession/%s?_=%s' % (device_id, utc_seconds) + utc_milliseconds = int(round(time.time() * 1000)) + path = 'portal/Device/CheckDataSession/%s?_=%s' % (device_id, utc_milliseconds) data = self._request_data(path) return data