howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware
MIT License
81 stars 46 forks source link

Temperature update interval TH16 #106

Open minws13 opened 4 years ago

minws13 commented 4 years ago

Hello,

is there a way to define in the config file the time interval at which the TH16 checks for and reports temperature? Thanks

bwp91 commented 4 years ago

From my (still limited) knowledge of this plugin, I can give my thoughts --

I don't think this plugin performs regular polling checks to update devices, rather, external updates are sent to the plugin through a websocket in real time. But i could be wrong :)

howanghk commented 4 years ago

Hi @minws13, The plugin only check temperature when you use the Home app. It does not check in background periodically. Instead, the ewelink server would push updates to the plugin via a websocket connection. The ewelink server control when to push such updates.

minws13 commented 4 years ago

@howanghk @thepotterfamily thanks. I monitored a bit to see if there is any specific interval that ewelink checks in the background, and there is not. I noticed however that if there is a sudden change in temperature it is reported, therefore it somehow reports the temperature if there is a big change rather than every a specified time (it could be six hours). If someone takes a look at the log, it seems that regardless the time, the temperature is reported if it reaches a difference of max 0.7 celcius.

So my question would be if instead of opening the home app every 5 minutes to get more frequent readings, could it be done by "simulating" the opening of home.app through homebridge or the ewelink plugin?

[6/16/2020, 1:55:33 AM] [eWeLink] setting temperature: 24.9 [6/16/2020, 1:55:33 AM] [eWeLink] setting temperature: 24.9 [6/16/2020, 1:57:23 AM] [eWeLink] setting temperature: 25.5 [6/16/2020, 1:57:23 AM] [eWeLink] setting temperature: 25.5 [6/16/2020, 2:00:54 AM] [eWeLink] setting temperature: 26.1 [6/16/2020, 2:00:54 AM] [eWeLink] setting temperature: 26.1 [6/16/2020, 2:07:54 AM] [eWeLink] setting temperature: 26.6 [6/16/2020, 2:07:54 AM] [eWeLink] setting temperature: 26.6 [6/16/2020, 2:29:36 AM] [eWeLink] setting temperature: 27.2 [6/16/2020, 2:29:36 AM] [eWeLink] setting temperature: 27.2 [6/16/2020, 3:58:02 AM] [eWeLink] setting temperature: 27.8 [6/16/2020, 3:58:02 AM] [eWeLink] setting temperature: 27.8 [6/16/2020, 9:33:16 AM] [eWeLink] setting temperature: 27.2 [6/16/2020, 9:33:16 AM] [eWeLink] setting temperature: 27.2 [6/16/2020, 9:33:46 AM] [eWeLink] setting temperature: 26.5 [6/16/2020, 9:33:47 AM] [eWeLink] setting temperature: 26.5