String variable trigger seems now working


#1

1) Give a description of the problem
Have a string var message. A tigger if message changes, then message sends to web requests. However, the trigger does not happen. In the UI next to the statement has no orange lighting icon.

2) What is the expected behaviour?
It should be trigger so when the message value changes, the web requests should be sent.

3) What is happening/not happening?
It’s not running.

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
1/11/2022, 11:29:14 AM +21ms
+1ms ╔Starting piston… (v0.3.113.20210203)
+1796ms ║╔Subscribing to devices…
+1854ms ║║Subscribing to Slide Door.contact…
+1869ms ║║Subscribing to Flood Light.switch…
+1959ms ║╚Finished subscribing (177ms)
+2033ms ║Comparison (time) 41356001 is_between (time) 1641940920000 … (time) 1641907200000 = false (11ms)
+2057ms ║Comparison (enum) off is (string) off = true (2ms)
+2078ms ║Comparison (enum) off stays (string) on = false (1ms)
+2109ms ║Comparison (enum) off is (string) on = false (1ms)
+2131ms ║Comparison (time) 41356137 is_between (time) 1641907200000 … (time) 1641940920000 = true (10ms)
+2132ms ║Time restriction check passed
+2144ms ║Comparison (enum) off is (string) on = false (2ms)
+2152ms ║Comparison (string) Backyard flood light has been on for 2 hours. changes = false (1ms)
+2162ms ╚Piston successfully started (2162ms)
1/11/2022, 11:28:18 AM +852ms
+1ms ╔Starting piston… (v0.3.113.20210203)
+2048ms ║╔Subscribing to devices…
+2111ms ║║Subscribing to Slide Door.contact…
+2124ms ║║Subscribing to Flood Light.switch…
+2219ms ║╚Finished subscribing (183ms)
+2283ms ║Comparison (time) 41301091 is_between (time) 1641940920000 … (time) 1641907200000 = false (12ms)
+2304ms ║Comparison (enum) off is (string) off = true (2ms)
+2324ms ║Comparison (enum) off stays (string) on = false (2ms)
+2352ms ║Comparison (enum) off is (string) on = false (2ms)
+2374ms ║Comparison (time) 41301211 is_between (time) 1641907200000 … (time) 1641940920000 = true (12ms)
+2376ms ║Time restriction check passed
+2387ms ║Comparison (enum) off is (string) on = false (2ms)
+2396ms ║Comparison (string) Backyard flood light has been on for 2 hours. changes_to (string) ABC = false (1ms)
+2408ms ╚Piston successfully started (2408ms)


#2

Cannot subscribe to local variables as trigger as far as I know.


#3

How about global variable? Can I use it instead? Thanks


#4

Yes on global var subscription.


#5

Looks like it can. Thanks


#6

Food for thought:

I suspect you will have issues spamming 7 web requests that close together…
(maybe add a WAIT in between each?)


#7

Thank you