Sorry for taking so long to get back to you. A family emergency got in the way.
No, it's being called twice. Here's the kicker though. It doesn't error every time.
dev:846 2018-07-26 08:34:10.869:infoCamera Poll Callback
dev:846 2018-07-26 08:34:10.818:infoCamera Poll
dev:846 2018-07-26 08:34:05.841:infoCamera Poll Callback
dev:846 2018-07-26 08:34:05.805:errornvr_cameraPoll() - [G] Back Yard S (UVC G3 Dome) failed to return API call to NVR
dev:846 2018-07-26 08:34:05.790:infoCamera Poll
dev:846 2018-07-26 08:34:00.825:infoCamera Poll Callback
dev:846 2018-07-26 08:34:00.736:infoCamera Poll
dev:846 2018-07-26 08:33:55.241:infoCamera Poll Callback
dev:846 2018-07-26 08:33:55.205:errornvr_cameraPoll() - [G] Back Yard S (UVC G3 Dome) failed to return API call to NVR
dev:846 2018-07-26 08:33:55.181:infoCamera Poll
dev:846 2018-07-26 08:33:50.203:infoCamera Poll Callback
dev:846 2018-07-26 08:33:50.130:infoCamera Poll
dev:846 2018-07-26 08:33:45.159:infoCamera Poll Callback
dev:846 2018-07-26 08:33:45.095:infoCamera Poll
Late here, but it looks like poll requests data from the camera, when it executes data is returned in poll callback, if poll fails, the api call failure is returned in poll callback as well. So this sequence looks correct to me.
Yeah, it's not failing on every iteration and as I posted previously the motion detect is working and I can use it in rules/apps without a problem.
Now I'll just see if I can get the snapshot portion going. If not then I'll remove it for now and share the app and driver code.
Thanks for all your help guys. I was able to get at least motion detection working for now. I've put it out as a beta.
I've taken the old ST integration for UniFI NVR and ported it, mostly, over to Hubitat. Right now only motion detection is working but I hope to get "snapshots" and "snapshot on motion" features working soon. I'm not a java/groovy guy (I'm more of a php, python, shell, ruby, puppet, chef guy) so this has been a learning experience for me.
Installation instructions are in the repo located here: GitHub - cstory777/unifi_hubitat: Unifi NVR App & Drivers for Hubitat
If you run into any issues, …
1 Like
Does anyone know the syntax for sendEvent () in Hubitat
All of these use send event.