30.05.2024, 11:55
I would do it in two scripts. One event with os.sleep to turn on and after delay turn off the valve. The delay time can be parameter as object to modify. Make sure to set event script to run first instance only.
Resident script which will check if valve is off and then by use grp.find() and updatetime field to check when the last telegram was sent to this specific object. Then use os.time() to calculate the delta. If delta is bigger then 20 min then you send On to object attached to your event script Again the delta can be as object to be modified by the user.
Resident script which will check if valve is off and then by use grp.find() and updatetime field to check when the last telegram was sent to this specific object. Then use os.time() to calculate the delta. If delta is bigger then 20 min then you send On to object attached to your event script Again the delta can be as object to be modified by the user.
------------------------------
Ctrl+F5
Ctrl+F5