Esempio n. 1
0
 def keep_alive_call(event_time):
     """Call the Wink API endpoints to keep PubNub working."""
     _LOGGER.info("Polling the Wink API to keep PubNub updates flowing")
     pywink.set_user_agent(str(int(time.time())))
     _temp_response = pywink.get_user()
     _LOGGER.debug(str(json.dumps(_temp_response)))
     time.sleep(1)
     pywink.set_user_agent(USER_AGENT)
     _temp_response = pywink.wink_api_fetch()
     _LOGGER.debug("%s", _temp_response)
     _temp_response = pywink.post_session()
     _LOGGER.debug("%s", _temp_response)
Esempio n. 2
0
 def keep_alive_call(event_time):
     """Call the Wink API endpoints to keep PubNub working."""
     _LOGGER.info("Polling the Wink API to keep PubNub updates flowing")
     pywink.set_user_agent(str(int(time.time())))
     _temp_response = pywink.get_user()
     _LOGGER.debug(str(json.dumps(_temp_response)))
     time.sleep(1)
     pywink.set_user_agent(USER_AGENT)
     _temp_response = pywink.wink_api_fetch()
     _LOGGER.debug("%s", _temp_response)
     _temp_response = pywink.post_session()
     _LOGGER.debug("%s", _temp_response)