CoRE - Get peer assistance here with setting up Pistons

Thanks for the quick reply, I may give this a shot. The physical switch is a smart switch. I just meant if i manually press the toggle button on the switch, opposed to using the Smartthings app. How do you reset the virtual ‘override’ switch?

Is there a way for the IF statement to compare a variable value to another variable value, and not to a pre-set constant value?

What does it mean when I get a bunch of notices like the one below in my Activity Feed:

CoRE/Piston name
co re recovery88b4b00d873a4620a97e7f490d28904e is

I got a similar notice for everyone of my CoRE pistons at the same time. This happened several times last night.

‘Blank’ Pistons as Section Headers

What is the ‘Best Practice’ when it comes to using ‘blank’ Pistons as section headers?
So far, I’ve just simply been going in, naming it how I want it so that it goes where I want in the alphabetical list, and that’s it. Should I be using any specific Piston type for this, or do anything else, or is that OK?

Hi all,

I need some help with a piston I’m trying to run.

Target: bedroom light
Source: Philips Hue Dimmer (ZHA) DTH

The Dimmer has 4 buttons, each with a possible state of Pushed or Held.

I don’t know how you all do those lovely screenshots, as my CoRE SmartApp looks nothing like that, but here’s what I’ve got

IF
  Button 1 is Pushed
  (when true)
    Using Bedroom Lights... Turn On (only on state change)
OR
  Button 4 is Pushed
  (when true)
    Using Bedroom lights... Turn Off (only on state change)
OR
  Button 2 is Pushed
  (when true)
    Using Bedroom light... Adjust level by 10% (only on state change)
OR
  Button 3 is Pushed
  (when true)
    Using Bedroom light... Adjust level by -10% (only on state change)
OR
  Button 2 is Held
  (when true)
    Using Bedroom light... Adjust level by 5% 
OR
  Button 3 is Held
  (when true)
    Using Bedroom Light... Adjust level by 5%
THEN
  Set variable x to 1

So they all seem to work individually, but when I do the HELD options, it only executes once… I had expected unchecking the (only execute on state change) option to mean it would keep executing it until the button was released.

How can I do this properly, so that Holding in buttons 2 and 3, will gradually dim the lights up and down, and then stop when I release the button?

Thanks in advance for the assistance

The graphic views of the pistons you’re seeing is from the CoRE Dashboard, see link below.

Regarding your piston, the tasks associated with a held button doesn’t cycle as far as I know. It will only register the held once and will repeat if you release and hold again.

@eibyer is correct — a held button doesn’t cycle. Button press/held events don’t register until AFTER the button is released, from what I can tell :disappointed:

55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:58: error Button: 3 Hue Code: 3003 Hold Time: 56
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:58: error Button: 3 Hue Code: 3001 Hold Time: 56
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:58: error Button: 3 Hue Code: 3001 Hold Time: 48
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:57: error Button: 3 Hue Code: 3001 Hold Time: 40
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:56: error Button: 3 Hue Code: 3001 Hold Time: 32
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:55: error Button: 3 Hue Code: 3001 Hold Time: 24
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:54: error Button: 3 Hue Code: 3001 Hold Time: 16
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:54: error Button: 3 Hue Code: 3001 Hold Time: 8
55ff7a9a-f594-4d78-b36d-15e65dbae9b2  08:59:53: error Button: 3 Hue Code: 3000 Hold Time: 0

2017-02-19 8:59:58.835 AM GMT
moments ago	DEVICE		button	held		Hue Dimmer Switch (ZHA) button 3 was held
2017-02-19 8:59:58.897 AM GMT
moments ago	DEVICE		lastAction	3 held		Hue Dimmer Switch (ZHA) last action is 3 held

all while held.

So the Events list is showing up once the button is released, but clearly it’s registering it, because it’s showing in the Live Log

1 Like

So… I modified the DTH to throw a “held” event at the same time it’s logging that it’s been held, and the piston is firing now for the duration that I’m holding the button.

unfortunately, it’s slow as hell!

1 Like

Are the triggers edge based? In other words if the trigger comes on is the piston only evaluated once until the trigger goes off and back on or is it continually evaluated while the trigger is on?

if that’s the “only trigger on state change” setting, then no, that’s not selected

Can someone tell me why this will turn on but not back off?

It should work as you have it. I have one set up just like that.

Looks good to me. I’ve got two running exactly like that. How long is the reset time for your sensor?

I need help with garage timer.

Want to have door sensor check if open wait 15m and then notify me it is open every 15m after. Right now it notifications instantly then 15m.

No need for and-if piston. Just use basic piston and under the actions group everything together instead of individually like you have them.

Has anyone been able to get TTS working with CORE lately? I have not been able to get anything to work with CORE but I am able to get it to work with other smart apps.

Any errors in thelogs? Any logs on Sonos?

Load Attribute from Variable:

I haven’t been able to get this working on a Simulated Thermostat, I have been trying to load the temperature from a variable.

I am using the standard ST DTH, do I need to modify the DTH for this to work, if so, any suggestions/pointers would be helpful.

@ady624 I’m still stuck on this one. I just can’t get the global variable to work, even on a boolean flag.

I think it all come down to where should I initialize global variables? I did try on the Global Variables section but if I try to use now() the data type is set to string. Same when I try to initialize a boolean variable, if I put either True or true, when I do save it, I can see the data type as string. How can I initialize them with proper data type?