Weather Color Light & Strobe


#1

1) Give a description of the problem
I have a piston I created to turn a Fibaro RGWB controlled LED strip to a color based on the weather temp high for the day. It would also pulse the LEDs if there is going to be precipitation, but it does not do that. Finally, it should turn off after 90 minutes of being on.

2) What is the expected behavior?
I expect the LEDs to pulse if it is going to rain/snow.

3) What is happening/not happening?
There is no strobing when the forecast calls for precipitation.

**4) Post a Green Snapshot of the piston

5) Attach any logs (From ST IDE and by turning logging level to Full)
(12/21/2018, 9:13:26 AM +38ms
+1ms ╔Received event [Home].time = 1545401606847 with a delay of -809ms
+103ms ║RunTime Analysis CS > 16ms > PS > 56ms > PE > 31ms > CE
+107ms ║Runtime (45519 bytes) successfully initialized in 56ms (v0.3.109.20181207) (104ms)
+109ms ║╔Execution stage started
+157ms ║║Skipped execution of physical command [Under Counter By Fridge].on([]) because it would make no change to the device. (4ms)
+159ms ║║Executed [Under Counter By Fridge].on (8ms)
+167ms ║║Skipped execution of physical command [Under Counter Lights].on([]) because it would make no change to the device. (4ms)
+169ms ║║Executed [Under Counter Lights].on (7ms)
+298ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].sendSMSNotification (121ms)
+499ms ║║Calculating (string) Todays predicted high is + (string) 61 >> (string) Todays predicted high is 61
+517ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].sendSMSNotification (12ms)
+536ms ║║Comparison (dynamic) 0.10 is_greater_than_or_equal_to (decimal) 0.1 = true (3ms)
+539ms ║║Condition #12 evaluated true (14ms)
+540ms ║║Condition group #11 evaluated true (state did not change) (17ms)
+542ms ║║Condition group #10 evaluated true (state did not change) (19ms)
+545ms ║║Cancelling statement #14’s schedules…
+560ms ║║Calculating (string) Today’s forecasted precipitation is + (string) 0.10 >> (string) Today’s forecasted precipitation is 0.10
+564ms ║║Calculating (string) Today’s forecasted precipitation is 0.10 + (string) inches. >> (string) Today’s forecasted precipitation is 0.10 inches.
+584ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].sendSMSNotification (13ms)
+589ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].wait (0ms)
+590ms ║║Waiting for 500ms
+1097ms ║║Cancelling statement #32’s schedules…
+1106ms ║║Executed virtual command [Under Count Switch, Under Counter By Fridge, Under Counter Lights].wait (1ms)
+1108ms ║║Requesting a wake up for Fri, Dec 21 2018 @ 10:43:27 AM EST (in 5400.0s)
+1115ms ║╚Execution stage complete. (1007ms)
+1119ms ║Setting up scheduled job for Fri, Dec 21 2018 @ 10:43:27 AM EST (in 5399.991s), with 1 more job pending
+1127ms ╚Event processed successfully (1127ms)
12/21/2018, 9:13:15 AM +822ms
+0ms ╔Received event [Home].routineExecuted = 31c26d27-0e37-4843-b303-0f066aa2de14 with a delay of 40ms
+90ms ║RunTime Analysis CS > 15ms > PS > 52ms > PE > 23ms > CE
+93ms ║Runtime (45550 bytes) successfully initialized in 52ms (v0.3.109.20181207) (91ms)
+94ms ║╔Execution stage started
+107ms ║║Comparison (string) unconfigured is_not (string) away = true (2ms)
+109ms ║║Condition #44 evaluated true (10ms)
+110ms ║║Condition group #1 evaluated true (state did not change) (11ms)
+111ms ║║Condition group #null evaluated true (state did not change) (13ms)
+119ms ║║Comparison (time) 33195936 happens_daily_at (time) 23400000 = false (0ms)
+120ms ║║Condition #17 evaluated false (6ms)
+122ms ║║Cancelling statement #17’s schedules…
+129ms ║║Requesting time schedule wake up at Sat, Dec 22 2018 @ 6:30:00 AM EST
+136ms ║║Comparison (string) :a857444f2f49696ce00eb6ed0cbeaf9c: executes (string) :a857444f2f49696ce00eb6ed0cbeaf9c: = true (2ms)
+138ms ║║Condition #51 evaluated true (6ms)
+139ms ║║Condition group #16 evaluated true (state did not change) (25ms)
+142ms ║║Cancelling statement #6’s schedules…
+1658ms ║║Executed physical command [Under Counter By Fridge].setColor([[hex: #00C213, hue:35, saturation:100, level:38]]) (1314ms)
+1659ms ║║Executed [Under Counter By Fridge].setColor (1318ms)
+1851ms ║║Executed physical command [Under Counter Lights].setColor([[hex: #00C213, hue:35, saturation:100, level:38]]) (187ms)
+1852ms ║║Executed [Under Counter Lights].setColor (191ms)
+1857ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].wait (0ms)
+1858ms ║║Waiting for 3000ms
+4926ms ║║Executed physical command [Under Counter By Fridge].setLevel([100]) (62ms)
+4927ms ║║Executed [Under Counter By Fridge].setLevel (65ms)
+4981ms ║║Executed physical command [Under Counter Lights].setLevel([100]) (51ms)
+4982ms ║║Executed [Under Counter Lights].setLevel (53ms)
+4986ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].wait (1ms)
+4987ms ║║Waiting for 3000ms
+8004ms ║║Executed physical command [Under Counter By Fridge].setSaturation([254]) (12ms)
+8005ms ║║Executed [Under Counter By Fridge].setSaturation (14ms)
+8017ms ║║Executed physical command [Under Counter Lights].setSaturation([254]) (9ms)
+8018ms ║║Executed [Under Counter Lights].setSaturation (12ms)
+8022ms ║║Executed virtual command [Under Counter By Fridge, Under Counter Lights].wait (1ms)
+8024ms ║║Requesting a wake up for Fri, Dec 21 2018 @ 9:13:26 AM EST (in 3.0s)
+8029ms ║╚Execution stage complete. (7936ms)
+8033ms ║Setting up scheduled job for Fri, Dec 21 2018 @ 9:13:26 AM EST (in 2.993s), with 2 more jobs pending
+8044ms ╚Event processed successfully (8044ms))

REMOVE BELOW AFTER READING


#2

Have you verified the value that is being returned for “PrecipAmount” ?
You could add something like a ‘log to console’ to see the value of PrecipAmount…

IF PrecipAmount >= .1
 THEN
  WITH LOCATION:
   Log to console, (expression): "'Boolean expressions returns: 'ge(PrecipAmount, .1)"

If you’ve verified that the greater than or equal returns true, then I’d expect it has something to do with the “blink” action… Maybe try the “blink” action in a separate piston just to see if it works.

EDIT: I imported your piston… something isn’t right with your “Alert Blink with lights” statement. “Alert” is not an action. Try something like the following where i use an emulated flash. Tested and working with a philips hue light.


#3

Not totally unrelated and not trying to be a Debbie downer, but isn’t the weather API going away at the first of the year? So you might not want to spend too much time making this piston…


#4

Yeah, I heard the same thing too… I’ve since switched my weather conditions to use the AccuWeather API. They allow like 50 API calls a day.


#5

Can you point me in the right direction from switching from Weather Underground to Accueather?


#6

Create a free account at https://developer.accuweather.com/
Once you do that, you can create a new “app” in their dashboard which will give you an API key to use.


#7

According to Alex (Co-Founder of ActionTiles):

“WeatherUnderground is terminating service to individual clients (B2C), while continuing to provide it to businesses (B2B).”

“SmartThings is a subscriber to WU service. I know for a fact that they query WU for sunrise/sunset times and I don’t see them changing this implementation (they had many opportunities to optimize and cut 3rd party API costs, but they haven’t done anything about this for years).”


If this is accurate, and SmartThings continues to use the service, then we may be in luck and have access to it all here in webCoRE.

*fingers crossed*


#8

Not sure it’s looking promising:

Relevant quote:

If you are a paying WU API customer, you will receive a call from a representative from The Weather Company, and IBM business, to discuss transition options to other API services. If you’d like to have these conversations sooner contact us

But one would assume that ST would implement a contingency plan for this, or it would/could break a whole lotta stuff.


#9

I sure wish SmartThings would make a public statement. For all we know they could have reached an agreement a month ago!

… Well, I guess we will find out soon enough