Intermittent Piston issues


#1

Hey all!

I recently migrated over from ST and brought over many of my webcore pistons and i’ve been running into some issues where a daily piston is executing in WC but not actually turning off lights.

i have a few lights i keep on from sunset to sunrise and they turn on fine, but occasionally the morning piston does not turn them off. the logging shows them turning things off but the device logs show no trace of being sent the commands. i’ve turned on full debug on those switches and none of them are showing anything received either in the logs nor in the events for that time frame.

here’s the webcore log out of the hubitat logs:

Summary
  app:2342021-01-07 08:01:01.684 am debugReleased Lock and exiting
app:2342021-01-07 08:01:01.650 am info ░╔ Event processed successfully (1282ms)
app:2342021-01-07 08:01:01.647 am info ░║ Setting up scheduled job for Fri, Jan 8 2021 @ 8:01:00 AM CST (in 86398s)
app:2342021-01-07 08:01:01.600 am info ░║╔ Execution stage complete. (1145ms)
app:2342021-01-07 08:01:01.594 am trace░║║ Executed [run sunrise].off (8ms)
app:2342021-01-07 08:01:01.592 am debug ║║ Skipped execution of physical command [run sunrise].off([]) because it would make no change to the device. (5ms)
app:2342021-01-07 08:01:01.583 am debug ║║ Cancelling statement #19's schedules...
app:2342021-01-07 08:01:01.580 am trace░║║ Executed [Living Room Shade Right].open (17ms)
app:2342021-01-07 08:01:01.577 am debug ║║ Executed physical command [Living Room Shade Right].open() (14ms)
app:2342021-01-07 08:01:01.560 am trace░║║ Executed [Living Room Shade Middle].open (18ms)
app:2342021-01-07 08:01:01.558 am debug ║║ Executed physical command [Living Room Shade Middle].open() (14ms)
app:2342021-01-07 08:01:01.540 am trace░║║ Executed [Living Room Shade Left].open (42ms)
app:2342021-01-07 08:01:01.538 am debug ║║ Executed physical command [Living Room Shade Left].open() (39ms)
app:2342021-01-07 08:01:01.495 am debug ║║ Cancelling statement #17's schedules...
app:2342021-01-07 08:01:01.492 am debug ║║ Skipping task 16 because of mode restrictions
app:2342021-01-07 08:01:01.489 am debug ║║ Cancelling statement #15's schedules...
app:2342021-01-07 08:01:01.485 am trace░║║ Executed [Upper Landing Steplight].off (20ms)
app:2342021-01-07 08:01:01.483 am debug ║║ Executed physical command [Upper Landing Steplight].off() (17ms)
app:2342021-01-07 08:01:01.462 am trace░║║ Executed [son of numbers sign].off (14ms)
app:2342021-01-07 08:01:01.460 am debug ║║ Skipped execution of physical command [son of numbers sign].off([]) because it would make no change to the device. (11ms)
app:2342021-01-07 08:01:01.445 am trace░║║ Executed [Porch Light].off (18ms)
app:2342021-01-07 08:01:01.442 am debug ║║ Skipped execution of physical command [Porch Light].off([]) because it would make no change to the device. (14ms)
app:2342021-01-07 08:01:01.424 am trace░║║ Executed [Master Bath Closet Overhead].off (14ms)
app:2342021-01-07 08:01:01.422 am debug ║║ Executed physical command [Master Bath Closet Overhead].off() (11ms)
app:2342021-01-07 08:01:01.408 am trace░║║ Executed [Lower Landing Steplight].off (20ms)
app:2342021-01-07 08:01:01.406 am debug ║║ Executed physical command [Lower Landing Steplight].off() (17ms)
app:2342021-01-07 08:01:01.385 am trace░║║ Executed [Kitchen Display Cases].off (78ms)
app:2342021-01-07 08:01:01.324 am debug ║║ Executed physical command [Kitchen Display Cases].off() (15ms)
app:2342021-01-07 08:01:01.304 am trace░║║ Executed [Kitchen Counter].off (19ms)
app:2342021-01-07 08:01:01.302 am debug ║║ Executed physical command [Kitchen Counter].off() (16ms)
app:2342021-01-07 08:01:01.280 am debug ║║ Cancelling statement #13's schedules...
app:2342021-01-07 08:01:01.276 am trace░║║ Executed [Master Bath Commode].off (18ms)
app:2342021-01-07 08:01:01.274 am debug ║║ Executed physical command [Master Bath Commode].off() (15ms)
app:2342021-01-07 08:01:01.254 am trace░║║ Executed [Master Bath Closet Overhead].off (42ms)
app:2342021-01-07 08:01:01.252 am debug ║║ Executed physical command [Master Bath Closet Overhead].off() (35ms)
app:2342021-01-07 08:01:00.694 am trace░║║ executeTask: Waiting for 500ms
app:2342021-01-07 08:01:00.692 am trace░║║ Executed virtual command [Master Bath Closet Overhead, Master Bath Commode].wait (1ms)
app:2342021-01-07 08:01:00.685 am trace░║║ Executed [Master Bath Commode].setLevel (23ms)
app:2342021-01-07 08:01:00.682 am debug ║║ Executed physical command [Master Bath Commode].setLevel([70], ) (20ms)
app:2342021-01-07 08:01:00.659 am trace░║║ Executed [Master Bath Closet Overhead].setLevel (83ms)
app:2342021-01-07 08:01:00.655 am debug ║║ Executed physical command [Master Bath Closet Overhead].setLevel([70], ) (78ms)
app:2342021-01-07 08:01:00.566 am debug ║║ Cancelling statement #5's schedules...
app:2342021-01-07 08:01:00.563 am debug ║║ Condition group #1 evaluated true (state did not change) (104ms)
app:2342021-01-07 08:01:00.558 am debug ║║ Requesting time schedule wake up at Fri, Jan 8 2021 @ 8:01:00 AM CST
app:2342021-01-07 08:01:00.546 am debug ║║ Cancelling statement #4's schedules...
app:2342021-01-07 08:01:00.542 am debug ║║ Condition #4 evaluated true (83ms)
app:2342021-01-07 08:01:00.539 am debug ║║ Time restriction check passed
app:2342021-01-07 08:01:00.536 am debug ║║ Comparison (time) 28860000 happens_daily_at  (time) 28260000 = true (0ms)
app:2342021-01-07 08:01:00.455 am info ░║╚ Execution stage started
app:2342021-01-07 08:01:00.446 am trace░║ Runtime (7461 bytes) successfully initialized in 65ms (v0.3.110.20201015_HE)
app:2342021-01-07 08:01:00.440 am debug ║ RunTime initialize > 103 LockT > 1ms > rtDT > 65ms > pistonT > 64ms (first state access 37 37 66)

#2

Post the piston also so folks may be able to give suggestion on maybe optimizing it to avoid those kind of issues.


#3
/**************************************************************/
/* Sunrise night lights  off                                  */
/**************************************************************/
/* Author     : spike                                         */
/* Created    : 9/7/2020, 5:37:42 PM                          */
/* Modified   : 1/4/2021, 5:00:19 PM                          */
/* Build      : 10                                            */
/* UI version : v0.3.110.20191009                             */
/**************************************************************/
 
execute
if
 
Time happens daily at 10 minutes past sunrise
or
 
run sunrise's switch changes to on
then
with
Master Bath Closet Overhead and Master Bath Commode
do
  Set level to 70%;
  Wait 500 milliseconds;
  Turn off;
end with;
with
Kitchen Counter, Kitchen Display Cases, Lower Landing Steplight, Master Bath Closet Overhead, Porch Light, son of numbers sign, and Upper Landing Steplight
do
  Turn off;
end with;
Set location mode to Home (only while Night);
with
Living Room Shade Left, Living Room Shade Middle, and Living Room Shade Right
do
Open;
end with;
with
run sunrise
do
  Turn off;
end with;
end if;
end execute;