Originally posted by spud
View Post
Announcement
Collapse
No announcement yet.
Easy Trigger plug-in - Feature Requests
Collapse
This is a sticky topic.
X
X
-
Originally posted by jpick View PostHi, 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.
Code:GetSchedule(string scheduleName)
or to make things easier for you, I could add the following scripting functions:
Code:GetScheduleNextTimeRangeStart(string scheduleName) GetScheduleNextTimeRangeEnd(string scheduleName)
Comment
-
Originally posted by spud View PostThe plug-in has a
Code:GetSchedule(string scheduleName)
or to make things easier for you, I could add the following scripting functions:
Code:GetScheduleNextTimeRangeStart(string scheduleName) GetScheduleNextTimeRangeEnd(string scheduleName)
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 19, 2017, 06:38 AM.
Comment
-
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
Comment
-
Originally posted by Furious View PostHi 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
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
Comment
-
Originally posted by spud View PostWhat 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 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.
Comment
-
Originally posted by Furious View PostWith 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.
Cheers
AlHS 4.2.8.0: 2134 Devices 1252 Events
Z-Wave 3.0.10.0: 133 Nodes on one Z-Net
Comment
-
Originally posted by AutomatedJim View PostI 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
Comment
-
Originally posted by spud View PostThe plug-in has a
Code:GetSchedule(string scheduleName)
or to make things easier for you, I could add the following scripting functions:
Code:GetScheduleNextTimeRangeStart(string scheduleName) GetScheduleNextTimeRangeEnd(string scheduleName)
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; }
Comment
-
Originally posted by spud View Postthese 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; }
Spud many thanks for these 2 functions. They are fantastic. Also thanks for the sample script which was enormously helpful. I made a slight change to update the string of a virtual device and from there I displayed it onto the HSTouch screen. Exactly what I was wanting to achieve.
Comment
-
Device in z state for x minutes/hours in the past y minutes/hours/days
Hi Spud,
I purchased EasyTrigger and Ecobee (thanks for fixing the fan mode setting a temp hold) and wondering if there was a way to set a condition similar to the title explains? I could have a trigger be a door sensor or light switch and then have an event perform an action if the room was occupied for a certain length of time.
This would be especially handy for motion and door sensors. Especially with motion sensors that turn off if the person is still. I am having an issue where a person goes into a room, sits down, then leaves but the motion sensor is seeing it as two different events.
Comment
-
Originally posted by mwolter View PostHi Spud,
I purchased EasyTrigger and Ecobee (thanks for fixing the fan mode setting a temp hold) and wondering if there was a way to set a condition similar to the title explains? I could have a trigger be a door sensor or light switch and then have an event perform an action if the room was occupied for a certain length of time.
This would be especially handy for motion and door sensors. Especially with motion sensors that turn off if the person is still. I am having an issue where a person goes into a room, sits down, then leaves but the motion sensor is seeing it as two different events.
Let's say for example a device is On for 5 minutes then is Off for 2 minutes (and still currently Off)
Then the condition "Device in On state for 5 minutes in the past 10 minutes" would return true?
Please give some example of how you would use that.
Comment
-
Yes, that is the general idea of how it would work. If the device is in the specified state for the minimum time within a period then the condition would return true.
My particular use case would be to use this function to monitor a motion sensor and turn on a virtual device. So basically the virtual device would turn on to indicate the room is occupied, then off when no motion is sensed for a minimum time in a period. In effect making an 'occupancy sensor' if you will. Not sure if I'm explaining this properly, let me know if you need more info.
This could be added to the trigger 'This device's value has been in the range [X,Y] for exactly...' or to the condition 'This device has been/for at least...' by adding 'in the past' and a time selection function.
See below for an example of how I would use this:
IF: Motion sensor in the garage changes and becomes 'Motion'
OR IF: The event will automatically trigger every... five minutes
AND IF: Motion has been detected in the garage for five minutes in the past 20 minutes
THEN: Cancel a Delayed Device action for the 'Garage Occupancy Virtual Device'
THEN: Turn on 'Garage Occupancy Virtual Device'
THEN: Turn off 'Garage Occupancy Virtual Device' After Waiting: 30 minutes
I can also see many other instances where this function could be useful. For example, this could be used with a temp, humidity, luminescence, wind or other sensors where the value fluctuates and you don't need it triggering immediately but want reliable value.
Comment
-
Parsing a string
Here is what I'm trying to do.
Example String:
mqtt device string looks like this {"progress": 93, "location": "local", "path": "MM_Leg_Stand_PETG.gcode"}
Desired Feature:
1) Monitor device string, and if device string changes and contains "progress":
2) Take the "93" from with-in the device string and append another devices string value with it.
Completed Example:
2nd Device Original String Value: Printing PETG : 11:53 AM
2nd Device Appended String Value: Printing PETG : 11:53 AM 93%Last edited by ServiceXp; March 18, 2017, 04:44 PM.
Comment
Comment