Once I get the error, I get it every time I try to open the app and have to delete and reinstall to get past it.
Do you have the camera group driver installed?
Yes. Setup all keys and password. Hit next (twice for some reason) and then I get another blank authorization page that just sit there with a next button. Hit next again and goes to app. Which doesn’t pull anything
Nope! Guess I deleted those when I was troubleshooting and I forgot to reload them. Seems to be working now.
Thanks for resurrecting this app even though you aren't the original author - I prefer to set my indoor camera to privacy mode when I'm home vs. turning it off with a smart plug.
This makes me think that it is checking for tokens that have been entered manually.
Here is a screenshot of my login screen.
Notes:
-
Copy and paste Key ID and API Key as presented on the wyze site (including dashes).
-
Leave the bottom two lines blank, those are intended for troubleshooting with a token that you have acquired from another source (i.e. Post-Man).
Well, my automations are not working reliably. I'm not getting errors in the log, but it looks like calls to the API aren't taking effect immediately. This was all working fine before the login change.
E.g., I have a variable that is incremented by any of several doors opening, and then decremented 3 minutes later. When the count is >0, I turn off all notifications on 2 cameras via invoking setAllNotifications(). I turn it back on when the count goes back to 0.
I have notifications on the cameras to tell me if someone is on the driveway or front walk. The intent of this rule is to stop those notifications for a few minutes when we open a door and leave (including the garage doors).
Since I got the API key version installed, I've still been getting notifications, e.g., when I go outside to pick up the newspaper.
But it works sometimes. It seems like the API is responding slowly or something.
Of course, when I tried to capture debug logs while opening a door, it worked correctly and the notifications were disabled timely.
Hmm. Mine doesn't have the slots for KeyID and API Key in the top spots.
That's unfortunate, hopefully it is just a temporary/intermittent issue.
I automate the camera notifications as well but based on mode so i doubt i would have even noticed a delay.
I only tested briefly after the code update with on/off and response was very quick. Just sent some other commands and it appears to be updating in the app within a few seconds (3 to 20). Seems reasonable, considering they are cloud based, wifi devices and the multitude of choke points along the way.
Since I only have cameras, is anyone with other devices experiencing this as well?
Note to myself for future reference, a command like power on/off is considered an action and has one endpoint. Whereas something like notifications is considered a setting and has a separate endpoint. I imagine actions would take priority? Camera settings vs camera on/off vs plug on/off.
You need the updated app code. Replace the current code with the one i posted above.
I did. I even removed the old app and took the raw import url from your post. I must have grabbed the wrong one somehow. Can you give link to the groovy again?
Here is the direct link to the raw file
https://raw.githubusercontent.com/fieldsjm/Hubitat-2/master/WyzeHub/apps/wyzehub-app.groovy
Thanks! That got it!
I'm almost entirely sure the delay is somewhere inside Wyze's cloud. Thanks for the update to the app!
Have you considered getting your version added to HPM?
Interesting thought, I'll look into it. Never added a package before.
Just updated code, got the Key ID and API Key and BLAM! Back in business - thanks so much!
Could this be used to authenticate to view.Wyze.com to stream a live camera to the dashboard?
i dont believe so...you could get creative with iframes, wyze within a dashboard might be cumbersome but two separate frames might work ok.
I've noticed that none of my automations have been working. Turning on debug logging and looking at the logs, I was seeing "Missing deviceNetworkId or propertyList". I changed the code inside deviceEventsCallback() to:
logError("Missing deviceNetworkId or propertyList ${responseData}")
and now I see:
Missing deviceNetworkId or propertyList [msg:AccessTokenError, code:2001, data:[:], ts:1694016867451]
So it appears the token somehow went invalid. I went into "Configure Login Info" and just clicked Next and now I'm no longer getting that error and things are working again.
(I also changed all the logDebug in that routine into logError)
I am working again as well ... I used the code fieldsjm posted not sure why my previous code which is 1.1 which DID work before no longer does but I am wondering if HPM "updated" the code.... anyway I documented how this was rectified for future thanks much to fieldsjm for the work.