CoRE and Piston Rules Engine, first design steps

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:

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

Here is the answer from @ady624.

Ok, the reason the piston doesn’t do anything is because your piston has an IF condition that can’t be true when executed by IFTTT. The piston will only run when the routine runs. Do you need the piston to be run by both IFTTT and a routine? If so, consider adding a second trigger for the IFTTT capabiity, with an OR between the two conditions.

Works perfectly this way after editing my pistons. Now I can use one IFTTT Google Assistant applet to execute any piston.

Yeah, but this works in your context: your piston had a single trigger condition on the execution of a routine which obviously returned false when piston was run by other means than the routine itself executing. I recommend using an IFTTT trigger as it keeps the piston logic sane. Or you can always use a Do piston if you plan on executing it directly from IFTTT like you did. A Do piston has no conditions so it will just run :wink:

Did you post that earlier? In the one you posted, the last line in the image you posted only sets it true.

The IF sets it to true, the BUT IF sets it to false. Tap on the picture to open it fully.