Select multiple devices in rule triggers and actions

How about in a Trigger, I want to know if any Window Contact Sensor opens? So I’d like to create a group that contains all Window Contact Sensors. Smartthings only has lighting groups, and a Scene won’t work for this.

I did this with a variable and 2 rules.

Create variable $allWindowsClosed
For the rules:

1st rule - any window open
Trigger:
add all your windows with changes to open
Actions: select ‘Any’
IF select all your windows with is open or stays open for X mins
THEN:
set variable to false

2nd rule - all windows closed
Trigger:
add all your windows with changes to closed
Actions: select ‘All’
IF select all your windows with is closed
THEN:
set variable to true

I found it works better with 2 rules but you could do it in 1. You’d just combine the triggers from rule 1 and 2, use rule 2 If action, Then set variable true Else set variable false.

Then you can add the variable to a dashboard.

It’s very tideous having to select each device as a trigger and then each device as an action. Picking all devices at once and then going back and setting the condition would be much easier!

1 Like

Hi Terri, this is exactly what I want to do - but what I’m asking is there a way to include all of the devices (in this case window sensors) without adding each one separately. For example, in other tools (such as webcore if you’re familiar) you can select multiple devices from a list, and have them assigned to one trigger. What I am seeing with SharpTools seems like I need to add each device separately as a trigger in a multiple OR situation. If I have to do it that way so be it, I’m just hoping that’s not the case, LOL.

Thanks for helping me out!
Bill

This is exactly what you have to do. Add each device as a trigger and in some case like ‘ALL’ add each device again as an acton.
I am familiar with webcore and switching over to SharpTools has taken some adjusting as the rule logic is slightly different!

All we can do is cast a vote for this feature and it may get implemented in the future.

2 Likes

Yes, I took the plunge and added them… so I’ll be a full fledged Rules Engine user in the next few weeks as I migrate webcore pistons over. I have a lot of devices, so I was being lazy. I do prefer code over graphical programming but I’m old.

Thanks for your help!

2 Likes

I migrated my last piston over to rules engine tonight. I found with a few workarounds I could achieve most of what I had on webcore.

1 Like

This would be nice - I have a lot of devices (water sensors) and having to input each one (they all have the same capability) does take some time. I do understand the point about adding devices with different capabilities, but if this can be available for devices with the same capabilities, it would be a time saver :slight_smile:

1 Like

I too am currently transferring my Webcore pistons over to Sharptools Rules. I have quite a lot of battery devices and have pistons to report, for example, low battery levels. Also devices going offline. The ability to select multiple devices from a tick list would be great in Sharptools rules and make the creation of new rules much more simple.

2 Likes

I’d take being able to select multiple devices (like you can when adding items to dashboards) for each section. They populate blank as they do now and then the user goes into each one and sets the condition.

2 Likes

Just to add use case… I really don’t want to have to make this as a rule with all of these different triggers and actions that’s 11 if_conditions with 6 actions each :sob:

As for how it would look, I think the drop down menu selection option shown earlier from webCoRE would work really well. Not sure on how things are setup but if the concern about devices with different attribute types can’t be resolved easily maybe adding another option such as “Multi Device”:

Then you can add in a different logic flow (pick device type or attribute type first before showing options available)

1 Like

As it seems we’re not being understood clearly, here’s an example of using mutiple devices grouped in a WebCoRE piston, that takes 10 minutes to do, and the same in a Sharptools rule that takes a couple of hours, gave me considerable arm ache…

1 Like

Still trying to figure out how to recreate your ‘battery & device status’ piston you discussed a while back on your channel. It’s a grape in webCoRE, but I’m struggling to grasp a method in SharpTools. I’m sure hoping that multiple device lists and setting temporary variables on the fly are in future works. :slightly_smiling_face:

1 Like

Just wanted to share an update that we’re actively working on this in our development environment… :slight_smile:

In the video above, once I select a device, the list automatically filters to other devices which share the same attribute. We’re still working on refining things, but expect to release the multi-device triggers to beta first, then will continue work on multi-device commands for a later release.

8 Likes

Awesome! Looking forward to this.

Multi Device Triggers and IF Conditions are now available for members of the beta group:

https://community.sharptools.io/t/beta-multi-device-triggers/10769?u=josh

4 Likes

Multi-Device Triggers, Conditions, and Actions are now available! You can find more details in the release threads below:

:twisted_rightwards_arrows: Multi-Device Triggers and Conditions - Release Thread

:arrow_forward: Multi-Device Actions - Release Thread

A special thanks to everyone who helped test these features while they were in beta! :partying_face:

2 Likes

Hmmm, now where to move my vote. :smile:

Once the topic closes, you’ll get you’ll get your back automatically, so no need to ‘unvote’. (Currently set to 2 days after the last reply)

1 Like

Yes, but I still have to decide what’s next in importance to me. Decisions, decisions.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.