Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReGaHss: Add posibility to run set DataPoints or SysVar values with a delay #262

Closed
Hypnos3 opened this issue Feb 15, 2018 · 1 comment

Comments

2 participants
@Hypnos3
Copy link
Contributor

commented Feb 15, 2018

In scripts sometimes it will be nice to have a posibility to set a datapoint or a sysvar with a delay for e.g. radio hygiene (Funkhygiene).

e.g. a new StateDelay(value,delay) command with the Parameter of the value and a delay in milliseconds.

example:

dom.GetObject("BidCos-RF.012345678:4.SET_TEMPERATURE").StateDelay(9, 500);

A similar solution exists as a tcl script in the Homematic Forum, but it would be nice to have this function out of the box in the Homatic Script:
https://homematic-forum.de/forum/viewtopic.php?uid=12697&f=31&t=42056&start=0

@jens-maus

This comment has been minimized.

Copy link
Owner

commented Jun 3, 2019

Starting with ReGaHss R1.00.0388.0208 the State() method can take two additional (optional) parameters to delay a state call for a certain specified time period now. Thus, starting with this version one can perform the following calls:

  1. Will set the temperature immediately returning the result of the state operation accordingly:
boolean result = dom.GetObject("BidCos-RF.012345678:4.SET_TEMPERATURE").State(9);
  1. Will add a state() operation to set the temperature after 500 ms wait time returning the result of the scheduling accordingly (existing waiting state() calls for this datapoint will be cleared):
boolean result = dom.GetObject("BidCos-RF.012345678:4.SET_TEMPERATURE").State(9, 500);
  1. Will add a state() operation to set the temperature after 500 ms wait time and NOT clearing already waiting state calls, returning the result of the scheduling accordingly:
boolean result = dom.GetObject("BidCos-RF.012345678:4.SET_TEMPERATURE").State(9, 500, false);

I hope that this actually fulfills your request.

@jens-maus jens-maus closed this Jun 3, 2019

@jens-maus jens-maus moved this from In progress to Done in ReGaHss improvements/fixes Jun 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.