CoRE - Get peer assistance here with setting up Pistons

Hoping someone can shed some light on how the pistons work. I have 4 pistons. 3 of them work great. The one I wish would work is rsther simple I think but can’t get it to work. Essentially I have light in my office that turn on with a motion sensor and turn off without motion after 10 minutes. That works. My Piston is basic it looks at my harmony activities to see if any of them are on. If any are on I want the Lights in my office to remain on, ignoring the motion sensor lighting Automation. If I hit simulate with all the lights off and a harmony activity on the Piston will turn on the lights like I want. But if I leave a harmony activity on and leave the room after 10 mins the light turn off and the Piston doesn’t evaluate or run itself keeping lights on. I am sure there is something simple I am missing to have the Piston poll the harmony activities to review there status but I cannot seem to figure this out. Thanks to anyone who can help

The first thing I would suggest is that you post a screenshot of the piston.
As they say, ‘A picture tells a thousand words’.

Dashboard view?

Post your other pistons as well. There’s nothing in what you posted that would override the motion sensor and keep the lights on. Is it 4 pistons to just achieve your motion lighting? They can most likely b condensed if we see everything.

Thanks for the reply guys. I am new to pistons and CoRE. The other pistons don’t have anything with lights in them. They are used for Ask Alexa so I can wake my arcade Machine and put it to sleep on command. And the forth Piston is when I leave it turns off the arcade in case I forgot. Sorry if in my replies I am not giving you all the “correct” info as I am still learning the pretty cool app

Awesome! Thanks for the tip.

I’m so grateful for the developers and contributors to this forum. My house is beginning to run itself because of everyone’s patience, guidance, and suggestions.

2 Likes

Well, the piston speaks the text that I send as an SMS to IFTTT, so it is dynamic. It just happened that the last text I sent was “Girls, pick up the phones!”

Just getting started with CoRE, what an awesome piece of work this is!! Still at the very bottom of the learning curve but have a couple of questions:

  • When I click on the CoRE Dashboard (initialize core dashboard) my phone will “think” for a second and then nothing happens. Is this where folks are seeing that GUI view of their Pistons? Guessing from the screen caps it’s launching a browser window for the dashboard and I’ve got something messed up on my phone that isn’t allowing the browser window to launch.
    SOLVED - needed to enable OAuth for the smartapp through the IDE

  • I’d like to draw in a weather report and send a push note if my windows are open and the report says rain is on the way. Any ideas on how to get a weather report into CoRE? I looked at using IFTTT but failed to figure out how the maker channel works, webhooks, etc…I’m learning :smiley:

  • I’ve read a couple of posts here referencing using the Amazon Echo speaker to say things, I’d love to have a voice for my house! A quick “for dummies” on how to leverage that speaker in CoRE would be awesome

  • One of the Pistons I have set up sends a push note when the temperature outside is within a range and all the windows are closed. Looking to limit the push notification to, say, twice a day. I’ll post a shot of my Piston as soon as I get the dashboard working, any thoughts on how I might achieve that?
    SOLVED (kinda) - I found the “wait” task and set it to wait 4 hours after sending a note

Thanks in advance for the help, absolutely love this app!!

  • Rick

Ok so motion in office then turn lights on. Turn them off after 10 minutes of no motion but if a harmony activity is on, keep the lights on?

Use a Latching Piston:
IF - xxx motion is active
THEN - using xxx lights, turn on

BUT IF - xxx motion is inactive and xxx harmony activities are off
THEN - using xxx lights, wait 10min, turn off

Make sure to also check cancel on piston state change in task cancellation policy section.

1 Like

Edit: SOLVED - I just didn’t have the right wait time. I found that the system needed more time and it worked well after 4 seconds. If I go any shorter, it uses the previous variable value. I’m going on the assumption the system just needed more time to write to the variable space. Below is a picture of my setup, in the event someone is looking to do the same thing.

Hi Everyone,

I can use some help with the latest Piston I’m trying to configure. In short, I’m looking to control three dimmer switches via one virtual switch. Here is a bit more information…

Setup

  • I have three dimmers: Kitchen, Living Room, Breakfast Nook
  • I created a Simulated/Virtual Dimmer based on a custom device handler (see link below if curious). The new dimmer switch is called Main Floor Lights

Objective
Use the Main Floor Lights virtual dimmer to control the Kitchen, Living Room and Breakfast Nook dimmers. I want the percentage of dim to carry over to each of the three dimmers.

What I Have Tried

  1. I tried the Dim With Me SmartApp and it did not control the dimmers at all
  2. I created a CoRE Piston to change all three dimmers any time the Main Floor Lights switched was changed. I didn’t get the exact percentage to carry over, however. I used ranges to set the level. Basically, if the virtual dimmer was set to anything in the range of 1 - 33, I set all three switches to 25%. If the virtual switch was set from 34 to 66, I set all three to 50%. 66 - 80 = 75% and 80%+ = 100%. While this worked, this is not ideal.
  3. I tried creating a Piston that extracted the the state from the virtual switch and stored it in a local variable. I did this using the task: “Save state to variable” and grabbed the level. I named the variable mainFloorLightLevel. I then used “Load state from variable” for the three switches. This had unexpected results. Every time I changed the virtual dimmer level, the three dimmers got sent to the previous virtual dimmer level. For example: The virtual dimmer is set to 45%, I change it to 88%: all three dimmers get set to 45%. If I then change it to 27%, all three go to 88%. I thought the issue was due to both the level setting and the variable setting events happening at the exact same time, so I tried adding a wait before using the variable. No luck. I thought about a global variable, but I’m not even sure how to create one…

I have tried setting this up in so many ways, including follow-up Pistons and the like. Still no luck. When I get change, I’ll upload a picture of my current setup…even though it isn’t working.

Thanks for reading through. Thoughts?

Virtual Dimmer Custom Device Handler: How to create a virtual dimmer?

Dim with Me App: Dim With Me App Updated

Yes, it opens up the web browser.[quote=“cznkane, post:3846, topic:50187”]
Any ideas on how to get a weather report into CoRE?
[/quote]

I use Smart Weather Tile 2 and I have a piston setup to refresh the data every 15 minutes. From that you could use the data in you CoRE piston to send a push notification.

So any text you send to IFTTT will go through to your piston and execute?

Yeah, you can set IFTTT to filter if you want, but this is cool, already messing with people at home. It’s much easier to send a simple text than using Big Talker or other ST stuff. I seriously think my wife is going to take away my phone…

1 Like

Thanks! Ok set everything up as you have it. Will see how it goes. Only part I wasn’t sure on was the cancellation policy part. Where is that?

So smartthings does not do a great job of alerting me when a device fails to be connected to the network and I feel like thats an issue. Most of these devices are security or energy efficiency important so i’m motivated to build a piston which after any 24hrs of inactivity on any of selected devices, polls that device waits 5 minutes, and sends notification if not heard back. Has anybody done this already or is this something I’d be better off not using core to do?

1 Like

Appreciate the reply, any guesses as to why it’s not firing correctly on my iOS device? I’ve been looking through settings all morning and can’t find a reason why it wouldn’t work…thoughts?

Have you enabled OAuth for the SmartApp?

Yep. It’s essentially an SMS to Sonos app :wink:

Under your but if “then” scroll down to advanced options and you’ll see task cancellation policy. Youll need to change from none to cancel on piston state change. This will allows the 10 min timer to cancel and restart.