www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Software > HS3 / HS3PRO > HS3 Event Clinic

HS3 Event Clinic Discussions related to the creation of HS3 Automation Events

Reply
 
Thread Tools Display Modes
  #1  
Old July 16th, 2017, 06:12 PM
Ltek Ltek is offline
Seer Deluxe
 
Join Date: Dec 2010
Location: earth
Posts: 299
"Smart Actions" possible? Do not set device if it is already set

I created this term to mean...
"Device values/states are checked before actions are executed. If a device state is currently the same as what the action would set it to be, it is skipped and no action is taken on that device"

Example:

Event | tells HS3 to set DEVICE = 1

HS3 | checks DEVICE in HS3 cache (does not query device)
| if value already = 1 then NoOp (no operation takes place) and HS3 moves on

I'm find TONS of actions where my devices are already in the state being set. And HS3 sends commands to lock, close garage doors, etc -- see the quote below, where ONLY 1 of those 34 commands needed to be sent

Benefits of doing this...
Event execute faster
Lower use of computer resources
Less traffic, and faster protocol response (Zwave/Insteon/etc)
Less battery drain on devices


This is especially beneficial when we use House Modes where 10, 20, 30 devices are being set and/or checked.


Quote:
Jul-16 3:34:27 PM Device Control Device: Security Status House Mode to Away (1)
Jul-16 3:34:27 PM Device Control Device: Front Yard Driveway Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Playroom Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Mudroom Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Living Room Mantle Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Living Room Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Living Room Light 2 to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Living Room Fan to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Kitchen Table Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Kitchen Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Kitchen Light 2 to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Kitchen Island Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Kitchen Espresso Machine to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Foyer Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Main Dining Room Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Garage Garage Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Front Yard Entry Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Tylers Room Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Noahs Room Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Master Night Stand Lights to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Master Dresser Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Master Bath Vanity Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Master Bath Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Bedrooms Guest Room Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Office Office Heater to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Office Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Media Room Sub to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Media Room Seating to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Media Room Main Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Basement Media Room Back Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Backyard Patio Outlet to Off (0)
Jul-16 3:34:27 PM Device Control Device: Backyard Patio Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Backyard Deck Light to Off (0)
Jul-16 3:34:27 PM Device Control Device: Door Lock Foyer Lock to Lock (255)
Jul-16 3:34:27 PM Device Control Device: Door Lock Mudroom Lock to Lock (255)
Reply With Quote
  #2  
Old July 16th, 2017, 07:55 PM
rprade's Avatar
rprade rprade is offline
OverSeer
 
Join Date: Jan 2014
Location: Colorado
Posts: 5,189
Quote:
Originally Posted by Ltek View Post
I created this term to mean...
"Device values/states are checked before actions are executed. If a device state is currently the same as what the action would set it to be, it is skipped and no action is taken on that device"

Example:

Event | tells HS3 to set DEVICE = 1

HS3 | checks DEVICE in HS3 cache (does not query device)
| if value already = 1 then NoOp (no operation takes place) and HS3 moves on

I'm find TONS of actions where my devices are already in the state being set. And HS3 sends commands to lock, close garage doors, etc -- see the quote below, where ONLY 1 of those 34 commands needed to be sent

Benefits of doing this...
Event execute faster
Lower use of computer resources
Less traffic, and faster protocol response (Zwave/Insteon/etc)
Less battery drain on devices


This is especially beneficial when we use House Modes where 10, 20, 30 devices are being set and/or checked.
"Smart Actions" as you refer to them are not native. Back in the bad old days of Z-Wave, I made a special group of events that would only control a device if it was not already in that state. Z-Wave devices would frequently end up in an unknown state due to command confusion. This has not been a problem for more than a year.

They all looked like

IF This event is manually triggered
AND IF Device XXX is not On
Set device XXX to On

Your "Smart Action" would have to do a similar evaluation on every action.

Then I would call that event when controlling devices with events. I have all but eliminated the use of those events for several reasons
  1. There is absolutely no perceptible improvement in speed of event execution or control, even in my house asleep event that controls 30+ devices
  2. Event actions have such a small CPU footprint that there would be no measurable impact on computer resources. Evaluating an event probably takes as much CPU power as executing an action.
  3. If a device control action is dependent upon the status in HomeSeer, you could have a device that is out of sync (due to lack of instant status, device controlled when HomeSeer is down, etc.) would fail to be controlled as desired. I mitigated that by using "This device is not equal to...".

I don't understand the comment about battery life since (other than thermostats), I cannot think of any battery operated devices that are controlled, most only report.

I don't think your idea is bad, it just wouldn't really make any perceivable difference in the function of HomeSeer and the down side is that it would not force a device into the correct status if it was out of sync.
__________________
Randy Prade
Aurora, CO
Prades.net

PHLocation - Pushover - EasyTrigger - WeatherXML - UltraECM3 - Ultra1Wire3 - Arduino
Reply With Quote
  #3  
Old July 16th, 2017, 08:19 PM
Ltek Ltek is offline
Seer Deluxe
 
Join Date: Dec 2010
Location: earth
Posts: 299
Quote:
Originally Posted by rprade View Post
"Smart Actions" as you refer to them are not native. Back in the bad old days of Z-Wave, I made a special group of events that would only control a device if it was not already in that state. Z-Wave devices would frequently end up in an unknown state due to command confusion. This has not been a problem for more than a year.

They all looked like

IF This event is manually triggered
AND IF Device XXX is not On
Set device XXX to On

Your "Smart Action" would have to do a similar evaluation on every action.

Then I would call that event when controlling devices with events. I have all but eliminated the use of those events for several reasons
  1. There is absolutely no perceptible improvement in speed of event execution or control, even in my house asleep event that controls 30+ devices
  2. Event actions have such a small CPU footprint that there would be no measurable impact on computer resources. Evaluating an event probably takes as much CPU power as executing an action.
  3. If a device control action is dependent upon the status in HomeSeer, you could have a device that is out of sync (due to lack of instant status, device controlled when HomeSeer is down, etc.) would fail to be controlled as desired. I mitigated that by using "This device is not equal to...".

I don't understand the comment about battery life since (other than thermostats), I cannot think of any battery operated devices that are controlled, most only report.

I don't think your idea is bad, it just wouldn't really make any perceivable difference in the function of HomeSeer and the down side is that it would not force a device into the correct status if it was out of sync.
I understand your point and Clearly this is not critical, but would be nice to see if it made any difference. I would think less wireless traffic would cause faster device responses

protocol communications are bidirectional... How much does 30 simultaneously queries cause, I don't know. I always think less is more

I've had zwave for 5+, and insteon for 15 years, never seen them out of sync. I Have about 50 physical devices.

Battery devices are mainly door locks that would be an issue with drain.


Sent from my SAMSUNG-SM-G935A using Tapatalk
Reply With Quote
  #4  
Old July 17th, 2017, 06:31 AM
mrhappy mrhappy is offline
OverSeer
 
Join Date: Nov 2007
Location: W.Mids, UK
Posts: 6,826
I suggested that there could be a place for the condition to be put on the event action, that did not appear to be acknowledged so guess that they had other ideas. It would be basically a nested if command but I would say there was only one level needed rather than creating a hugely nested mess.

I then toyed with the idea of adding the functionality into another plugin but there would only ever be the CAPI actions that another plugin could query, anything non-CAPI could not be found and triggered by a plugin so I left it on the back burner.
Reply With Quote
  #5  
Old July 17th, 2017, 04:12 PM
jmaddox jmaddox is offline
Seer Plus
 
Join Date: Oct 2010
Location: Dallas, Texas
Posts: 87
I agree that I like to minimize unnecessary zwave traffic.

Luckily this is something you can do inside a script. When you use
Dim oldvalue As Integer = hs.DeviceValue(defref#) You are getting the cached status of the device, the device itself is not being polled. Sure you are using CPU cycles in the script but that's negligible.

Its fairly simple to ensure that if oldvalue = newvalue then don't update the device value. Again CPU cycles are used but negligible.
__________________
HS3 Pro on Hometroller S6 with Z-NET
Number of Devices: 83
Number of Events: 50

Plug-Ins: BLLock, DoorBird, Honeywell WiFi Thermostat, HSTouch Server, Restart, Z-Wave, EasyTrigger, PHLocation, Pushover 3P

External applications: Homebridge-homeseer, Geofency
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Status" of device out of sync with "Last change" Richel BLRadar (3P) 4 July 4th, 2017 07:25 AM
HS3 "Device Type" "Check All" not checking all. MrMxyzptlk HS3 / HS3PRO Discussion 0 August 12th, 2016 06:51 AM
still in issue with "+" and "-"in device, activity, command names bartbakels Harmony Hub 0 June 17th, 2016 01:57 PM
"Device Status Change" trigger "Changed to ON" bholio HS2 / HSPRO 2 April 4th, 2011 01:10 PM
How to create "No Status" Lighting Device (locked at "Unknown") tgpaul HomeSeer General Discussion Area 1 December 14th, 2010 02:41 PM


All times are GMT -4. The time now is 06:34 AM.


Copyright HomeSeer Technologies, LLC