CoRE - Get peer assistance here with setting up Pistons

Are you just getting the variable back as Null when you read it later like I am??


For some reason my master lights piston will usually always set the lights to 100% untill I press the house switch again then it re runs the piston and corrects itself.
I have this piston tied to a virtual switch that gets turned on by I’m home routine. Everything seems to work fine except for the level set point. Any suggestions

Is there a way, maybe using a loop, to check battery levels on any device using a battery? I know I can individually list each device, but I don’t want to have to add each new device to the piston as they come along.

Smart people in the room if i hve moved most of SHM to CoRE how would I go about there being a delay in the sirens going off/intrustion alert?

When my wife and i arrive sometimes the presence is delayed and by the time we open one of the doors an intrusion is detected and the siren goes off.

How can i avoid from happening at all and if that isnt possible, id deally like to run a routine i have called disarm?

Thanks in advance

I did it by creating a virtual switch and having ST turn it on. Then I have a piston that turns all lights on (when that switch is on), waits 20 minutes, turns them all off. You can start with a wait, then do whatever you want. Maybe use webCoRE? :smiley:

Can someone tell me why this global variable doesn’t get updated?
The one I’m referring to is @TimeOut.

It should be getting set to 480, and according to the logging the task runs, but the global never gets updated.

Does this have something to do with the fact that this piston is executed from an every block in another piston?

Such a simple thing, and yet why this doesn’t work is utterly effing baffling.

Driving, can’t test it right now. Are you sure nothing else is setting that variable? And what makes you think it does not change? Not sure the side bar in the editor updates in real time, check the variable list under the piston view, that refreshes with updated values every few seconds

More detail. This piston never gets executed by itself, only from 2 other pistons.

In one case the calling piston runs from an “every” block.
In the second case the calling piston executes based on a presence event.

Both cases seem to execute everything else in the piston above properly, and the logging on both types of runs shows a seemingly successful attempt to set the @TimeOut global, but in both cases @TimeOut fails to get updated with the new value.

I’ve reset @TimeOut to (not set) and the behavior is the same.

Any errors in the IDE? Also, in the IDE, go to Locations > events > from location. Any events there about @TimeOut?

Looking…

One other data point. If I delete @TimeOut and recreate it, the first run through sets it properly. Subsequent piston executions don’t modify it.

Interesting. I see two quick events in succession:

{
“id”: “:b300e0dd4e7736464f59af96b60fe2fb:”,
“name”: “Holman”,
“event”: “variable”,
“variable”: {
“name”: “@TimeOut”,
“oldValue”: 90,
“value”: 480,
“type”: “integer”
}
}

followed in a second by:

{
“id”: “:b300e0dd4e7736464f59af96b60fe2fb:”,
“name”: “Holman”,
“event”: “variable”,
“variable”: {
“name”: “@TimeOut”,
“oldValue”: 480,
“value”: 90,
“type”: “integer”
}
}

So either I have a piston that keeps setting it back, or something is up with WebCoRE?

Anything setting it to 90?

There is one piston setting it to 90, but it only sets it on a presence sensor absent event. That piston doesn’t get executed when the sensor becomes present.

I guess i have to test some more

Check its logs (enable them first)

WTF. now it seems to be working properly. I’ve made no changes.

Does the act of looking at the events in the IDE actually change the way it behaves???

I swear to god if this had been working I wouldn’t have been dicking around with it for the last 3 hours.

1 Like

I spoke too soon. This is still broken.

I see several globals that update in the IDE events list, but when I go back to WebCoRE they’re still showing old values.

Baby steps. Anything setting it to 90, logs to full, run and see if it sets it.

For example:

IDE shows as last event involving @TimeOut
{
“id”: “:b300e0dd4e7736464f59af96b60fe2fb:”,
“name”: “Holman”,
“event”: “variable”,
“variable”: {
“name”: “@TimeOut”,
“oldValue”: 40,
“value”: 480,
“type”: “integer”
}
}
date 2017-05-06 12:11:00.728 PM PDT (2017-05-06T19:11:00.728Z)

But WebCoRE dashboard shows: