Closed faanskit closed 3 years ago
Worth fixing. Can we separate the fix for this issue from the addition of Wyze Sensor v1?
Sure, can I also add "2" to this list? Captures also sound events from cameras.
"event_value_list": [
"1",
"2",
"13",
"10",
"12"
Do we want sound? For the cameras I think users would only want the device to trigger on motion.
That is the understanding of the feature right now.
Well, if you don't want sound events - you disable them in the Wyze app.
In my system, motion triggers a lot of false positives so I had to reduce sensibility. But sound has worked well for me. Captured a few birds striking the window with sound detection.
Then there are of course other events that at least I would want to capture. Like fire-alarm, etc.. But I don't know how these are signalled.
My preference would be to send event_value_list: [] to catch all.
Ok, lets see if we can get feedback from some other stakeholders. Maybe this needs to be configurable in some way. I am not sure how that would be implemented but depending on what the other community members think we can consider our options.
Issue 1 In
get_event_list()
inbase_client.py
, the following time functions is used:"begin_time": int(str(datetime.date.today().strftime("%s")) + "000"),
strftime("%s")
is not supported on Windows. For more info what is supported for strftime(), see this link.This results in the following error on Windows:
Issue 2 This method also has a built in flaw. Possible number of events differs depending of time-of-day. 1am will only provide 1hrs of possible hits, but 11pm will provide 23hrs of possible hits.
Propose to change to a function relative to now. Suppose 2hrs x 60 minutes x 60 seconds should be enough.
"begin_time": int(str(int(time.time() - (2 * 60 * 60))) + "000"),
This should fix both issue as time.time() is transportable, and the function now works as intended (?)