CoRE - Get peer assistance here with setting up Pistons

Bob, it didn’t work for me. I just tried it on my hue bulb, turned on immediately when loading attribute level.

Can anyone help me understand how this can happen.
The evaluation shows that the conditions are true and yet the piston’s current state is false. Shouldn’t it turn to true for a basic piston? The only change I did was to remove one presence sensor (phone) from the first condition and the piston stopped working.

This might work fine. Both lights should be at the same level for the most part. So if I can get this going and need to capture each one separately… I’ll deal with it then. Thanks!

1 Like

I believe basic pistons do not support state because they are one-branched. Use a simple piston and just don’t use the Else

That explains why the piston state is false, thanks.
I thought that implies that my piston has an issue because it quit working.
Is there any action I can take to “restart” the piston, it does not do what it was supposed to do after I removed one presence sensor. I have tried rebuilding the piston but that didn’t help much.

@ady624, for some reason my piston started working again, I have no idea why it stopped in the first place. Looking at another basic piston, it’s state did change to true.

You can hit the “Simulate” button in the piston page or you can create a “tap” that runs it and then simply run it from the dashboard

I’d like to setup a piston to clear false smoke alarms (to be executed by a tile on ActionTiles), turning off sirens and lights is easy, but any idea how I can clear the alert from SHM and also stop the smoke alarms from flashing/beeping, I am used Fibaro smoke alarms.

Setup

  • 2 LIFX bulbs in ceiling light, connected to a GE smart on/off switch

Use case

  • IF (switch is turned from off to on) OR (switch is already on and I press on again) THEN turn the bulbs to a default color

Issues

  1. I am unable to define the second condition i.e. switch is already on and I press on again
  2. most of the times, 1 of the 2 bulbs changes the color. in smart things UI, the device says it has the new color but actually it is not. (it is the previous dimmed color setting when I turned off the lights). I split out the bulbs into individual actions, but still same issue

Here is the screenshot of my piston

So, I seem to be having an issue capturing current state with a variable. I haven’t used variables too much yet… Do I need to create a global variable first? This is what I did, but they are being valued with nothing.

I used a local for the example I showed you, curLevel, which I just entered into the variable name field as I was creating the piston. iOS or android? On android, an error message comes up when you hit Done but it goes through if you hit the back arrow.

How are you all using the wol command? I have wol setup with MAC address in CoRE to run when a virtual switch is on. This doesn’t work.

In my wol app it has IP and port with the mac and that works.

For CoRE I don’t know what secure code is for.

Been struggling for a week with what I thought would be a simple piston.

What I want is basically this
If Contact Sensor (door) is (or changes to, whatever works best) to Open
then turn on light

I want the light to turn off one minute later, or on minute after door is closed.
That’s easy, and been done and tested without a problem.

But I want a way to either pause the piston or cancel the piston.
I thought maybe I could set up some sort of action like if the light is manually turned on (even though its already on from the piston action), that I could use that to trigger the pause or cancel?

I don’t have a motion sensor in the room, so I cannot use that. I’m just about ready to just buy one of those dumb motion sensor switches for the room, but I really wanted to solve this.

In laymens terms, I want the light to come on and turn off based on the door being opened/closed, but sometimes I want the light to stay on. Since I have to go through the door to get to the room, the piston has to trigger at least once, and then probably again, when I leave the room. 90% of the time the one minute timer auto off is great, but the other 10% of the time I have to sit there waiting for the light to turn off, then manually turn it back on.

I’m pulling my hair out. I don’t have a motion sensor in the room to use for logic, and I’m getting close to just buying one of those “dumb” motion sensor switches, it will probably do this flawlessly, haha. I just really wanted to solve this.

I think the best way to do this is to get a cheap motion sensor. The iris gen two sensors at Lowe’s are only 30.00

I’m beginning to feel like sometimes the geek in me (us), tends to over engineer these things because of the challenge.

At that point I’ll have $80 (Switch, Sensor, and contact sensor) invested for a room that I usually spend 1-2 minutes a day in. haha. Where I could have just bought a motion sensor dumb switch for $15 and been done with it.

This is for my garage, basically I have a second fridge in my garage, every day or so I walk into the garage and grab something from the fridge and go back in to the house. Once a week or so I do something longer in the garage, that’s the puzzle. I need the contact sensor on the door for intrusion detection, but not sure (other than solving this light issue) what benefit I’d get from the motion sensor in the garage. What sort of other smart stuff would you do?

Thanks for the help, not trying to sound negative, its actually the opposite. I love this stuff, its fun and challenging. Just surprised that this cannot be done with just a contact sensor.

Trust me, I understand completely.

I have a half bath of the garage and kitchen. I put in a Lutron occupancy detector for the lights in there. They are instant on and turn the lights off three minutes after no motion. It also keeps greasy hands off of the wall.

I did put in a smart switch, a contact sensor, and a motion sensor strictly for the exhaust fan. Yeah, a lot of money, but that fan was being left on for hours at a time… Using electricity and sucking the climate controlled air out of the house.

So don’t feel bad about using dumb devices, they serve a great purpose. smart devices tend to have a small lag, so they do not work everywhere.

I do not use motion on the stairs.
I have led lights in my pantry that are 12 volt, I do not use automation there because the transformer has to power up.

So there are times that automation does not fit the bill.

I think the simplest way to do this is when you open the door, don’t close it until you’re done lol, once you close it, turn off :slight_smile:

3 Likes

@ady624: Is this possible? I just need help working with the variables.

I think I (and some other folks) experimented on this before but we were using a dimmer. I’d suggest turning on the switch manually and see if any subsequent ON will show up in live logging.

@Swapandeep_Singh

You will need a non dimming switch like @eibyer is suggesting. There is a smartapp called double tap that causes me huge headaches when trying to set it up. Tested it on the closest switch to me at the time (non dimmer) and it worked flawlessly. Changed the switch to the one I wanted (dimmer) and no longer worked. Took me way to long to realize why.