CoRE - Get peer assistance here with setting up Pistons

Hi all, I’m trying to setup my first piston and am heaving a little trouble getting a particular piece done. I did some searching but didn’t find any similar questions (maybe my search skills suck). I’m trying to enable a scenario where my dimmer switch is on and I want to increase brightness to 100% if I tap “on” on the paddle again. Essentially:

Tap on -> dimmer turns on to previous value, e.g. 20%
Tap on any time later -> dimmer increases to 100%

I’m just don’t see a condition that listens for the “On” command when a switch is already on.

Hi everyone. I was just wondering if anyone has experience with recordClip(…). Is the record duration determined within my camera App (Arlo), or is it based on the parameter that can be set with that action? I wanted to record for a minute if motion is detected with in a certain time range, and I think I have the trigger and conditions set, but I was stumped by this portion.

I tried it without involving a variable and it immediately sets the level at 100.

My test piston was:

IF
Switch changes to on
AND
Switch is on
Using Switch
  > Set level to 100

I’m thinking of doing this, completely untested :slight_smile:

IF
Switch changes to on
AND
Variable switchedOn equals false
Using location...
  > Set switchedOn to true
// Set the variable during initial tap


ELSEIF
Switch changes to on
AND
Variable switchedOn equals true
Using Switch...
  > Set level 100
// Set level to 100 since the inital tap already registered


ELSEIF
Switch changes to off
AND
Variable switchedOn equals true
Using location
  > Set switchedOn to false
// Set the variable back to false for the next tap

Try using the “load attribue level from variable” task, you might have to initialize the variable to the level you want first.

A basic piston would work for the first one about the siren…

IF
Your_Triggger here
Using Siren
  > Turn on
  > Wait X seconds
  > Turn off

Not sure about your interval timer though, what’s the use case?

My question related to this was how does it capture the switch event if the light is already on?

I tried to test this using various triggers and conditions I couldn’t seem to find the right combination to get noticed if the switch was already on.

I checked the live logging briefly when I tried the first piston. The second tap was registering as another on (for that device I have). I did not have time to give the second version a try though.

Is it possible to insert or reorder actions? It’s a PITA to re-enter 10 actions when you realize you needed one ahead of them. :slight_smile:

Hi,

I’m trying to set up a piston where my schlage lock will change alarm mode based on the hub mode. When I go into the lock event history, it is setting the value as “setAlarmMode” but the mode isn’t actually changing

Is there something I am missing?

Thanks @eibyer, I think the problem is that the dimmer doesn’t send another “on” command of is already on. At least the Recent Activity view doesn’t show it.

Any idea if this is the case? Any way around this? There is a double tap smart app, this makes me think a solution is possible.

Hey all I’ve been trying to figure out this simple piston and for the life of me cannot get it working. I’m sure it’s something easy.
What I want it to do is text me when one of my temperature sensors is above or below a set number, but only once every couple hours so I’m not getting a bunch of messages.
Everything works except it will not wait 120 minutes until it fired again. It will continue to send SMS messages as the temperature changes every time.
I know the issue is the wait command at the end, I just don’t know what to put in its place
Here’s what I have so far:

I didn’t check the recent view on the st app but I did look the web IDE live logging. I will give that second piston a try when I get home (if I don’t sidetracked).

There’s an option “piston or state change only” that you can try enabling but it will still ignore the 120 minute wait you have. If you need that 120 minute wait, you will have probably have to involve a variable that can be checked if the notification has been triggered already and then you’ll have a timer in that piston that will reset that variable back to false after 120 minutes waiting for another event.

I’m with you. I think it is going to depend on what type of switch / dimmer you use. I have the GE dimmer installed. I can not see any events in live logging or Event list for that switch on the IDE if the switch is already in the state your trying to switch to.

I turned it on and pressed the on button again. The original on is in the IDE event list but not any of the latter. I do see my CoRe piston sending the level commands from my auto control. Which is interesting but really does you no good. If you can’t see the switched pressed again then you can’t trigger your CoRE piston on that event.

If I remember right others had issues with the double tap and the GE switches. There is another brand of switch that I believe has double tap functionality built into the switch.
https://www.amazon.com/dp/B01DFRWZNE/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1AOLKL0SMOSC&coliid=I28926IF3J0MXT

So maybe if you used that switch in the places you needed this functionality, it might work? I believe it would also require the custom DTH.

1 Like

So, @bamarayne helped me out with something similar to this back in August: CoRE - Get peer assistance here with setting up Pistons

Basically, it uses a variable as a condition, notification only fires when the correct variable state exists.

Works - but the sim switch I’m using stays on ,negating running again.
Tried a button but Alexa does not seem to work. Need a way to reset the sim back to Off.

Also is the only turn off a delayed off? It works.but need to set a time.

interval timer is for a planned hydroponics setup net Summer, on 10-20 seconds and then off for 15 minutes repeat. Last time I did this I was using industrial timers but want to be able to track power usage. I could always buy a timer and use a ST device to track power - but seems excessive.

See if you can set up a virtual simulated button… which I think is normally off. The piston would look like this:

IF
Button changes to pushed

Edit: Just read that you tried a button. Hmm, you can probably integrate the turn off of the switch in the piston itself.

IF
Your_Triggger here
Using Siren
> Turn on
> Wait X seconds
> Turn off
Using Your_switch
  > Wait X minutes
  > Turn off

Yup, I’m using the GE switch. I still wonder how the double-tap smartapp worked for me though.

For the record, this request isn’t anywhere near important for me. It was an idea that I had that I believe would be a minor convenience. I’m also curious of the capabilities of CoRE :smiley:

Any ideas about why this want to fire at midnight?

All i want is for it to switch lights on at sunset. I have another system to switch them off with SHM.

Why did you pick after sunset as the condition? Use a trigger instead. Select happens at, then sunset.