Specific sensor timeout
Moderators: leecollings, remb0
-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Specific sensor timeout
Because i have some scripts running a virtual sensor once every 12 hours (bluetooth & Battery related) and the general (settings/others) setting for sensor timeout is 60 minutes. I have quite some sensors standard (after 60 minutes of course) displaying a red color. Is there any way, I can manipulate the timeout per individual sensor?
-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Specific sensor timeout
No one has the same need for this? Interesting!
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Specific sensor timeout
The need is surely there, but I guess the topic got dismissed as you asked for specific advice on overcoming the issue and I don't think there currently is any (using the built-in timeout at least). What I've done is that I've set the timeout to 10 days and if I need to get notified of some sensor sooner than that, I'll just setup a script that will send a notification after the specified idle time. If this kind of approach is something you'd be interested in, search the forum for "lua timedifference function" or check the wikikrizzz wrote:No one has the same need for this? Interesting!

-
- Posts: 200
- Joined: Wednesday 20 November 2013 20:36
- Target OS: Linux
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Specific sensor timeout
Yeah, good advice. Thanks, problem is when you have a lot of sensor again it is a lot of scripting. But thanks for confirming that there are more people with this need!Nautilus wrote:The need is surely there, but I guess the topic got dismissed as you asked for specific advice on overcoming the issue and I don't think there currently is any (using the built-in timeout at least). What I've done is that I've set the timeout to 10 days and if I need to get notified of some sensor sooner than that, I'll just setup a script that will send a notification after the specified idle time. If this kind of approach is something you'd be interested in, search the forum for "lua timedifference function" or check the wikikrizzz wrote:No one has the same need for this? Interesting!
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Specific sensor timeout
True. One possibility would be to adapt e.g. this script https://www.domoticz.com/wiki/Battery_l ... LUA_script (I'm using a bit modified version of that one to get a notification once a day if any battery operated device is below given threshold and then a weekly summary of all used battery devices) so that it would loop through all sensors (just need to be able to define them based on some of the available parameters) and then report as needed based on "LastUpdate". But definitely it would be nice to see custom timeouts (with a notification optionkrizzz wrote:Thanks, problem is when you have a lot of sensor again it is a lot of scripting.


-
- Posts: 24
- Joined: Sunday 05 February 2017 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Shropshire UK
- Contact:
Re: Specific sensor timeout
Late to the party but I'd like to be able to specify different timeout for some sensors too (as the OP says, virtual one in particular .. I can't even see a way to use a script fake out the lastupdate value for them,. unless I read and rewrite their actual values in LUA script).
- bewo
- Posts: 74
- Joined: Monday 13 July 2015 12:27
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Bavaria - Germany
- Contact:
Re: Specific sensor timeout
And where's the problem?GSV3Miac wrote: ↑Tuesday 09 October 2018 14:41 Late to the party but I'd like to be able to specify different timeout for some sensors too (as the OP says, virtual one in particular .. I can't even see a way to use a script fake out the lastupdate value for them,. unless I read and rewrite their actual values in LUA script).
I hate to see a red bar in my devices... So for a Dummy-Setpoint-Device I use a Lua-Script for years now without problems....

What is the value from the sensor? A number? Then i think it's easy to use my simple script.

Code: Select all
-- Script for "Holding active" an dummy Setpoint-Device
-- Stand: 29.10.2018
-- Set your thermostat here:
local thermostat = 'Thermostat Heizautomatik'
commandArray = {}
-- Calculating time:
function timedifference(timestamp)
y, m, d, H, M, S = timestamp:match("(%d+)-(%d+)-(%d+) (%d+):(%d+):(%d+)")
difference = os.difftime(os.time(), os.time{year=y, month=m, day=d, hour=H, min=M, sec=S})
return difference
end
local function updatenum(dev, value1)
local cmd = string.format("%d|0|%d", otherdevices_idx[dev], value1)
table.insert (commandArray, { ['UpdateDevice'] = cmd } )
end
-- Let's go:
for deviceName,deviceValue in pairs(otherdevices) do
if (deviceName== thermostat ) then
if tonumber(deviceValue) > 0 then
if timedifference(otherdevices_lastupdate[thermostat]) > 3500
then
print ("Das Thermostat wurde mit der identischen Temperatur aktualisiert.")
updatenum(thermostat, tonumber(otherdevices[thermostat]) + 0)
end
end
end
end
return commandArray
Individual projects:
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
Domoticz on a Intel Xeon Server | AeonLabs Z-Wave Gen.5 | RFXCOM RFXtrx433E USB | ESP-Wifi-Modules | Shellys
Wall-mounted 22" Touch Control Display (self construct) | LUA wind monitor| LUA heating control | and many many more :)
-
- Posts: 24
- Joined: Sunday 05 February 2017 12:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Shropshire UK
- Contact:
Re: Specific sensor timeout
The problem is that that is just causing LUA extra work to read/write an unchanged sensor value, to get around the problem of fixed timeout. Yes, it works, but No, it isn't what I'd call 'elegant'.
-
- Posts: 30
- Joined: Saturday 27 October 2018 19:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Specific sensor timeout
+1
It would be nice, it will be in GUI. It looks like basic setting for a sensor and it should be sensor specific.
It would be nice, it will be in GUI. It looks like basic setting for a sensor and it should be sensor specific.
-
- Posts: 5
- Joined: Tuesday 27 February 2018 13:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Specific sensor timeout
Disregard.
It seems that text sensors do not timeout.
It seems that text sensors do not timeout.
Who is online
Users browsing this forum: No registered users and 1 guest