Page 1 of 1

slow down device update

Posted: Wednesday 22 June 2016 22:53
by tiga
i have a little problem.

i have an inside temp sensor but this one hase a humidity sensor as well.
i wanted a "switch"with only the temperature.so i created a virtual one.im not good with lua so i coppied a script to do that.
this is normally used to split weather underground, that is updated every 10 minutes.

Code: Select all

local sensorwu = 'temperatuur woonkamer' --name of the sensor that gets created when you add the WU device (and that contains multiple values like temperature, humidity, barometer etc)
local idxt = 114 --idx of the virtual temperature sensor you need to change this to your own Device IDx
 
commandArray = {}
 
if devicechanged[sensorwu] then
        sWeatherTemp, sWeatherHumidity = otherdevices_svalues[sensorwu]:match("([^;]+);([^;]+);([^;]+)")
        sWeatherTemp = tonumber(sWeatherTemp)
         
        commandArray[1] = {['UpdateDevice'] = idxt .. '|0|' .. sWeatherTemp}
        end
 
return commandArray
now the problem is my temp sensor updates every 30 seconds....can i let this update (slow down) to once every 5 minutes??
that is more then enough for my use.

Re: slow down device update

Posted: Thursday 23 June 2016 8:17
by SweetPants
No matter what you do, the script is fired every 30 sec anyway. The only way to slow it down is by the sensor itself

Verstuurd vanaf mijn HTC Desire 610 met Tapatalk