CoRE and Piston Rules Engine, first design steps

Makes sense. The variable to keep the lights working manually is a good idea. I’m thinking, though - could be wrong, the parent app isn’t being run if we are referring to the same thing. Essentially I have a large ‘Goodnight’ piston that runs, does a bunch of magic to the locks, lights, TV, etc., pauses the bedroom motion piston to keep lights from coming on every time we move and then sets the variable to 1. No other reference to the variable (besides the lights coming on) is made until morning when turning on a bathroom light signals awake and turn the variable back to 0.

Not using a location mode is simply because of my own short-sightedness when I originally set everything up. I have several other automation events via a node-red implementation, shell scripts via web calls, etc. that rely on a fixed set of modes that doesn’t include night. They are pretty integrated into environmental, presence etc… I’m lazy and don’t want to redo them all is the simple answer… :slight_smile:

Time of day is difficult simply because the goodnight routine might happen at 11pm, 3pm or 4am depending on the house schedule.

Now that I’m done with the excuses I’ll try the virtual switch, didn’t even cross my mind, and look at pulling out a piston and running it against a location mode temporarily to see if that makes a difference. If so I’ll just have to not be lazy… it’s also possible it’s the Zooz sensor but it ‘seems’ to be pretty repeatable.

What sets {autoKitchenLights} back to false?

Second last task in the last action

Question, will CoRE eventually work offline? I know ST has to whitelist specific apps. My internet stops working regularly and it would be preferred that my pistons continue to run offline, maybe even setting one up to automatically reboot my modem. Appreciate any info.

How do you switch the state of a global bool variable? I couldn’t figure that one out yesterday. Anyone?

The short answer is NO, the loger answer is never, but @slagle might have a different opinion, who knows…

If I’m understanding it correctly. I created a DO piston that sets/alters variable values, like the one below, I just edit the variable name and value I want.

Using location...
► Set boolean variable {@lockUnlockedTimeVarSet} = false
1 Like

I think I tried that but it didn’t work. Ill try again. Was thinking that it must be a way to select the global variable I want to update rather than keying it… Thanks though!

Ah, yep, I think I did try to edit directly but couldn’t and I didn’t want to delete and reset the variable so I ended up doing that DO piston. I really haven’t used it much so it wasn’t such a pain… yet :smiley:

This is probably a pretty simple piston idea.

I am trying to setup a piston with a Virtual Dimmer device handler I just added through the IDE. I’d like when the Virtual Dimmer changes, 2 physical light bulbs use the same settings (level and switch).

The level adjusts to match the virtual dimmer almost instantly, however turning off/on the virtual dimmer doesn’t change the physical switches. I can see the switch variable changing correctly. Did I use the wrong option for this task? Would this be better written in a different way not using variables?

so my motion light goes on when wind speeds hit a certain level so I want to shut off the switch if it reaches above X. However looking at CoRe values for gust and windspeed you cant us less than equal to or between. any suggestions?

So no one has done anything with wind speed?

I have not tried what you’re doing but if in between in not available, you can try saving wind speed value to a variable and then use the variable capability to check if it’s within.your target range.

yep that is what I am trying. First time I had to do this so we will see how it works

I need help using a web request. I’m using /execute/pistonname. The piston is activated in the dashboard but does not perform the tasks. What am I doing wrong? Is this a bug? Can someone confirm this works for them?

Post a picture of your piston.

It’s not working on any of my pistons. All of my pistons are working correctly from the SmartThings app but won’t work when I send the command even though they say they are working in the dashboard. Here is one of my pistons

After I send /execute/goodbye

Piston is running.
Piston state changed to false 17 seconds ago.
Last accepted event was a execute event, 18 seconds ago.
Piston uses 1 trigger and has subscribed to 1 device.

debug ║ Received an API execute request for piston ‘goodbye’ with data: [:]

I’ve only used Maker and IFTTT for web requests. I’d recommend Ace Developer/CoRE Mastermind @ady624 add his two cents…

Or, try asking in the CoRE - Get peer assistance here with setting up Pistons discussion…

I have several pistons making web requests. Are you trying to make a local call to a service on your LAN? Your piston for your routine looks ok from what I can see. I second @Lisa_262 about posting in the help forum and also see if @ady624 has any thoughts as well.

I’m making an outside request trying to trigger a piston to run

This is what I use:
https://graph-na02-useast1.api.smartthings.com/api/token/mytokenhere/smartapps/installations/appidhere/execute/pistonname

You can see what happens to the piston in my above post. It states it received the execute event but it changes to false. I’m not even sure if this is supposed to work.
I’ll reach out to @ady624