[DEPRECATED] webCoRE Beta Milestone 2

Awesome! That worked…thanks!

1 Like

I am having issues since the latest update with Pistons executing and ignoring restrictions. I’ve isolated the problem to pistons that have a duration trigger (IE: If lights are off for 5 minutes then…) kind of triggers. It’s currently 14:26 and the restrictions on my piston are for the Piston to only fire between 21:00 and 05:00 but it keeps executing.

At 14:17:41, a scheduled job is setup to run but shouldn’t be due to the time restrictions. Once that time hits, the piston runs and the Goodbye! routine is run

+600ms ║Setting up scheduled job for Wed, Aug 16 2017 @ 2:22:49 PM EDT (in 299.939s)

I’ve had this piston running this way without modification for over a month and this issue just started after upgrading webCoRE the other day to the latest version

Here are the logs and the piston itself:

16/08/2017, 14:22:48 +258ms
+1ms ╔Received event [Homelands].time = 1502907769040 with a delay of -783ms
+560ms ║RunTime Analysis CS > 145ms > PS > 98ms > PE > 317ms > CE
+579ms ║Runtime (39477 bytes) successfully initialized in 98ms (v0.2.0e5.20170812) (577ms)
+582ms ║╔Execution stage started
+614ms ║║Cancelling condition #11’s schedules…
+620ms ║║Condition #11 evaluated true (8ms)
+692ms ║║Comparison (enum) off is (string) off = true (5ms)
+701ms ║║Comparison (enum) off is (string) off = true (6ms)
+710ms ║║Comparison (enum) off is (string) off = true (5ms)
+717ms ║║Comparison (enum) off is (string) off = true (4ms)
+722ms ║║Comparison (enum) off is (string) off = true (3ms)
+728ms ║║Condition #15 evaluated true (106ms)
+730ms ║║Cancelling condition #4’s schedules…
+732ms ║║Condition group #4 evaluated true (state changed) (121ms)
+739ms ║║Cancelling statement #12’s schedules…
+794ms ║║Executed virtual command sendPushNotification (42ms)
+10236ms ║║Executed virtual command executeRoutine (9433ms)
+10241ms ║╚Execution stage complete. (9659ms)
+10250ms ╚Event processed successfully (10250ms)

16/08/2017, 14:17:48 +502ms
+1ms ╔Received event [Theatre Mood Light].switch = off with a delay of 259ms
+403ms ║RunTime Analysis CS > 88ms > PS > 78ms > PE > 237ms > CE
+413ms ║Runtime (39476 bytes) successfully initialized in 78ms (v0.2.0e5.20170812) (410ms)
+414ms ║╔Execution stage started
+431ms ║║Comparison (string) :e329209b02524180269aeacb19563898: is_any_of (string) :beaf06d1244cff657bfc5a964ce25c62:,:e329209b02524180269aeacb19563898: = true (4ms)
+433ms ║║Condition #1 evaluated true (11ms)
+450ms ║║Comparison (time) 51468937 is_between (time) 75600000 … (time) 18060000 = false (10ms)
+452ms ║║Condition #2 evaluated false (18ms)
+454ms ║║Condition group #null evaluated false (state did not change) (33ms)
+455ms ║║Piston execution aborted due to restrictions in effect
+473ms ║║Comparison (time) 51468962 is_between (time) 75600000 … (time) 18000000 = false (10ms)
+516ms ║║Comparison (enum) off stays (string) off = true (4ms)
+520ms ║║Comparison (enum) off stays (string) off = true (3ms)
+525ms ║║Comparison (enum) off stays (string) off = true (3ms)
+529ms ║║Comparison (enum) off stays (string) off = true (2ms)
+533ms ║║Comparison (enum) off stays (string) off = true (3ms)
+538ms ║║Adding a timed trigger schedule for condition 11
+570ms ║║Comparison (enum) off is (string) off = true (3ms)
+573ms ║║Comparison (enum) off is (string) off = true (2ms)
+577ms ║║Comparison (enum) off is (string) off = true (3ms)
+581ms ║║Comparison (enum) off is (string) off = true (3ms)
+585ms ║║Comparison (enum) off is (string) off = true (2ms)
+588ms ║║Cancelling condition #15’s schedules…
+597ms ║╚Execution stage complete. (184ms)
+600ms ║Setting up scheduled job for Wed, Aug 16 2017 @ 2:22:49 PM EDT (in 299.939s)
+619ms ╚Event processed successfully (620ms)

16/08/2017, 14:17:41 +176ms
+2ms ╔Received event [Theatre Mood Light].switch = on with a delay of 188ms
+699ms ║RunTime Analysis CS > 140ms > PS > 323ms > PE > 236ms > CE
+709ms ║Runtime (39477 bytes) successfully initialized in 323ms (v0.2.0e5.20170812) (706ms)
+710ms ║╔Execution stage started
+728ms ║║Comparison (string) :e329209b02524180269aeacb19563898: is_any_of (string) :beaf06d1244cff657bfc5a964ce25c62:,:e329209b02524180269aeacb19563898: = true (5ms)
+731ms ║║Cancelling condition #1’s schedules…
+732ms ║║Condition #1 evaluated true (12ms)
+748ms ║║Comparison (time) 51461909 is_between (time) 75600000 … (time) 18060000 = false (10ms)
+751ms ║║Condition #2 evaluated false (17ms)
+752ms ║║Condition group #null evaluated false (state did not change) (34ms)
+753ms ║║Piston execution aborted due to restrictions in effect
+772ms ║║Comparison (time) 51461934 is_between (time) 75600000 … (time) 18000000 = false (10ms)
+775ms ║║Cancelling condition #4’s schedules…
+822ms ║║Comparison (enum) off stays (string) off = true (3ms)
+826ms ║║Comparison (enum) off stays (string) off = true (3ms)
+831ms ║║Comparison (enum) off stays (string) off = true (2ms)
+835ms ║║Comparison (enum) on stays (string) off = false (2ms)
+839ms ║║Comparison (enum) off stays (string) off = true (3ms)
+844ms ║║Cancelling any timed trigger schedules for condition 11
+845ms ║║Cancelling statement #11’s schedules…
+846ms ║║Cancelling condition #11’s schedules…
+881ms ║║Comparison (enum) off is (string) off = true (3ms)
+885ms ║║Comparison (enum) off is (string) off = true (3ms)
+889ms ║║Comparison (enum) off is (string) off = true (3ms)
+893ms ║║Comparison (enum) on is (string) off = false (3ms)
+897ms ║║Cancelling condition #15’s schedules…
+906ms ║╚Execution stage complete. (196ms)
+914ms ╚Event processed successfully (914ms)

