Remote Button Held


#1

Greetings! Using a button remote successfully to turn on/off lights via button push. Have been trying off and on for some time to achieve dimming lights via button held.

I’ve tried a few different ways to code the piston to do so but kept running into the piston sleeping on a semaphore. The results were erratic and nondeterministic.

Was attempting to step the dim by some x% and keep dimming during the button hold until reaching 0% and then cycle back to 100% and again back to 0%, etc. as long as the button was being held.

As I mentioned as the piston was put to sleep by the semaphores and the dimming action would either lag or jump unpredictably to some dimming percentage. I was hoping for a smooth dimming action.

Am reaching out to other WebCoRE piston heads to see what suggestions or avenues could be pursued to get smooth dimming action on a button held condition.

Thank you.


#2

Not exactly what you are looking for but maybe try something like
If button held
Then
Adjust level -10%

No idea if this will work but something to try


#3

have you already confirmed that holding on to the button continues to generate multiple button held events or it only produces one held event, no matter how long the button is held?


#4

Remote Device - List Events: (Times don’t match; logs from a repeat)

Date Source Type Name Value User Displayed Text
2017-08-23 8:29:04.003 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:03.356 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:03.766 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:03.143 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:03.565 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:01.679 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:01.928 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held
2017-08-23 8:29:02.095 PM EDT
moments ago DEVICE button held Remote_R2_LivingRoom button 6 was held


Logs: (Times don’t match; logs from a repeat)

16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:03 PM: warn ║ Piston waited at a semaphore for 3052ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:03 PM: warn ║ Piston waited at a semaphore for 1027ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:03 PM: warn ║ Piston waited at a semaphore for 1909ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:02 PM: warn ║ Piston waited at a semaphore for 1275ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:01 PM: warn ║ Piston waited at a semaphore for 763ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:00 PM: warn ║ Piston waited at a semaphore for 2026ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:33:00 PM: warn ║ Piston waited at a semaphore for 2183ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:32:59 PM: warn ║ Piston waited at a semaphore for 1269ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:32:59 PM: warn ║ Piston waited at a semaphore for 896ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:32:57 PM: warn ║ Piston waited at a semaphore for 765ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:32:57 PM: warn ║ Piston waited at a semaphore for 797ms
16b9d322-7c52-4b19-b3a4-f833b74be930 8:32:57 PM: warn ║ Piston waited at a semaphore for 1010ms


#5

sweet! what kind of a button is it? i need to buy a couple :slight_smile:

as for smooth dimming, care to share the piston you have? might be easier to make comments with something in front. but, apps on ST are only allocated so many seconds of continuous runtime before control reverts back. that makes it harder to emulate hardware level smooth dimming through a piston. but if you share a snapshot of the piston, we can look at whats possible.


#6

REMOTEC ZRC-90 SCENE MASTER (16 button, each as two button numbers)


Getting Held on a button to dim a light
#7

thank you, thats very cool.

the held events are arriving 2 or 3 events per second. thats causing the events to wait at the piston’s queue till they can be processed, which is why the semaphore wait messages.

are you willing to consider using held for turning on/off the light and pushed for increasing/decreasing the light? if yes, i might have an idea for a piston that will act functionally more like you want it to without significant delays from semaphore waits and corresponding lags.


#8

I stole this one a while ago when asking if someone had anything for the ZRC90. It has worked flawlessly for me.
Sorry I can’t remember who was…maybe robin (yes it was).


Here is his orig: 4hdfv


#9

thank you for sharing that from @Robin

if you hold on to any of the ZRC90 buttons, not just hold and release but hold on to it say for 10 seconds, like @james use case requires, do you see any semaphore waits in the piston logs?


#10

Haven’t checked that. It works for me so I had no need to, but I can check.


#11

please.


#12

