LIFX Errors "Too many requests"


#1

I’m getting this error every few minutes:

2/1/2018, 7:53:56 PM +212ms
+1003ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
2/1/2018, 7:45:53 PM +584ms
+775ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
2/1/2018, 7:44:42 PM +386ms
+378ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
2/1/2018, 7:43:52 PM +373ms
+403ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
2/1/2018, 7:42:54 PM +383ms
+402ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
2/1/2018, 7:40:45 PM +413ms
+410ms ║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests

My code is simple: to change colors between white and green:

Any clues?


#2

Can you turn on full logging and post a sample of that leading up to the error?


#3

2/1/2018, 8:27:53 PM +144ms
+1ms ╔Received event [We’re Home].time = 1517534873793 with a delay of -650ms
+511ms ║RunTime Analysis CS > 41ms > PS > 117ms > PE > 354ms > CE
+515ms ║Runtime (40484 bytes) successfully initialized in 117ms (v0.2.102.20180116) (512ms)
+516ms ║╔Execution stage started
+547ms ║║Comparison (enum) on is (string) on = true (3ms)
+549ms ║║Condition #9 evaluated true (13ms)
+551ms ║║Condition group #1 evaluated true (state did not change) (16ms)
+555ms ║║Cancelling statement #10’s schedules…
+713ms ║║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
+719ms ║║Executed virtual command [LIFX Lamppost].lifxState (151ms)
+728ms ║║Executed virtual command [LIFX Lamppost].wait (1ms)
+731ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:27:58 PM EST (in 5.0s)
+742ms ║╚Execution stage complete. (226ms)
+746ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:27:58 PM EST (in 4.988s)
+845ms ╚Event processed successfully (844ms)


#4

Hmm, not quite enough there to venture a guess.

Can you grab a bit more? Maybe the last 5 events? I’m wondering how much time there is between piston executions.


#5

