CoRE - Get peer assistance here with setting up Pistons

I was thinking about a virtual switch, but the logic is evading me.

I definitely would prefer to be able to control it using the widgets on phone or watch. I would also prefer it to be a single button “Garage door” or something similar.

Problem with Routines is that there is only the ability to Open OR close the door. So if I did a virtual switch with CORE, its still similar as in , the Routine can either turn a switch on or off.

So if I did something like IF Switch is turned ON, toggle Garage door, that would work, either open or close the door, but then the switch is on. So if I run the routine again via the widget, it would not do anything. Maybe a momentary switch?

I’d prefer not to have to do an auto close after x minutes. Basically I’m looking to duplicate the dumb RF garage button. Press it the door opens, press it again, and it closes.

do this, set up the routine to toggle a switch on… this will open or close the garage door (depending on current state)when that switch is toggled on.

Then within CORE, setup a piston that says, IF switch X is on, then wait 10 seconds and then turn off…

you can run the routine to toggle your switch on when you push the button and CORE will automatically turn it off.

I just tested it and it works flawlessly.

1 Like

Thanks, this helped. I ended up creating a “Momentary Button Tile” button. Labeled it Garage door opener. Used routine to turn on the switch. Used core to toggle the garage door when the “Garage door opener” switch is turned on. Works great so far in my couple of test runs, and saves me the step to wait 10 seconds and turn off. :slight_smile:

If you have an open/close sensor attached to the door, add it in your conditions as a backup to make sure you’re not opening when you’re supposed to be closing (or the reverse).

I do have a sensor. What would the “backup” be used for? I’m using a “toggle” action for the garage door, so it opens if it is closed, or closes if it was open. So far the only issue I’ve had, is it seems like there must be a “safety” timer in the linear garage door control If I try to close it within one minute of opening, it ignores the command. I think I will probably never have that situation under normal circumstances, just during my testing.

Thanks @ady624!

How do I use Smart Weather with CoRE? When I select “Sensor” as the capability, I’m not sure where to find and use the device attributes like wind, etc.

You can use Save Attribute to variable, something like below:

Using WeatherTile...
► Save attribute '⌂ wind' to variable {windSpeed}'

I’m using a Routine through CoRE to do exactly what you’re talking about. I have it do a few other things as well, and I have a smart button on my bicycle so I can openand close it as well, but basically the piston just opens or closes the door based on whatever state the door is in when the piston runs. See below. I set a restriction for the piston to only run in Home mode, as a bit of added security.


BTW, I wanted to report that the momentary switch is working great

I found the Toggle option for the garage door works Great. Saves you from having to have the logic about checking if the door is open or closed. I have other alerts set up to notify me if the door is left open for more than X minutes, which covers me if I make a mistake on this or any other garage door piston, or even manually opened.

Can you tell me which IFTTT recepie you use for the txt to turn on/off a button. I want to do this as well. Pretty cool

Still looking for help (probably from @ady624) about how to do two things…

A. Actually pass variables from IFTTT Maker into CoRE. Haven’t seen anything in IFTTT trigger to execute a CORE piston with maker channel? that really helps, or in this thread either.

I’ve got an IFTTT Maker event that has the right URL (with /ifttt/MakerCoreTest01 at the end) and method is POST, content type is application/json, body is the “Title” ingredient. Then in the title (I’m using Google Calendar as the IFTTT trigger) I’ve got a string: TestMakerEntry {var1: 50, var2: 75}

I’ll change the trigger and string later as needed for “production” - I’m just trying to test things now. Problem is, I can’t find any way to get that data - the var1 = 50 and var2 = 75 - anywhere into CoRE. I don’t see it in any variable, in any state of the piston, etc. What am I missing? Google has not been my friend on this; no answers anywhere I’ve been able to find, but I figure it’s something super simple that’s right in front of my face I’m just missing.

B. Could be a device problem, but my Pearl Centralite thermostat is all kinds of finicky. When setting “modes” (heat, cool, off, auto) it has to be in a piston with command optimizations disabled. When settings heating setpoints or cooling setpoints, it has to be a different piston because it has to have command optimizations enabled to work. That said, I’ve got it all working flawlessly right now, but all the temperatures - albeit there’s a bunch of them depending on “mode” I’ve got the system in - are still hard coded into pistons as setpoints. My eventual goal is to make the temperatures in the Google Calendar title (instead of var1 and var2 it’d be “HeatOn” and “CoolOn” or something like that when I’m done), but after experimentation all day yesterday, I couldn’t make “Load attribute from variable” and “heatingSetpoint” (or any setpoint) work AT ALL with any value loaded in a variable. I tried local variables, global variables, etc., etc., and it would never update any setpoints on the thermostat.

What do you need me to post to help diagnose this problem, because given the other issues with this thermostat, I assume it’s something you’ll need to debug.

Also, I know the piston is firing; I have the trigger capability of “IFTTT” with a comparison of “executes” and the [MakerCoreTest01] value, and I have it SMS me “$var1”

Unfortunately, I get $var1 on my phone, not “50”

Well, I removed the switch from my system, re-added it back into everything and it worked :)… for 1 day, didn’t work again this morning, so my wife turned it on manually

The same Piston that is designed to turn it on, does in fact turn it off 120 mins later

I’m beginning to think maybe the switch is bad and needs to be replaced???

Back to the drawing board
Rick

I created my own. In the IFT ATT app.

Found my own problem with the importing variables.

Three issues:

The first one, I’m not sure if it mattered, but I didn’t have the local variables initialized in the piston. I was using global variables instead.

Two, the JSON wasn’t accurate. {var1: 50, var2: 75} doesn’t work. {“var1”:“50”,“var2”:“75”} does work.

Three, the trigger needs to have “import event data on true” turned on (default to off when making a new piston.

Now, I’m getting my IFTTT ingredients imported as variables.

Still can’t set the Centralite Pearl thermostat temperature with a variable yet… Working on it.

I believe the load attrib from variable with thermostats is a known issue. I’ve seen it come up a few times with no solution. I think Adrian mentioned something about it just recently, so I’ll see if I can find it.

Edit: Also with the work he’s doing on webcore, I think this is probably not going to get addressed anymore since webcore will be it.

2 Likes

Do not call the vars with $ in front - those are system variables and won’t be “imported”. Drop the $ and try again. You can also use an import prefix to make sure variables won’t overwrite what you already have. Say, ifttt_ would make the variable name ifttt_var1. I believe it would also fix the issue with the $ (if you cannot remove it), making it ifttt_$var1 which should be a valid name.

1 Like

Please share in detail how you got all this to work. I’m not understanding where you are putting your variables and the format you are using. For example you say you have a string of variables, but where and in what format did you place them?

Thank you.