slow down device update

Moderator: leecollings

Post Reply
tiga
Posts: 159
Joined: Friday 27 May 2016 20:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: nederland
Contact:

slow down device update

Post 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.
SweetPants

Re: slow down device update

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest