Aside from the rescinded road map that mentions something about what I interpreted to be an If-Then-Else-ish feature (I recall rereading the offering and concluded it wasn't really what it sounded like), wouldn't a real fix to this be proper and complete documentation for scripting? It seems to have all we need to accomplish the myriad tasks, but remains in the occult realm since there is no documentation. The, too, there is the recurring whispered rumor that vb.net is going away.
Announcement
Collapse
No announcement yet.
IF-THEN-ELSE Action
Collapse
X
-
HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
Home Assistant 2024.3
Operating System: Microsoft Windows 11 Pro - Desktop
Z-Wave Devices via two Z-Net G3s
Zigbee Devices via RaspBee on RPi 3b+
WiFi Devices via Internal Router.
Enabled Plug-Ins
AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0
-
Originally posted by George View Post
For sure,
I'm not questioning the ability to add greater flexibility but it has to be balanced against the probability of significantly increasing the technical support load on HST because of the point mentioned above. Unintended actions or triggers on complex events.
<snip>
I really encourage people to ask for those if-else if-else if-else constructs by opening a feature request at https://dev.homeseer.com/servicedesk/customer/portals HS won't do anything unless we let them know what we need.
- Likes 2
Comment
-
Supposedly HS is discussion larger changes to the event engine. So if you have any feature request (like if-else if-else if-else) then it's a great time to submit those feature requests here https://dev.homeseer.com/servicedesk/customer/portals
Comment
-
Originally posted by mulu View PostSupposedly HS is discussion larger changes to the event engine. So if you have any feature request (like if-else if-else if-else) then it's a great time to submit those feature requests here https://dev.homeseer.com/servicedesk/customer/portalsLen
HomeSeer Version: HS3 Pro Edition 3.0.0.435
Linux version: Linux homeseer Ubuntu 16.04 x86_64
Number of Devices: 633
Number of Events: 773
Enabled Plug-Ins
2.0.54.0: BLBackup
2.0.40.0: BLLAN
3.0.0.48: EasyTrigger
30.0.0.36: RFXCOM
3.0.6.2: SDJ-Health
3.0.0.87: weatherXML
3.0.1.190: Z-Wave
Comment
-
Originally posted by mulu View PostYes, what I meant is "if" - "else if" - "else if" ... "else" how how you call it if-if-else.
"if" - "if else" - "if else" - "if else" ....
The first "if" is the trigger, the rest are conditions. An "else" for a trigger is as problematic as those recurring triggers that was removed from HS4.Len
HomeSeer Version: HS3 Pro Edition 3.0.0.435
Linux version: Linux homeseer Ubuntu 16.04 x86_64
Number of Devices: 633
Number of Events: 773
Enabled Plug-Ins
2.0.54.0: BLBackup
2.0.40.0: BLLAN
3.0.0.48: EasyTrigger
30.0.0.36: RFXCOM
3.0.6.2: SDJ-Health
3.0.0.87: weatherXML
3.0.1.190: Z-Wave
Comment
-
lveatch Yes, the "if else" are not meant as additional triggers but as additional conditions. Conditional actions might be less confusing but can get more complex because they allow for more flexibility.
In any case, I still encourage everybody to provide your suggestions/feature requests to the event engine at https://dev.homeseer.com/servicedesk/customer/portals
Comment
-
Originally posted by Wade View Post
Is this what you're asking about?
It's available with Set Device to Expression and Set Group of Devices to Expression.
What do I use in the expression field to turn on a light. For example, turn on this light if it is not already on? Thanks.
Comment
-
Originally posted by simonmason View Post
Sorry, just getting around to look at this. I see the option to set expression.
What do I use in the expression field to turn on a light. For example, turn on this light if it is not already on? Thanks.
Here's an example where I'm turning off a large group of devices--over 50. Before spud added the "Send command only if..." option, 1 or 2 would often get missed in the flood of z-wave traffic. A similar IF statement will work for turning a group on, as long as the entire group has the same "on" value. If not, you'll probably need a separate group and action for each on value. By the way, the 3rd argument of the IF expression is the ELSE value. It's irrelevant in this usage since no command is sent if the resultant is false, but something has to be there. It could just as well have been zero or any other number.
In a number of events I set individual devices in this way, too, where for one reason or another I don't want a command sent if the device value won't change. One thing to keep in mind about logging though. The event will have run (and logged, if logging is on, and date stamp updated) even if the expression evaluated such that the device wasn't updated--i.e., the action didn't fire. An additional action to write an info line to the log could help if this is a problem for you. In most cases I don't bother.
edit: re-reading your question I see I didn't exactly answer your question. For your example, assuming Off=0 and On=100 it would be:
Set [select device]
to
if($DEVICEVALUE = 0, 100, $DEVICEVALUE)-Wade
Comment
-
Originally posted by simonmason View PostAlso, I think turning on might be a little more complicated as some lights are 100 and some are 255.
There is a whole list of control commands available, but in your case the command for "On" is 1 and the command for "Off" is 2. To turn all the lights on, regardless of their control values, you would use the following JSON call as an immediate script command:
Code:&hs.URLAction("http://192.168.5.xxx/JSON?request=controldevicebycontroluse&ref=XXXX,XXXX,XXXX,XXXX,XXXX,XXXX&controluse=1", "GET", "", "")
--Barry
Comment
Comment