publish value between certain hours

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

publish value between certain hours

#1 Post by waspie » 08 Nov 2017, 20:15

This probably sounds like a silly request...
say for no good reason i want to reduce the amount of extra crap in my OH event log
would it be possible to send values of a sensor only during certain hours?
Like a Lux sensor, i don't care about its readings after 8am and before 6pm

Could a rule be written to send the data every 60 seconds between 6p and 8a?

on Clock#Time=All,**:**:60 do // 60 seconds?
If %systime% < 8:00:00
???
Endif
If %systime% > 18:00:00
????
Endif
Endon

^^ does this look right?

I don't know how to use publish with sensor data
Capture.PNG
Capture.PNG (5.12 KiB) Viewed 1702 times

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: publish value between certain hours

#2 Post by waspie » 08 Nov 2017, 21:32

i think i'm getting close but i'm not seeing it in OH events

on Kitchen_LUX#KIT_LUX do
If %systime% < 8:00:00
Publish %sysname%/Kitchen_Lux/KIT_LUX,[Kitchen_LUX#KIT_LUX]
Endif
If %systime% > 14:45:00 <<-----(just testing it)
Publish /%sysname%/Kitchen_LUX/KIT_LUX/[Kitchen_LUX#KIT_LUX]
Endif
Endon

Post Reply

Who is online

Users browsing this forum: No registered users and 85 guests