CoRE - Get peer assistance here with setting up Pistons

Hello all - This is my first piston - so I am guessing I am missing something basic :slight_smile:
i have written a latching piston, where if the temperature on a multipurpose sensor is greater than a certain value, a fan is turned on (if off). But-if temperature goes below a certain value the fan goes off (if on).
Currently the first condition is true (as per running stats) and the fan must go on, but its not. When I hit simulate inside the piston, it runs fine and the fan turns on. However outside of me going in and hitting simulate, the fan is not turned on. What am i missing? Do the pistons run once every few hours and so I have to wait for that to happen? I did a recover piston which did not cause the fan to go on and also from the dashboard paused and unpaused but that did not work either.
Any hints?

Please post a picture of the piston.

How to take a picture of a piston.
Open CoRE from the SmartApps menu.
Click on CoRE Dashboard (located at the top of app when you first open)
At the very bottom of the dashboard is the URL for the Dashboard Link that you can paste in your browser.
OAuth must be enabled for CoRE for this to work. Please see http://thingsthataresmart.wiki/index.php?title=CoRE#Enabling_OAuth
With the dashboard URL open in your browser, find and click the piston you want to share.
Click the three vertical dots on the right then click the Camera icon.
Right click on the image the pops up then save the image.

Here is the pic of the piston - only need it to execute when its night or away since its for our dog pen. It needs to go off when we come back home and let our dog out of his pen or temperature drops too low.

Edit - Never mind all good - its working now :smiley:

Thanks for the tip on trying the android emulator. Using MeMu, I successfully got past the youā€™re not authorized banner and was able to create my first piston! It even shows up on my Windows 10 Phone app but I still canā€™t edit any piston on my phone. I guess I have to create my pistons via the emulator as a workaround for now. There is an error message in the emulator ā€œUnfortunately, the process com.google.gapps has stoppedā€ but clicking ok button lets me continue to create the piston. Tried clearing google store cache/etc but still persists.

1 Like

Asleep mode is set by a routine. With a bit of fiddling Iā€™ve got it to work by setting hue rather than colour. Not sure why that makes a difference or if just reworking the piston sorted something out. Thanks for the suggestions.

Whag is the best piston to make so:
If contact open during Away mode, push notification.
If contact is still open push notification after 5m.

But I want to get notifications every 5m until it closes.

Might be a separate question:
How do I make it re-evaluate a rule without an actual trigger?

IF
   Mode is away
   AND
   Contact is open
THEN
   Using location...
      > Send notification
      > Follow up with piston (same) in 5 minutes

So I am having thermostat issues where if Alexa sets a temp, at times it is setting a permanent hold, resulting in the house turning into an oven.

Iā€™d like to create a Core that if the thermostat is set to a certain temp for say 3 hours, that it will notify me, and resume scheduleā€¦ I canā€™t seem to figure out how to set the time limitā€¦ I see where to set the if temp is 74, but donā€™t see how to say if temp is 74 for 3 hours thenā€¦

Hope u guys can helpā€¦

Thanks

Select the thermostat in an IF and choose the HeatSetPoint stays over X for Y minutes. You may need expert mode to be able to select the attribute.

How exactly do I do thisā€¦ I know what the syntax isā€¦ But I donā€™t see the options.

Do I set Piston mode to And if? Then when I choose thermosat i choose greater than 71, but dont see the time variable anywhere?

Isnā€™t there a stays comparison option?

Any way to have a button pushed that calls and plays an mp3 file through a webserver using Core? I tried using:

If button pushed
Then Make a web request

But Iā€™m not sure the method and content type I should be using.

Thanks

@ady624 Hi - I tried posting my question a few times, but havenā€™t gotten any responses so I thought maybe it was getting lost in all the posts. How can I make a rule that says ā€œif door sensor 1 changes to open and that same door sensor 1 has not been open within the past 4 hours then do somethingā€?

For instance we go in and out of a room a lot while it is being used. Then eventually we leave the room and donā€™t return until the next day or days later. I want to take certain actions when entering the room for the first time with each use. So I can assume that if the door hasnā€™t opened within the past 4 hours that things were already shut down and now that we are entering the room to start using it again I want to trigger some actions.

Thanks!

Iā€™ll make a suggestion before @ady624. One way I can see this being done (probably the long way) is that every time the door is opened, save the time in a variable and compare that time to the current time the door is openened next. Do the calculation on that variable to see how long since the last time it was open/closed then perform the tasks you want based on that.

If I am not mistaken, I believe the was condition was built with this in mind. I believe it will ignore the current just changed to state and will look at past. Try changes to open and was closed for at least 4 hours, see how that worksā€¦

Trying to get CoRE to take over the ā€œdoor left openā€ Sonos alerts that I used to have ā€œrayzurbockā€'s ā€œDoor Left Openā€ app handling ā€¦ but the audio notifications in that app just donā€™t work anymore (tried emailing him/her a while back, but never got a response).

This seemed like it should have been straightforward in CoRE, but I must be missing something. Hereā€™s my details:

Piston Mode: Basic
IF condition: "Front Door Sensor contact was open for at least 3 minutes"
THEN action: "Using Family Room Sonosā€¦ speak text ā€œThe front door has been left open. Please close it.ā€ at volume 35 and then resume.

If I test the action, the Sonos notification works - it interrupts whatever is playing, speaks the alert, then goes back to the station it was on.

Unfortunately, it doesnā€™t seem like the door left open triggers the action? I left the door open for 3 minutes and nothing happened. Whatā€™s even more interesting now, is now when I go back into the piston, the ā€œconditionā€ for that piston shows as true ā€¦ as in, the door was left open for 3 minutes at some point recently. So thatā€™s probably a 2nd problem, after the door has been shut again ā€¦ I need a way to reset that.

What am I missing?

Can I change modes with basic pistons? Iā€™ve got a very simple piston which works ā€¦ to notice when my wife leaves for work during weekday mornings, and then announce that over Sonos in my office ā€¦ and then (ideally) switch from ā€œHomeā€ to ā€œWork From Homeā€ mode.

The piston notices her departure just fine. It speaks to my office Sonos that sheā€™s left. But then I want to switch modes at home. But in terms of actions the only things I have under ā€œadd an actionā€ are to control lights, doors/garage doors/valves, shades, locks, cameras, sirens, thermostats/fans, music players/speech synthisizers, momentary switches, tone generators, timed sessions, consumables ā€¦ no ā€œset modeā€ option?

And then thereā€™s a ā€œcontrol any deviceā€ option ā€¦ but when I look at that and under ā€œSelect locationā€ it says there are no devices of this capability.

This seems so basic, Iā€™m sure itā€™s me thatā€™s missing something painfully obvious ā€¦

Select Using Location, set mode should be available under that.

Try with stays instead. was is the only condition that does not (yet) trigger a reevaluation when its time is up.

See if ā€œstays openā€ is available in the condition.