Closed wvuyk closed 5 years ago
I went to the old interface of HS3 and was able to see the event was still disabled. I anebled the events I created, but still IsTriggerTrue
is never called?
Any response here?
I recommend you take a look at issue 18 if you haven't yet. A good process workflow is mapped out there.
I do not think the IsTriggerTrue
method is the method you think it is. The inline documentation states:
/// <summary>
/// Called by HomeSeer to determine if this trigger's conditions have been met.
/// </summary>
/// <remarks>
/// Always return TRUE if the trigger cannot be a condition and there is nothing to check when an event is
/// manually executed by a user.
/// </remarks>
and it does not sound like you are trying to evaluate the trigger as a condition.
I think you are either looking for the IsFullyConfigured
method - AbstractTriggerType.IsFullyConfigured if you are trying to determine if it is fully configured on save.
Or
If you are looking for something that fires the trigger, you will need to build that yourself, and, when your plugin has determined it needs to fire the trigger, it should call HomeSeerSystem.TriggerFire()
to execute the event. There is an example of this in the sample plugin at HSPI.cs Line 270 or HSPI.vb Line 245
Jon-Luke,
You are right. Confused the TriggerFire and IsTriggerTrue.... I have corrected it here and it works fine now...
Am closing this issue
Thanks,
Wim
I am trying to implement the triggers I defined in the HS3 version, but I think I either miss some info on how to do this, or it is not working in the current alpha (4.0.0.27). I have defined a triggertype "Any_On_Trigger" and added it to the TriggerTypes collection for the plugin.
I have created a simple view with a select list, and I can use it in an event. It is being set and saved. Next thing I would expect is that the
IsTriggerTrue
method would be called from homeseer. But up till now it is not called even once? I have tried to check if the event is disabled, but in the current interface of events there seems to be no way of checking if the event is enabled or disabled....How can I check if an event is disabled or enabled, and more important, why is the
IsTriggerTrue
method not called?Wim