[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Here’s logs of open and close events listed below. It does show like it’s executing the flash command but none of my hue lights do anything when flash command executes.

6/12/2017, 11:01:00 PM +733ms
+3ms ╔Received event [Front Door Sensor].contact = closed with a delay of 660ms
+608ms ║RunTime Analysis CS > 49ms > PS > 414ms > PE > 145ms > CE
+620ms ║Runtime (32306 bytes) successfully initialized in 414ms (v0.2.0bd.20170612) (615ms)
+621ms ║╔Execution stage started
+654ms ║║Comparison closed is open = false (9ms)
+657ms ║║Condition #4 evaluated false (21ms)
+660ms ║║Condition group #1 evaluated false (state did not change) (24ms)
+665ms ║╚Execution stage complete. (44ms)
+673ms ╚Event processed successfully (673ms)
6/12/2017, 11:00:59 PM +639ms
+1ms ╔Received event [Front Door Sensor].contact = open with a delay of 571ms
+202ms ║RunTime Analysis CS > 21ms > PS > 85ms > PE > 95ms > CE
+211ms ║Runtime (32295 bytes) successfully initialized in 85ms (v0.2.0bd.20170612) (209ms)
+213ms ║╔Execution stage started
+233ms ║║Comparison open is open = true (4ms)
+236ms ║║Condition #4 evaluated true (11ms)
+237ms ║║Condition group #1 evaluated true (state did not change) (14ms)
+241ms ║║Cancelling statement #2’s schedules…
+283ms ║║Executed physical command [Living Room Hue Light (by Front Door)].flash([2000, 2000, 5, null]) (25ms)
+284ms ║║Executed [Living Room Hue Light (by Front Door)].flash (28ms)
+289ms ║╚Execution stage complete. (76ms)
+297ms ╚Event processed successfully (298ms)

Is it really necessary to have the conditions be so drastic? You want them off at sunrise, right? Why only turn them off IF they are ON and IF they are at 20%? Why not just turn them off? The problem is the bulb says its switch is “turningOn”, not “on”, which is not according to standards. So the problem is with the hue bulb, the switch attribute never became “on”.

Can you please NOT close the door right away? What happens then? Leave the door open for say 10 seconds…

has something been changed in the last update to do with the “changed in the last” condition?
I have pistons set to use the “changed in the last” condition and they have worked exactly as expected up until last night after I updated to the current version v0.2.0bd. now whenever i check the TRACE it shows that the most recent trigger doesn’t update the Changed in the last count but the second trigger of the same piston does?

Is there an option anywhere to use something like “changed to ON in the last” or “Changed to OFF in the last”

appreciate all the help by the way :slight_smile:

I’ll try tonight when i get home, i did try that already before setting TCP to Never Cancel but don’t have the logs for that incident.

Not that I know, the last update did fix a bug with time though

So I’m not going to say whether this solution is better or worse than yours, but it’s a different way of getting a similar result with an AC unit that doesn’t have discrete power on/off commands, just a power toggle. The structure would be largely the same for you, just replace my http calls with your Outlet 5 instructions.

I created a Simulated Switch in My Devices named CJ AC 2 (Switch 15 in the screenshot) and in the piston itself have a variable that can be “on” or “off”.

If the CJ AC 2 turns on the variable get’s set to “on” and the http call fires. Same for off. If something sends CJ AC 2 the on command and it’s already “on”, then the piston does nothing.

I like this solution because it allows other applications/routines to interact with the AC unit without having to edit anything in WebCore.

edited several times for clarify

If you take out the to 24 will it trigger? i.e. will changing from scene to scene trigger anything at all?

If so, then something like this might work. I don’t have a dimmer with scenes, but in your case would be:

   dimmer eats scene changes
   dimmer eats scene was not 24 for the last 60 seconds
end if;

May I recommend:

on events from
   dimmer's scene
   switch (scene#)
      case 24:
          do whatever;
   end switch;
end on;

If the same event can repeat itself with no other events in between, I suggest staying away from “changes”, as that attribute obviously doesn’t technically change.

1 Like

Can you show some logs?

I originally assumed you were getting in a weird loop (and maybe you are) because that piston can effectively trigger itself, but when I tried to replicate I got things like this in the logs: Skipped execution of physical command [Play Room Lamp].on([]) because it would make no change to the device

So if WebCore is short circuiting like that then I would think you’d be ok. Try turning on parallel execution for the piston in piston settings.

Show piston settings with this:

And change this to Enabled:

Neat! I never noticed the On Event before.

1 Like

Yes, URL works fine from any browser in and out of Private mode.

ok, need some help. I have a piston that works my fan for auto on and auto off based on temp. Here is the issue, the auto part works fine, but I Have zero manual control. If I try to turn the fan off it turns right back on and if I try to turn it on it goes back off. How can I control it for auto and manual in Webcore? I have added the TEP, but that did not fix the issue.

I would suggest using a virtual override switch that you will use as one of the conditions of your piston. If override switch is on, piston doesn’t run.

1 Like

Thank you for the suggestion, how would I go about doing that? I know how to setup the switch, but how do I make it override the piston?

You can add it as a restriction or as one of your piston condition. Let me try and pull up your piston pic.

1 Like

hi all, this has probably been answered to death but because of the size of this thread… what’s the current best practice to actually pause a piston for x amount of time. can pause piston + wait + resume piston work if it’s doing it to itself? or what’s the correct way to do a variable comparison to $now - only run if you have not for 120 seconds, thanks

The only trick will be what do I tie the virtual switch too, to turn that on and off?

Hmm, you can turn it on and off just like any switch, do you use Alexa or GH?

1 Like

Ahh, that was it, Alexa it is, perfect, thank you.

1 Like