Here is ST logs:
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
2017-08-24 6:41 PM EDT - moments ago button held
Here is webCore:
8/24/2017, 6:41:52 PM +121ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 1172ms
+12790ms ║RunTime Analysis CS > 35ms > PS > 12463ms > PE > 292ms > CE
+12798ms ║Piston waited at a semaphore for 12319ms
+12802ms ║Runtime (57624 bytes) successfully initialized in 12463ms (v0.2.0e5.20170812) (12800ms)
+12804ms ║╔Execution stage started
+12826ms ║║Comparison (enum) held gets (string) pushed = false (1ms)
+12829ms ║║Condition #47 evaluated false (13ms)
+12830ms ║║Condition group #46 evaluated false (state did not change) (15ms)
+12850ms ║║Comparison (enum) held gets (string) held = true (7ms)
+12852ms ║║Condition #65 evaluated true (16ms)
+12854ms ║║Condition group #64 evaluated true (state did not change) (18ms)
+12859ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+12864ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+12868ms ║║Cancelling statement #122’s schedules…
+12885ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (6ms)
+12886ms ║║Executed [Corner Cabinet Light].setLevel (10ms)
+12896ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (7ms)
+12898ms ║║Executed [Kitchen Table Light].setLevel (8ms)
+12907ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (6ms)
+12908ms ║║Executed [Refrigerator Light].setLevel (8ms)
+12919ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (8ms)
+12921ms ║║Executed [Sink Light].setLevel (10ms)
+12931ms ║║Skipped execution of physical command [Stove Light].setLevel([1]) because it would make no change to the device. (6ms)
+12932ms ║║Executed [Stove Light].setLevel (8ms)
+12952ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (5ms)
+12955ms ║║Condition #92 evaluated false (14ms)
+12956ms ║║Condition group #91 evaluated false (state did not change) (16ms)
+12961ms ║║Cancelling statement #132’s schedules…
+12980ms ║║Calculating (string) button + (string) # >> (string) button #
+12985ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+12990ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+12994ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+13003ms ║║Calculating (string) b, + (string) red >> (string) b, red
+13008ms ║║Calculating (string) >> (string)
+13014ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+13018ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+13022ms ║║Executed virtual command setState (1ms)
+13025ms ║╚Execution stage complete. (222ms)
+13033ms ╚Event processed successfully (13033ms)
8/24/2017, 6:41:52 PM +125ms
+1ms ╔Received event [Remote Buttons].button = held with a delay of 1266ms
+6882ms ║RunTime Analysis CS > 35ms > PS > 6467ms > PE > 380ms > CE
+6890ms ║Piston waited at a semaphore for 6393ms
+6895ms ║Runtime (57618 bytes) successfully initialized in 6467ms (v0.2.0e5.20170812) (6892ms)
+6897ms ║╔Execution stage started
+6923ms ║║Comparison (enum) held gets (string) pushed = false (2ms)
+6926ms ║║Condition #47 evaluated false (12ms)
+6927ms ║║Condition group #46 evaluated false (state did not change) (15ms)
+6945ms ║║Comparison (enum) held gets (string) held = true (3ms)
+6948ms ║║Condition #65 evaluated true (14ms)
+6949ms ║║Condition group #64 evaluated true (state did not change) (16ms)
+6955ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+6963ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+6968ms ║║Cancelling statement #122’s schedules…
+6989ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (8ms)
+6990ms ║║Executed [Corner Cabinet Light].setLevel (10ms)
+7007ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (8ms)
+7008ms ║║Executed [Kitchen Table Light].setLevel (12ms)
+7019ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (6ms)
+7020ms ║║Executed [Refrigerator Light].setLevel (8ms)
+7032ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (7ms)
+7033ms ║║Executed [Sink Light].setLevel (9ms)
+7044ms ║║Skipped execution of physical command [Stove Light].setLevel([1]) because it would make no change to the device. (8ms)
+7046ms ║║Executed [Stove Light].setLevel (9ms)
+7070ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (5ms)
+7073ms ║║Condition #92 evaluated false (14ms)
+7075ms ║║Condition group #91 evaluated false (state did not change) (18ms)
+7083ms ║║Cancelling statement #132’s schedules…
+7119ms ║║Calculating (string) button + (string) # >> (string) button #
+7126ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+7132ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+7139ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+7150ms ║║Calculating (string) b, + (string) red >> (string) b, red
+7159ms ║║Calculating (string) >> (string)
+7168ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+7175ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+7183ms ║║Executed virtual command setState (2ms)
+7188ms ║╚Execution stage complete. (292ms)
+7196ms ╚Event processed successfully (7196ms)
8/24/2017, 6:41:51 PM +696ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 1196ms
+6336ms ║RunTime Analysis CS > 99ms > PS > 5691ms > PE > 546ms > CE
+6344ms ║Piston waited at a semaphore for 5614ms
+6347ms ║Runtime (57618 bytes) successfully initialized in 5691ms (v0.2.0e5.20170812) (6344ms)
+6348ms ║╔Execution stage started
+6368ms ║║Comparison (enum) held gets (string) pushed = false (2ms)
+6371ms ║║Condition #47 evaluated false (11ms)
+6372ms ║║Condition group #46 evaluated false (state did not change) (14ms)
+6390ms ║║Comparison (enum) held gets (string) held = true (5ms)
+6393ms ║║Condition #65 evaluated true (14ms)
+6394ms ║║Condition group #64 evaluated true (state did not change) (17ms)
+6399ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+6405ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+6409ms ║║Cancelling statement #122’s schedules…
+6426ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (6ms)
+6427ms ║║Executed [Corner Cabinet Light].setLevel (8ms)
+6437ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (7ms)
+6438ms ║║Executed [Kitchen Table Light].setLevel (9ms)
+6448ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (6ms)
+6450ms ║║Executed [Refrigerator Light].setLevel (8ms)
+6461ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (7ms)
+6462ms ║║Executed [Sink Light].setLevel (9ms)
+6472ms ║║Skipped execution of physical command [Stove Light].setLevel([1]) because it would make no change to the device. (7ms)
+6473ms ║║Executed [Stove Light].setLevel (9ms)
+6487ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (2ms)
+6489ms ║║Condition #92 evaluated false (8ms)
+6490ms ║║Condition group #91 evaluated false (state did not change) (11ms)
+6495ms ║║Cancelling statement #132’s schedules…
+6514ms ║║Calculating (string) button + (string) # >> (string) button #
+6519ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+6524ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+6528ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+6537ms ║║Calculating (string) b, + (string) red >> (string) b, red
+6542ms ║║Calculating (string) >> (string)
+6547ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+6551ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+6555ms ║║Executed virtual command setState (1ms)
+6558ms ║╚Execution stage complete. (210ms)
+6567ms ╚Event processed successfully (6568ms)
8/24/2017, 6:41:55 PM +213ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 1141ms
+1547ms ║RunTime Analysis CS > 39ms > PS > 1197ms > PE > 311ms > CE
+1665ms ║Piston waited at a semaphore for 1135ms
+1668ms ║Runtime (57618 bytes) successfully initialized in 1197ms (v0.2.0e5.20170812) (1666ms)
+1670ms ║╔Execution stage started
+1688ms ║║Comparison (enum) held gets (string) pushed = false (2ms)
+1690ms ║║Condition #47 evaluated false (10ms)
+1692ms ║║Condition group #46 evaluated false (state did not change) (12ms)
+1706ms ║║Comparison (enum) held gets (string) held = true (2ms)
+1708ms ║║Condition #65 evaluated true (11ms)
+1709ms ║║Condition group #64 evaluated true (state did not change) (13ms)
+1714ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+1719ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+1723ms ║║Cancelling statement #122’s schedules…
+1738ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (6ms)
+1739ms ║║Executed [Corner Cabinet Light].setLevel (7ms)
+1748ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (6ms)
+1749ms ║║Executed [Kitchen Table Light].setLevel (7ms)
+1756ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (4ms)
+1757ms ║║Executed [Refrigerator Light].setLevel (6ms)
+1767ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (6ms)
+1767ms ║║Executed [Sink Light].setLevel (8ms)
+1776ms ║║Skipped execution of physical command [Stove Light].setLevel([1]) because it would make no change to the device. (6ms)
+1777ms ║║Executed [Stove Light].setLevel (7ms)
+1791ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (3ms)
+1793ms ║║Condition #92 evaluated false (9ms)
+1795ms ║║Condition group #91 evaluated false (state did not change) (11ms)
+1800ms ║║Cancelling statement #132’s schedules…
+1820ms ║║Calculating (string) button + (string) # >> (string) button #
+1825ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+1831ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+1835ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+1847ms ║║Calculating (string) b, + (string) red >> (string) b, red
+1854ms ║║Calculating (string) >> (string)
+1859ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+1864ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+1868ms ║║Executed virtual command setState (1ms)
+1872ms ║╚Execution stage complete. (202ms)
+1878ms ╚Event processed successfully (1878ms)
8/24/2017, 6:41:55 PM +735ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 1236ms
+943ms ║RunTime Analysis CS > 31ms > PS > 640ms > PE > 271ms > CE
+951ms ║Piston waited at a semaphore for 580ms
+954ms ║Runtime (57612 bytes) successfully initialized in 640ms (v0.2.0e5.20170812) (952ms)
+956ms ║╔Execution stage started
+973ms ║║Comparison (enum) held gets (string) pushed = false (2ms)
+975ms ║║Condition #47 evaluated false (9ms)
+977ms ║║Condition group #46 evaluated false (state did not change) (11ms)
+990ms ║║Comparison (enum) held gets (string) held = true (3ms)
+992ms ║║Condition #65 evaluated true (10ms)
+993ms ║║Condition group #64 evaluated true (state did not change) (12ms)
+998ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+1003ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+1007ms ║║Cancelling statement #122’s schedules…
+1021ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (5ms)
+1023ms ║║Executed [Corner Cabinet Light].setLevel (7ms)
+1031ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (6ms)
+1032ms ║║Executed [Kitchen Table Light].setLevel (7ms)
+1041ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (5ms)
+1042ms ║║Executed [Refrigerator Light].setLevel (7ms)
+1052ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (6ms)
+1052ms ║║Executed [Sink Light].setLevel (8ms)
+1061ms ║║Skipped execution of physical command [Stove Light].setLevel([1]) because it would make no change to the device. (6ms)
+1062ms ║║Executed [Stove Light].setLevel (8ms)
+1076ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (3ms)
+1078ms ║║Condition #92 evaluated false (9ms)
+1079ms ║║Condition group #91 evaluated false (state did not change) (11ms)
+1084ms ║║Cancelling statement #132’s schedules…
+1103ms ║║Calculating (string) button + (string) # >> (string) button #
+1108ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+1113ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+1117ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+1126ms ║║Calculating (string) b, + (string) red >> (string) b, red
+1131ms ║║Calculating (string) >> (string)
+1136ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+1140ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+1145ms ║║Executed virtual command setState (1ms)
+1148ms ║╚Execution stage complete. (193ms)
+1155ms ╚Event processed successfully (1155ms)
8/24/2017, 6:41:53 PM +431ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 1672ms
+1099ms ║RunTime Analysis CS > 184ms > PS > 430ms > PE > 486ms > CE
+1110ms ║Piston waited at a semaphore for 359ms
+1116ms ║Runtime (57615 bytes) successfully initialized in 430ms (v0.2.0e5.20170812) (1113ms)
+1117ms ║╔Execution stage started
+1141ms ║║Comparison (enum) held gets (string) pushed = false (2ms)
+1144ms ║║Condition #47 evaluated false (12ms)
+1146ms ║║Condition group #46 evaluated false (state did not change) (16ms)
+1167ms ║║Comparison (enum) held gets (string) held = true (7ms)
+1169ms ║║Condition #65 evaluated true (16ms)
+1171ms ║║Condition group #64 evaluated true (state did not change) (18ms)
+1176ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+1182ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+1186ms ║║Cancelling statement #122’s schedules…
+1203ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (6ms)
+1205ms ║║Executed [Corner Cabinet Light].setLevel (9ms)
+1217ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (7ms)
+1219ms ║║Executed [Kitchen Table Light].setLevel (10ms)
+1230ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (7ms)
+1231ms ║║Executed [Refrigerator Light].setLevel (9ms)
+1241ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (6ms)
+1243ms ║║Executed [Sink Light].setLevel (8ms)
+1376ms ║║Executed physical command [Stove Light].setLevel([1]) (128ms)
+1377ms ║║Executed [Stove Light].setLevel (130ms)
+1392ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (3ms)
+1394ms ║║Condition #92 evaluated false (10ms)
+1396ms ║║Condition group #91 evaluated false (state did not change) (12ms)
+1401ms ║║Cancelling statement #132’s schedules…
+1422ms ║║Calculating (string) button + (string) # >> (string) button #
+1428ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+1433ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+1437ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+1447ms ║║Calculating (string) b, + (string) red >> (string) b, red
+1453ms ║║Calculating (string) >> (string)
+1459ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+1463ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+1468ms ║║Executed virtual command setState (1ms)
+1472ms ║╚Execution stage complete. (355ms)
+1478ms ╚Event processed successfully (1478ms)
8/24/2017, 6:41:52 PM +82ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 729ms
+2300ms ║RunTime Analysis CS > 58ms > PS > 1862ms > PE > 380ms > CE
+2307ms ║Piston waited at a semaphore for 1785ms
+2310ms ║Runtime (57617 bytes) successfully initialized in 1862ms (v0.2.0e5.20170812) (2307ms)
+2311ms ║╔Execution stage started
+2330ms ║║Comparison (enum) held gets (string) pushed = false (1ms)
+2332ms ║║Condition #47 evaluated false (10ms)
+2333ms ║║Condition group #46 evaluated false (state did not change) (12ms)
+2347ms ║║Comparison (enum) held gets (string) held = true (3ms)
+2349ms ║║Condition #65 evaluated true (11ms)
+2351ms ║║Condition group #64 evaluated true (state did not change) (12ms)
+2355ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+2361ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+2365ms ║║Cancelling statement #122’s schedules…
+2380ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (6ms)
+2381ms ║║Executed [Corner Cabinet Light].setLevel (8ms)
+2393ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (8ms)
+2394ms ║║Executed [Kitchen Table Light].setLevel (10ms)
+2402ms ║║Skipped execution of physical command [Refrigerator Light].setLevel([1]) because it would make no change to the device. (5ms)
+2403ms ║║Executed [Refrigerator Light].setLevel (7ms)
+2413ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (7ms)
+2414ms ║║Executed [Sink Light].setLevel (9ms)
+2475ms ║║Executed physical command [Stove Light].setLevel([1]) (57ms)
+2476ms ║║Executed [Stove Light].setLevel (59ms)
+2498ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (5ms)
+2502ms ║║Condition #92 evaluated false (15ms)
+2505ms ║║Condition group #91 evaluated false (state did not change) (19ms)
+2513ms ║║Cancelling statement #132’s schedules…
+2535ms ║║Calculating (string) button + (string) # >> (string) button #
+2540ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+2546ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+2551ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+2563ms ║║Calculating (string) b, + (string) red >> (string) b, red
+2571ms ║║Calculating (string) >> (string)
+2579ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+2587ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+2592ms ║║Executed virtual command setState (1ms)
+2598ms ║╚Execution stage complete. (286ms)
+2608ms ╚Event processed successfully (2608ms)
8/24/2017, 6:41:52 PM +320ms
+2ms ╔Received event [Remote Buttons].button = held with a delay of 324ms
+908ms ║RunTime Analysis CS > 51ms > PS > 417ms > PE > 440ms > CE
+917ms ║Piston waited at a semaphore for 333ms
+922ms ║Runtime (57613 bytes) successfully initialized in 417ms (v0.2.0e5.20170812) (919ms)
+925ms ║╔Execution stage started
+945ms ║║Comparison (enum) held gets (string) pushed = false (1ms)
+948ms ║║Cancelling condition #47’s schedules…
+949ms ║║Condition #47 evaluated false (12ms)
+951ms ║║Cancelling condition #46’s schedules…
+952ms ║║Condition group #46 evaluated false (state changed) (16ms)
+969ms ║║Comparison (enum) held gets (string) held = true (4ms)
+973ms ║║Cancelling condition #65’s schedules…
+974ms ║║Condition #65 evaluated true (15ms)
+976ms ║║Cancelling condition #64’s schedules…
+977ms ║║Condition group #64 evaluated true (state changed) (19ms)
+982ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+987ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+991ms ║║Cancelling statement #122’s schedules…
+1009ms ║║Skipped execution of physical command [Corner Cabinet Light].setLevel([1]) because it would make no change to the device. (7ms)
+1010ms ║║Executed [Corner Cabinet Light].setLevel (9ms)
+1021ms ║║Skipped execution of physical command [Kitchen Table Light].setLevel([1]) because it would make no change to the device. (7ms)
+1022ms ║║Executed [Kitchen Table Light].setLevel (8ms)
+1071ms ║║Executed physical command [Refrigerator Light].setLevel([1]) (44ms)
+1072ms ║║Executed [Refrigerator Light].setLevel (46ms)
+1084ms ║║Skipped execution of physical command [Sink Light].setLevel([1]) because it would make no change to the device. (8ms)
+1085ms ║║Executed [Sink Light].setLevel (10ms)
+1136ms ║║Executed physical command [Stove Light].setLevel([1]) (47ms)
+1137ms ║║Executed [Stove Light].setLevel (49ms)
+1153ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (4ms)
+1156ms ║║Condition #92 evaluated false (11ms)
+1157ms ║║Condition group #91 evaluated false (state did not change) (13ms)
+1166ms ║║Cancelling statement #132’s schedules…
+1191ms ║║Calculating (string) button + (string) # >> (string) button #
+1196ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+1202ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+1207ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+1217ms ║║Calculating (string) b, + (string) red >> (string) b, red
+1223ms ║║Calculating (string) >> (string)
+1228ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+1233ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+1237ms ║║Executed virtual command setState (1ms)
+1242ms ║╚Execution stage complete. (318ms)
+1252ms ╚Event processed successfully (1251ms)
8/24/2017, 6:41:51 PM +215ms
+1ms ╔Received event [Remote Buttons].button = held with a delay of 901ms
+522ms ║RunTime Analysis CS > 36ms > PS > 85ms > PE > 402ms > CE
+532ms ║Runtime (57549 bytes) successfully initialized in 85ms (v0.2.0e5.20170812) (530ms)
+534ms ║╔Execution stage started
+556ms ║║Comparison (enum) held gets (string) pushed = false (1ms)
+558ms ║║Cancelling condition #47’s schedules…
+559ms ║║Condition #47 evaluated false (14ms)
+561ms ║║Cancelling condition #46’s schedules…
+562ms ║║Condition group #46 evaluated false (state changed) (17ms)
+575ms ║║Comparison (enum) held gets (string) held = true (3ms)
+577ms ║║Cancelling condition #65’s schedules…
+578ms ║║Condition #65 evaluated true (11ms)
+580ms ║║Cancelling condition #64’s schedules…
+581ms ║║Condition group #64 evaluated true (state changed) (15ms)
+585ms ║║Evaluating switch with values [[i:66:null:0, v:[t:integer, v:1, vt:string]]]
+590ms ║║Comparison (integer) 1 is (integer) 1 = true (3ms)
+594ms ║║Cancelling statement #122’s schedules…
+640ms ║║Executed physical command [Corner Cabinet Light].setLevel([1]) (38ms)
+641ms ║║Executed [Corner Cabinet Light].setLevel (39ms)
+687ms ║║Executed physical command [Kitchen Table Light].setLevel([1]) (42ms)
+688ms ║║Executed [Kitchen Table Light].setLevel (45ms)
+918ms ║║Executed physical command [Refrigerator Light].setLevel([1]) (227ms)
+920ms ║║Executed [Refrigerator Light].setLevel (229ms)
+1013ms ║║Executed physical command [Sink Light].setLevel([1]) (88ms)
+1014ms ║║Executed [Sink Light].setLevel (90ms)
+1152ms ║║Executed physical command [Stove Light].setLevel([1]) (134ms)
+1153ms ║║Executed [Stove Light].setLevel (137ms)
+1173ms ║║Comparison (integer) 1 is_different_than (integer) 1 = false (3ms)
+1176ms ║║Condition #92 evaluated false (11ms)
+1178ms ║║Condition group #91 evaluated false (state did not change) (14ms)
+1185ms ║║Cancelling statement #132’s schedules…
+1205ms ║║Calculating (string) button + (string) # >> (string) button #
+1210ms ║║Calculating (string) button # + (string) 1 >> (string) button #1
+1214ms ║║Calculating (string) button #1 + (string) >> (string) button #1
+1219ms ║║Calculating (string) button #1 + (string) held >> (string) button #1 held
+1228ms ║║Calculating (string) b, + (string) red >> (string) b, red
+1233ms ║║Calculating (string) >> (string)
+1237ms ║║Calculating (string) + (string) BUTTON #1 HELD >> (string) BUTTON #1 HELD
+1242ms ║║Calculating (string) BUTTON #1 HELD + (string) >> (string) BUTTON #1 HELD
+1246ms ║║Executed virtual command setState (1ms)
+1249ms ║╚Execution stage complete. (716ms)
+1256ms ╚Event processed successfully (1256ms)

Sorry…can’t figure out how to do the scrolling logs thing.


#13

thanks. no worries.

from the logs, there is significant semaphore waits when the button is held on to. this one is over 10 secs:

+12798ms ║Piston waited at a semaphore for 12319ms


#14

So if I hold button 8(which is setting dimmer to 75%) and then do #1 hold there is no semaphore. I’ve did it a couple of times.
It seems that it doesn’t do it all the time. And, for me at least, I can’t really notice the difference in execution.
Of course I don’t hold the button that long either. I hold til the light flashes, which only throws 2 held events.


#15

right the brief alternating holds will mostly not result in a semaphore wait. but if you were to hold down any of the buttons expecting the light to go up or down in 10% increments, like in this case that would almost certainly show significant semaphore waits.

thats the reason why i asked the user if they would be willing to swap the hold action with a push action so that the holds are brief and dimming/brightening the light was achieved with multi push.


#16

Oh yes…definitely. Sorry for wasting thread space. That’s what I get for not thoroughly reading the op.


#17

Yes. Had considered re-factoring to use button push to enact level change. My partner has finally weened from x-10 remotes/modules we once had. Was trying to avoid a complete button overhaul and re-learning. And, besides that it feels more natural to push/toggle for on/off and hold for level change.


#18

ok. should i come up with a sample or you are good with handling the swap? i am good either way :slight_smile:


#19

Evening chaps - sorry to re-ignite this thread but its the bit of kit im having issues with although, I think its something to do with sonos…

Im using an old smartapp to control other bits, will migrate them all to webcore if I can. Its only 4 & 8 that arent working.

Nick