2/1/2018, 8:33:18 PM +472ms
+1ms ╔Received event [We’re Home].time = 1517535199916 with a delay of -1445ms
+498ms ║RunTime Analysis CS > 39ms > PS > 110ms > PE > 350ms > CE
+500ms ║Runtime (40485 bytes) successfully initialized in 110ms (v0.2.102.20180116) (498ms)
+501ms ║╔Execution stage started
+2126ms ║║Executed physical command [LIFX Lamppost].setColor([[hue:40, saturation:100, level:100]]) (1604ms)
+2127ms ║║Executed virtual command [LIFX Lamppost].setHSLColor (1605ms)
+2131ms ║║Executed virtual command [LIFX Lamppost].wait (1ms)
+2132ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:33:25 PM EST (in 5.0s)
+2137ms ║╚Execution stage complete. (1636ms)
+2139ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:33:25 PM EST (in 4.994s)
+2149ms ╚Event processed successfully (2149ms)
2/1/2018, 8:33:12 PM +368ms
+0ms ╔Received event [We’re Home].time = 1517535193433 with a delay of -1066ms
+262ms ║RunTime Analysis CS > 27ms > PS > 118ms > PE > 117ms > CE
+264ms ║Runtime (40485 bytes) successfully initialized in 118ms (v0.2.102.20180116) (263ms)
+265ms ║╔Execution stage started
+288ms ║║Comparison (enum) on is (string) on = true (2ms)
+290ms ║║Condition #9 evaluated true (11ms)
+291ms ║║Condition group #1 evaluated true (state did not change) (13ms)
+293ms ║║Cancelling statement #10’s schedules…
+1541ms ║║Executed virtual command [LIFX Lamppost].lifxState (1237ms)
+1542ms ║║Waiting for 1000ms
+2546ms ║║Executed virtual command [LIFX Lamppost].wait (0ms)
+2548ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:33:19 PM EST (in 5.0s)
+2552ms ║╚Execution stage complete. (2287ms)
+2554ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:33:19 PM EST (in 4.995s)
+2567ms ╚Event processed successfully (2567ms)
2/1/2018, 8:33:06 PM +374ms
+0ms ╔Received event [We’re Home].time = 1517535187902 with a delay of -1529ms
+220ms ║RunTime Analysis CS > 27ms > PS > 86ms > PE > 107ms > CE
+222ms ║Runtime (40483 bytes) successfully initialized in 86ms (v0.2.102.20180116) (221ms)
+223ms ║╔Execution stage started
+2048ms ║║Executed physical command [LIFX Lamppost].setColor([[hue:40, saturation:100, level:100]]) (1804ms)
+2049ms ║║Executed virtual command [LIFX Lamppost].setHSLColor (1807ms)
+2055ms ║║Executed virtual command [LIFX Lamppost].wait (1ms)
+2058ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:33:13 PM EST (in 5.0s)
+2067ms ║╚Execution stage complete. (1843ms)
+2069ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:33:13 PM EST (in 4.991s)
+2089ms ╚Event processed successfully (2089ms)
2/1/2018, 8:33:00 PM +409ms
+1ms ╔Received event [We’re Home].time = 1517535181505 with a delay of -1096ms
+469ms ║RunTime Analysis CS > 31ms > PS > 282ms > PE > 156ms > CE
+472ms ║Runtime (40485 bytes) successfully initialized in 282ms (v0.2.102.20180116) (471ms)
+474ms ║╔Execution stage started
+500ms ║║Comparison (enum) on is (string) on = true (3ms)
+502ms ║║Condition #9 evaluated true (12ms)
+504ms ║║Condition group #1 evaluated true (state did not change) (15ms)
+508ms ║║Cancelling statement #10’s schedules…
+1485ms ║║Executed virtual command [LIFX Lamppost].lifxState (965ms)
+1486ms ║║Waiting for 1000ms
+2491ms ║║Executed virtual command [LIFX Lamppost].wait (1ms)
+2492ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:33:07 PM EST (in 5.0s)
+2497ms ║╚Execution stage complete. (2024ms)
+2499ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:33:07 PM EST (in 4.995s)
+2644ms ╚Event processed successfully (2644ms)
2/1/2018, 8:32:54 PM +379ms
+0ms ╔Received event [We’re Home].time = 1517535174966 with a delay of -588ms
+274ms ║RunTime Analysis CS > 62ms > PS > 106ms > PE > 106ms > CE
+277ms ║Runtime (40484 bytes) successfully initialized in 106ms (v0.2.102.20180116) (275ms)
+278ms ║╔Execution stage started
+2119ms ║║Executed physical command [LIFX Lamppost].setColor([[hue:40, saturation:100, level:100]]) (1820ms)
+2120ms ║║Executed virtual command [LIFX Lamppost].setHSLColor (1822ms)
+2124ms ║║Executed virtual command [LIFX Lamppost].wait (0ms)
+2126ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:33:01 PM EST (in 5.0s)
+2131ms ║╚Execution stage complete. (1852ms)
+2132ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:33:01 PM EST (in 4.994s)
+2198ms ╚Event processed successfully (2198ms)
2/1/2018, 8:32:48 PM +602ms
+6ms ╔Received event [We’re Home].time = 1517535169783 with a delay of -1193ms
+695ms ║RunTime Analysis CS > 245ms > PS > 299ms > PE > 156ms > CE
+716ms ║Runtime (40486 bytes) successfully initialized in 299ms (v0.2.102.20180116) (703ms)
+722ms ║╔Execution stage started
+1004ms ║║Comparison (enum) on is (string) on = true (16ms)
+1007ms ║║Condition #9 evaluated true (140ms)
+1009ms ║║Condition group #1 evaluated true (state did not change) (143ms)
+1022ms ║║Cancelling statement #10’s schedules…
+1338ms ║║Error while setting LIFX lights state: groovyx.net.http.HttpResponseException: Too Many Requests
+1341ms ║║Executed virtual command [LIFX Lamppost].lifxState (292ms)
+1354ms ║║Executed virtual command [LIFX Lamppost].wait (7ms)
+1359ms ║║Requesting a wake up for Thu, Feb 1 2018 @ 8:32:54 PM EST (in 5.0s)
+1461ms ║╚Execution stage complete. (744ms)
+1518ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:32:54 PM EST (in 4.872s)
+1534ms ╚Event processed successfully (1537ms)


#6

The bulb is extremely far from the hub, if that makes any difference. It’s located outside near the sidewalk. Never loses connection, but does throw these errors. Maybe harmless? But I’m still curious.


#7

Harmless is entirely possible. If it’s working like you want, that’s 99.9% of the battle.

I’ve never seen that error so I can’t really offer more insight… I was interested in helping figure out what’s behind it though!

Distance is a good theory, though. Especially with it happening intermittently. Do you have other lifx bulbs that are nearer the hub and don’t have these errors?


#8

Yeah, I have others, but none are receiving colorchanges every 5 seconds. I’ll let sleeping dogs lie!


#9

ilifx allows 120 calls per minuteper token. i had a device handler calling too many times with bad group names causing it to try and resync constantly.

120 goes fast. i created one per lamp to fix