Who cares about timers when NFL :football: is at our doors? :roll_eyes:

Lol! I’m kidding, good reporting :smiley:

I’ll try to replicate tonight.

1 Like

I’m assuming that’s a typo? I only know about the NHL here in Canada but we still have a few months to go. Hopefully you’ll get a chance to take a look before winter hits :wink:

1 Like

I’m in Canada too so I get what you mean… I don’t have time to watch hockey anymore tho… season is too long, games too late, etc…

Also, I really can’t stand watching playoff games after mid-April… Winter is over and has Baseball started. I’m a big supporter of a 42 games/season from November to March with playoffs in April.

I just saw this post about different language option for texttospeech. Would it be possible to integrate this into Webcore?

Same problem

Hi,
I don’t know if it’s a webCoRE or ST problem but I have been having issues with my switches taking a while to fire over the last week. It seems to be because the status of the devices on ST is wrong IE my piston is quite basic but if the contact changes and the light is off turn it on, else turn it off. But I have noticed that on the app the light will say it’s on when it’s off and visa versa. So I was thinking ST but even when the status is correct it still is struggling. I have just tried adding in some refresh commands in before it does the condition but that didn’t help, whether I have done that correctly on not I don’t know.

I have ‘stateless’ light switches so I have command optimisation turned off.
Try that and see if it helps.

How do you do that?

just for reference

When you edit the piston, click on the name of the piston.
In the window that opens, click on the settings cog.
Here you will see command optimisation.
Turn it off.
This means that whatever state ST thinks the light is, the commands will be sent.
With command optimisation on, if ST and webCoRE think a light is on, it will not send the ON command.

Spot on found it, thanks I’ll give that a go :slight_smile:

@ady624:

I’m getting this error in logs in reference to the hasCommand in the webCoRE Piston Smartapp, not sure if this is an issue or not since I’m not seeing any issues from this error but wanted to report it just incase.

ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:08 PM: trace ║║ Executed virtual command setVariable (4ms)
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:08 PM: debug ║║ Calculating (integer) 1 + (integer) 1 >> (integer) 2
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:08 PM: debug ║║ Calculating (integer) 2 - (integer) 1 >> (integer) 1
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:08 PM: debug ║║ Calculating (integer) 2 - (integer) 1 >> (integer) 1
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:08 PM: debug ║║ Calculating (string) 65% + (string) 5376 >> (string) 65% 5376
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: error ║║ An error occurred while executing the event: java.lang.NullPointerException: Cannot invoke method hasCommand() on null object @ line 1579
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Calculating (string) 25 + (string) % >> (string) 25%
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Calculating (string) 25% + (string) 0 >> (string) 25% 0
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Calculating (string) 25 + (string) % >> (string) 25%
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Calculating (integer) 2 + (integer) 1 >> (integer) 3
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Cancelling statement #119’s schedules…
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: debug ║║ Cancelling statement #206’s schedules…
ce984a2b-a2ae-4b9d-96c3-c44e803a769e 9:35:03 PM: trace ║║ Executed virtual command setTile (2ms)

Here’s the Piston I’m getting this error on:

Hey did you ever figure this out!? Trying to write a simple piston with my BE469 lock specifically when unlocked via keypad. Thought I was making progress till I unlocked manually from inside and it still triggered the event. Didn’t think it would be so complicated! It’s gotta be possible.

I never did get it to work exactly as I wanted. I ended up creating a virtual switch, called “unlocked” or something like that. I set that button to turn on when door was opened with any code. I had a second virtual button called “Contractors”, I set that to turn on with only specific codes. When the door is manually locked I turn off the 1st virtual switch “Unlocked”, but if the contractors switch is also on I do other things, like re-arm my security system.

I use https://community.smartthings.com/t/release-door-lock-code-user-management-create-delete-and-schedule-codes-with-automatic-lock-unlock-custom-user-actions-and-shm-integration

To turn on and off the virtual switches, and WebCore to complete my actions.

1 Like

How do you specify a keypad unlock on webcore though? If you could share? I thought I had the attached setup working, but then discovered the action was still being triggered by manual unlocks.

Guys and Gals,

Most everyone has moved over to the WebCore site. You might have better luck over there with your issues

Here is the link to WebCore
Rick

I was unable to get it to work, so I used my device handler to turn on and off virtual switches. I then used the virtual switches to trigger actions in webcore.

I never went back to try again. As @Toy4Rick mentioned, if we continue this chain, lets do it on the updated thread, :slight_smile: