Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Easy Trigger plug-in - Feature Requests

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • spud
    replied
    Originally posted by spud View Post
    The plug-in has a
    Code:
    GetSchedule(string scheduleName)
    scripting function, so you could build a script to parse the schedule and find the next scheduled range.

    or to make things easier for you, I could add the following scripting functions:

    Code:
    GetScheduleNextTimeRangeStart(string scheduleName)
    GetScheduleNextTimeRangeEnd(string scheduleName)
    what do you think?
    these functions have been added in version 3.0.0.31

    here is a C# example script, in this example the schedule name is "Test"

    Code:
    public object Main(object[] Parms)
    {
    	string nextStart = (string) hs.PluginFunction("EasyTrigger", "", "GetScheduleNextTimeRangeStart", new object[] { "Test" });
    	string nextEnd = (string) hs.PluginFunction("EasyTrigger", "", "GetScheduleNextTimeRangeEnd", new object[] { "Test" });
    	
    	
    	hs.WriteLog("EasyTrigger Script", "Next Start = " + nextStart);
    	hs.WriteLog("EasyTrigger Script", "Next End = " + nextEnd);
    	return 0;
    }

    Leave a comment:


  • spud
    replied
    Originally posted by AutomatedJim View Post
    I like the toggle feature but not being able to have it 'start over' if someone manually changes the light had me confused.

    Can an action be added to reset the toggle to the beginning if someone manually operates the switch?

    IE: I set up a light to start at on, then dim to 75%, 50%, 25%, off. It has toggled through to 25%, someone walks up to the switch and manually turns the light on to 100%. The reset action would start the toggle process over. Another scenario, the light has toggled down to 25%, someone raised the dim level to 80%. The toggle process doesn't reset completely, only to the next value, IE in my example 75%.

    Thanks,

    Jim
    in version 3.0.0.31 available here, there is now an advanced option (you have to be in "Advanced editing mode" to see it) that solves this problem:

    Click image for larger version

Name:	toggleadvancedoption.png
Views:	1
Size:	14.4 KB
ID:	1188631

    Leave a comment:


  • sparkman
    replied
    Originally posted by Furious View Post
    With zwave, if a device is polled and is offline/hung/not reachable, the gui status and the status icon go to "unknown" - the device value and the device string stay the same as they were before being marked as unknown.

    With CAPI you can query a device for this status string - I currently use a script to poll all devices and get their string and then set the actual device string to "Zwave broken" and trigger off that, just wondered if it could be something to be added as an extra trigger.

    Basically allows polling devices without having to worry about accidental powering down - too many polls of offline devices can cause zwave to hang in my experience.
    I've wanted to do something similar, but we should probably ask HS to expose the functionality by changing either the status to some value (-99 as one option), or actually changing the the String to "Unknown". It seems like they are bypassing their own API with the way they do it right now.

    Cheers
    Al

    Leave a comment:


  • Furious
    replied
    Originally posted by spud View Post
    What do you call "CAPI status" ?
    A device can have a value and a string status, both can be used with the EasyTrigger plugin
    Your Unknown status is probably associated to a value
    With zwave, if a device is polled and is offline/hung/not reachable, the gui status and the status icon go to "unknown" - the device value and the device string stay the same as they were before being marked as unknown.

    With CAPI you can query a device for this status string - I currently use a script to poll all devices and get their string and then set the actual device string to "Zwave broken" and trigger off that, just wondered if it could be something to be added as an extra trigger.

    Basically allows polling devices without having to worry about accidental powering down - too many polls of offline devices can cause zwave to hang in my experience.

    Leave a comment:


  • spud
    replied
    Originally posted by Furious View Post
    Hi Spud,
    is there any way we can do things with CAPI status in the PI?
    I'm trying to bulletproof things for my system, and I do get the odd device where it can go into an unknown status - I'd like to be able to trigger something on that, however this isn't native within HS.
    It is exposed with CAPI however, so wondering if this could be potentially done - just to test if a device is set to Unknown, as the values are pretty much covered by the other device properties.
    Cheers
    What do you call "CAPI status" ?
    A device can have a value and a string status, both can be used with the EasyTrigger plugin
    Your Unknown status is probably associated to a value

    Leave a comment:


  • Furious
    replied
    Hi Spud,
    is there any way we can do things with CAPI status in the PI?
    I'm trying to bulletproof things for my system, and I do get the odd device where it can go into an unknown status - I'd like to be able to trigger something on that, however this isn't native within HS.
    It is exposed with CAPI however, so wondering if this could be potentially done - just to test if a device is set to Unknown, as the values are pretty much covered by the other device properties.
    Cheers

    Leave a comment:


  • jpick
    replied
    Originally posted by spud View Post
    The plug-in has a
    Code:
    GetSchedule(string scheduleName)
    scripting function, so you could build a script to parse the schedule and find the next scheduled range.

    or to make things easier for you, I could add the following scripting functions:

    Code:
    GetScheduleNextTimeRangeStart(string scheduleName)
    GetScheduleNextTimeRangeEnd(string scheduleName)
    what do you think?
    That would be excellent thanks! ... I think
    Although I'm going to have to do a bit of reading on how scripts work. Something long overdue I suspect!
    Last edited by jpick; January 19th, 2017, 06:38 AM.

    Leave a comment:


  • spud
    replied
    Originally posted by jpick View Post
    Hi, I would like to be able to display on the HSTouch app the time of the next scheduled change.

    My use case: I am using the easy trigger schedule for my boiler control. "IF time enters boiler time range set boiler to on". What I would like to do at this point is put the next leaving time of the schedule on the HSTouch app. This allows a user to clearly see when the boiler will next go off (or on).

    I can see that this could be done by setting a value on a virtual device. Or updating a timer value to this specific time.

    Are there any other ways of doing this? Is is possible for EasyTrigger to set this value?

    Thanks for any thoughts.
    The plug-in has a
    Code:
    GetSchedule(string scheduleName)
    scripting function, so you could build a script to parse the schedule and find the next scheduled range.

    or to make things easier for you, I could add the following scripting functions:

    Code:
    GetScheduleNextTimeRangeStart(string scheduleName)
    GetScheduleNextTimeRangeEnd(string scheduleName)
    what do you think?

    Leave a comment:


  • sirmeili
    replied
    Originally posted by spud View Post
    I think I could add an optional condition to all the EasyTrigger actions. This condition field would only appear if the advanced mode is activated, and would be defined using a boolean expression that can contains replacement variables (e.g. $$DVR:234: == 0)
    What do you think?
    I think that would work as along as it only affects that "action" and not all actions in an event

    Leave a comment:


  • spud
    replied
    Originally posted by sirmeili View Post
    @spud, this may be an incredibly stupid idea, but I was wondering if you could add an action to easytrigger that does this:


    Set Device to Value X if not Y

    So:

    Set Device Value to ON if not OFF.

    This kind of integrates an "action" and a condition.

    I can see some good uses for this, such as this:

    If Kitchen Motion Changes and Becomes "Motion"
    Then remove Delayed Device Actions "Kitchen Lights"
    Then Set Kitchen Lights to ON if not OFF
    Then Set Kitchen Lights to Off after a delay of "10 minutes"

    This way, you get "Automated lights" in 1 event (I can find faults in the logic above, mind you, but it was just a quick example).


    It would be nice if this same logic could be applied to the "Set device value to another Devices Value if not this other devices value", but that might be asking for too much.
    I think I could add an optional condition to all the EasyTrigger actions. This condition field would only appear if the advanced mode is activated, and would be defined using a boolean expression that can contains replacement variables (e.g. $$DVR:234: == 0)
    What do you think?

    Leave a comment:


  • jpick
    replied
    Next Scheduled time

    Hi, I would like to be able to display on the HSTouch app the time of the next scheduled change.

    My use case: I am using the easy trigger schedule for my boiler control. "IF time enters boiler time range set boiler to on". What I would like to do at this point is put the next leaving time of the schedule on the HSTouch app. This allows a user to clearly see when the boiler will next go off (or on).

    I can see that this could be done by setting a value on a virtual device. Or updating a timer value to this specific time.

    Are there any other ways of doing this? Is is possible for EasyTrigger to set this value?

    Thanks for any thoughts.

    Leave a comment:


  • sirmeili
    replied
    @spud, this may be an incredibly stupid idea, but I was wondering if you could add an action to easytrigger that does this:


    Set Device to Value X if not Y

    So:

    Set Device Value to ON if not OFF.

    This kind of integrates an "action" and a condition.

    I can see some good uses for this, such as this:

    If Kitchen Motion Changes and Becomes "Motion"
    Then remove Delayed Device Actions "Kitchen Lights"
    Then Set Kitchen Lights to ON if not OFF
    Then Set Kitchen Lights to Off after a delay of "10 minutes"

    This way, you get "Automated lights" in 1 event (I can find faults in the logic above, mind you, but it was just a quick example).


    It would be nice if this same logic could be applied to the "Set device value to another Devices Value if not this other devices value", but that might be asking for too much.

    Leave a comment:


  • jpick
    replied
    Thanks all that does simplify things.

    Leave a comment:


  • rprade
    replied
    Originally posted by jpick View Post
    Hi Spud, great plugin really has helped me get up-to speed on HS3 and what I can do with scheduling more generally. I am looking at using sunrise / sunset in my schedule but want to put limits on the time. For example I want a blind to open at sunrise but not before 7am. I want them to close at sunset but at least by 8:30pm. Is this something that is already available? I could see a not before / not after being useful against both sunrise / sunset in different scenarios. Thanks
    It is very easy to do with standard HomeSeer Triggers/Conditions:

    Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	65.1 KB
ID:	1188050

    If you wanted to schedule differently based upon the days of the week, you could also use an EasyTrigger schedule in place of the Homeseer Triggers and or Conditions.

    Leave a comment:


  • sirmeili
    replied
    Originally posted by jpick View Post
    That for sure is possible however and happy todo so. However my thinking was along these lines
    - I was tying to put all scheduling times in one place - the easytrigger schedule
    - By using the schedule I would be able to make adjustments without changing the event rules
    - Using the schedule I could set simple events to switch to a different schedule during vacations
    - Unless I've got this wrong using the schedule dramatically reduces the number of events I need

    Thinking around my last point is as follows.

    During the summer months without a limit the blinds would open in London at 4:45am so I would need a condition not to run the event if it's before 6am. I would then need separate event to open the blinds at 6am. And need another do open them at 8am on a Weekend. As the summer ends and the days shorten, the sunrise time works well. During the winter months they would open about 8am

    Similar limits apply in the evening. Without a limit the blinds would close about 9:30pm in the summer unless I put an additional event in place to close them earlier.

    Anyway that was my logic / thinking I'm happy to add events and conditions was just seeing if it made sense to have the rules in the schedule something like [Mon Sunrise >07:00; Mon Sunset <20:00]. Many thanks for coming back to me.
    You don't need to add more events. Just add more "triggers/conditions" using ORs to trigger the same event actions. I have some events with 5+ sets of triggers/conditions.

    Leave a comment:

Working...
X