CoRE - Get peer assistance here with setting up Pistons

Start with a basic or simple piston. Once you added two conditions, hhe AND appears between them. Tap on it and select Else If… Then you can do millions of cascading else ifs…

Ok, perfect. I KNEW I saw it somewhere but couldn’t figure out where. Thanks!

1 Like

Background: I live on an island, so when I have to get to the mainland at a specific time (going to the airport, for example), it’s important to know whether there is a backup in the ferry line (occasionally as long as 3 hours!) or if they are running on schedule (occasionally 20 minutes or so off their scheduled times).

I happened to see the “Philips 259531 Friends of Hue Personal Wireless Lighting Bloom” and thought, “I could use IFTTT to capture ferry status SMS messages and control those lights!” But I don’t really want to spend $110 for two lights, especially since they really only matter on those days (perhaps every few weeks, sometimes several times in one week) that I’ll be using the ferry.

So I looked for some kind of “simulated light” I could set up as a device, that would show up in the SmartThings device list and in SmartTiles. The idea is to let an IFTTT trigger turn on a simulated switch, which would then fire a CoRE piston to set the ight color, which I hoped would then be displayed in the device list and in SmartTiles.

I set up a “simulated color controller”, which gives me a nice colored circle - there’s a white dot in the middle, which I can live with, but it’s also unlabeled. But the main problem is that running a piston to set the color of the simulated controller doesn’t change its color on the displays.

Any suggestions?

I replied to ady624 instead of you by mistake. Take a look at my post (#1718 - it should be a few before this one) for a modified version of his approach that may give you more flexibility.

Having a bit of a problem with one thing I’m trying to do. This is for motion controlled light toggling in my basement. There are 5 light switches, one of which gets turned on for motion. I’d like to set it up so if a physical switch is hit, the motion toggles off until ALL lights are turned off in the basement. Certain parts are straightforward, others not so much - specifically, determining when the motion controlled light is turned off when on by a physical switch/button (either the switch itself or a button on a remote) vs when it’s turned off by the motion control.

And, another layer of complexity - I’d like to be able to use a mood cube as well. :slight_smile:

So…
Controls: Switches, Remote, Mood Cube
Lights/Switches Switch A (Motion Controlled), Switch W, Switch X, Switch Y, Switch Z. --> I’ll just use the letters below for easier reading.
Virtual Switch Motion Control Switch (MCS below).
Other Pistons Motion Control Latching Piston that controls Switch A and turns off after 5 mins of inactivity.
Other SmartApps MoodCube app
Conditions

  1. If (W OR X OR Y OR Z) is on THEN turn MCS to off. <-- This tracks ANY way they get turned on. Got this working fine.
  2. If (W AND X AND Y AND Z AND A) are off for 15 minutes THEN turn MCS to on. <-- This works fine as well, fairly straight forward
  3. If ([A changes to off via a button or switch physical press] and [MCS is on]) THEN turn MCS to off and turn A on. <-- This needs to track ONLY when the change is made via a switch or a press on an Aeon remote. But NOT a change via a piston or other SmartApp (specifically, the MoodCube app). It works, but not the way it needs to. When I tried to set to “Physical” interaction, it didn’t trigger via the switch itself.

Check the switch event in your IDE, does it report as being physical? Some switches do NOT make the distinction between physical presses and programmatic ones, so if that’s the case, you’re out of luck following that track… You can try with a global variable that’s set by the mood (Set boolean variable @itIsIWhoTurnedTheLightOnForCryingOutLoud = true) and then checking that for “is equal to false” into the second piston. You get the idea…

Guessing that would be in the type in the event list or somewhere similar? And without being able to detect what caused the change I may be out of luck. Don’t want to use mood since I use them for other whole house control items. :confused: The only other way I see I’d be able to do it is by catching every possible event to turn the light on in a piston and having it translate to the right activity. Seems like a LOT of overhead. (And I have the Leviton VRMX1 dimmer…thought it was supposed to be one of the best reporting wise…grrr…)

Something like this:

As you can see, physical is not there for my GE 12724 z-wave switch… however, I noticed the eventSource is DEVICE, whereas the app controlled ones say APP_COMMAND, so I may be on to something here…

1 Like

My GE switches register a physical press and report as such.

Is it showing inthe same event page I posted above?

I’ll check it and see… Give me a few minutes.

1 Like

These screen shots are from…

My locations/list devices/chosen device/list events

1 Like

How come I do not have a type? I am going to Devices, select a device, tap on List Events, then select one and click on its date on the left. Are you doing the same?

No…

Go to locations
Tap on list devices
Tap on your device
Scroll down to “list events”
Tap on the date of the event.

Isn’t that the same thing? I just went to Devices directly, everything after that is the same…

Nope, not the same… For some reason it’s two different pages of data… Who knows why.

Hrm. I’m not seeing any of the physical stuff at all. Grrr…this is a PITA.

Just to be clear, on the WebAPI:
My Locations --> Click List Devices --> Click on Device Name --> Click on List Events --> Click on an Event. That should show the correct screen and have the type info? Anywhere else to check it?

Is this built into the stock dimmer handler for SmartThings? Wondering if maybe I need to switch the device type to something more…enabled. :slight_smile:

Did the same, no dice. What DTH are you using?

So, I’m comparing the code of the dimmer DTH I’m using and a newer one someone developed with more capabilities and the DTH I use for my ceiling fan (which reports the physical type) and it looks like the code for identifying the type as physical isn’t there. I see it in this DTH but not in the ‘stock’ z-wave dimmer.

What kind of switch are you using?

Mine is this…