I’m trying to use my Ring doorbell’s motion sensor to turn on lights when motion is detected. I’ve setup a SmartLighting automation to turn a light on when motion is detected but only between Sunset and Sunrise. This never works. So tonight I decided to try testing it with Live Logging turned on in the IDE. Here’s what I see in the log when I walk in front of the doorbell:
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace timeOk = false
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace timeWindowStop = Tue Apr 26 10:51:00 UTC 2016
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace timeWindowStart = Tue Apr 26 00:01:00 UTC 2016
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace daysOk = true
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace modeOk = true
ba0c9e98-939d-4a87-b27d-695e907b1991 6:32:19 PM: trace motionStopHandler(motion: inactive)
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace timeOk = false
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace timeWindowStop = Tue Apr 26 10:51:00 UTC 2016
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace timeWindowStart = Tue Apr 26 00:01:00 UTC 2016
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace daysOk = true
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace modeOk = true
ba0c9e98-939d-4a87-b27d-695e907b1991 6:31:49 PM: trace triggerHandler(motion: active)
The values for TimeWindowStart and TimeWindowStop seem wrong. I mean, it’s November 2018, not April 2016! So it’s no wonder that TimeOk ends up false (so the event never fires). What in the world is causing the time window values to be set that way?
To verify that this is my problem, I removed the only-between-sunset-and-sunrise condition from the automation and repeated the test. This time the light went on as expected.
So, where do I go from here? Thanks for any insights.