CoRE - Get peer assistance here with setting up Pistons

You guys are killing me! Where do I get the information on this “{$…}” stuff? I so want to learn this!

How does it work?

OK,

I’ve had this piston set up for a while thanks to some help much earlier in this thread. I’m noticing as it’s gotten cold that it’s not working as expected lately. I’m guessing, after keeping the dashboard open for a while, that it keeps resetting as the temperature sensor reports that it’s still under 75…then reports again…and again…


Curious as to whether anyone has an idea to lock it in–basically, if the mode is home and the fan is on, turn off after 30 minutes. I was thinking about a variable, but seems like it’d run into the same issue (temp sensor reports, timer resets). I thought about “mode changes to” but then what happens if I’m already in home mode and I switch on the fan manually?

If you look at the dashboard view, all the system variables ($…) available are listed below the piston. Locals, Global, and System, in that order.

In the task, try enabling “only execute on piston state change”.

I’ve seen this but didn’t really understand what I was looking at. So, each time you build a piston, in dashboard view, you can see the variables that are related to just that piston? Then from there, you can substitute naming stuff for the variables and then it will automatically name?

How do you know how to code it? Is there any documentation that I can read to better understand it?

Hmmm. Turned that on and it already is reacting better. I’ll know in about 20 minutes if it’s working!

How do you do the AND and XOR? I can’t figure out how to do both.

The system variables are hard coded and they’ll populate depending on the piston you created and yes, you’ll only see the variables related to that piston with the exception of the global variables that are available to all. You can then use or manipulate the data in those variables by setting your own with calculations etc…

Not sure if Expert Mode has to be enabled, it’s been a while. Create first condition, Add another condition, within that condition, add a group. This is what it looks like on ST app.

…and it just switched off. Thanks @eibyer.

Now we’ll have to see what happens in the summer when it gets hot enough to switch back on again, lol.

1 Like

Subtracting a time value from another (e.g. activeStart and inactiveLast) gives you the difference in milliseconds. It is definitely not always null. See this post by @ady624 for more details:

You would think so, but it seems that CoRE registers events differently, making it possible for two consecutive events to be active. This is why it is necessary to ensure that the previous event was actually inactive.

Anyone else have some ideas on this piston?

Guys, I could really use some help here. I’m (obviously) new to CoRE. I setup a web request to interact with an API I wrote for my electric company’s thermostat. When I tried to get everything added to CoRE, it crashed. Now I can’t get back into the piston. Unfortunately, for testing, I set it to execute once a minute and its continuing to execute.

The error I keep getting is ‘You are not authorized to perform the requested operation.’ How can I delete, or edit, this piston?

Delete it from the IDE under Locations, smartapps, click EDIT on the upper right side, then find your piston on the lower portion of the page.

2 Likes

Uninstalling a Piston

  1. Log into the IDE and click the My Locations link on the top of the page
  2. Find the hub running the piston you want to remove and click its smartapps link
  3. On the SmartApps page, the Edit link
  4. Scroll down to the Piston you want to remove and click its Uninstall link

The piston is now uninstalled!

Thanks! That helped me figure it out.

1 Like

I setup a piston to notify me if a door is left open. It sends me a push notification that XYZ door is open.
This works fine to send a notification with {$currentEventDevice} and it tells me which door was left open.

But… when I added an additional if, (if mode changes to away), then I still get the notification but instead of telling me which door is open it actually says {$currentEventDevice}.

Any ideas?

Hello,
I am trying to get a notification if there is activity at the front porch but the front door never opened. I believe that I have the pistons set up correctly but they are ignoring the Wait 90 seconds action. I added times to the messages and I can see that the wait is being ignored. Any help would be appreciated?

PS - also what core interface is this? this looks nothing like what I am seeing on my phone

@defiante I have similar to your but I have Mode in the first condition and Contact-open in the 2nd condition. It works for me. Put the Mode as first condition to see if it work for you

Dashboard. You have to enable it in the CoRE settings. Then at the top of CoRE you will see Dashboard. From there, you can click the Picture icon to save the Screen Shot. You can also review your Pistons here in live time.

I was finally able to create a piston that I’ve wanted for a long time by copying another piston on this thread. Woot!
Now I want to take it a step further of course. :grinning:

Can I set this up so when the light comes on if it’s between sunset and 8pm come on at 100% otherwise come on at 20% and if it comes on at 100% from sunset to 8pm have it change to 20% at 8pm?

Having it come on at 100% is easy enough, I’ll just add a task to set the level to 100% before I turn it on, but how do I change it to 20% at 8pm and how do I have it come on at 20% if it comes on after 8pm?

Thanks!