Sorry for the delay. Any controller that runs the Unifi Protect API, they should work with. You may need to set the Controller Type to UDMP anyways though. Newer firmware versions for other controllers use the same settings as that... so it is not as clear-cut as it used to be.
I think I have it working now. It was a stupid mistake, I had a leading space in front of the IP address. The UNVR pro seems to be working ok with the controller type set to UDMP.
Thanks again
Thanks for letting me know! Stuff happens and it can be tough to spot. I need to come up with a better naming for the controller types... but even just doing it "new" and "legacy" really would not help people know either. Plus Ubiquiti has added a bunch of controllers over the last couple years.
So does anyone have any thoughts on Controller Type naming?
Thanks for the driver support - any chance we can capture the "smartDetectType" from the Doorbell? ie: person, package etc. (word)
It should not care at all what a smartDetectType value is and what type of device it is from, and just put the value provided. Couple things to look for:
- If you look at the child's Event history (Events button on the child device), is it overwriting it with a different value?
- If the Event history for the child device does not show any, can you enable Debug logging for the parent and see if any "Unhandled Websocket..." items listed or similar? Maybe something changed in what it reports and how... I do not have a doorbell, but my Floodlight and cameras are still reporting normally.
If you DO use debug logging, you would probably see some listings about a "isRemoteAccessEnabled" data point... which I know about but have not released an update to handle because it is only one new point (not exactly worth it).
Thanks, it seems to update sporadically -- right now it is still showing 'package' and hasn't reset to no value. I'm also not ever seeing it show 'person' which is odd. The 'Current States' value for smartDetectType seems to hold on to the last value, where as the State Variable is blank (correct).
'UnifiProtect - Page not found for GetDoorbellStatus'
So couple things here:
- The reset back to "none" would not work anymore and I am not sure how to readily get it working. The problem was that it is almost always reporting "none" (null) and this was inundating people's systems, because it would report that as part of pretty much every single WebSocket notice, which can happen many times a minute. So I need to find a way to get that back in while still ignoring the multitude of nones...
- I am not sure why the Current State and the State Variable would be different. They should be the same (events set the State Variable as part of it in my code and have for years).
- Is that error happening every time you select that on the child device? They could have changed the URL needed to reference a doorbell (I do not have one myself)...
On a different note, does anyone have one of the Smart Chimes and the new Protect version that allows you to set your own chimes and is willing to provide me some information for it? I am interested in getting a copy of what commands the API uses to set which one it is using at a time (NOT uploading a new one, that would be excessive).
I was thinking it might be an interesting use case if you could have your Hubitat change the chime depending on factors it has control over.
If so, let me know in a message and I can provide instructions for getting the data using Google Chome's developer tools (a network recording).
I have a Chime, but my version of Protect doesnt seem to let me customize the chime. I suspect thats in a RC?
S.
I just checked the UI forum and it is even further out than that. It is in Early Access. Protect version 4.1.53 and requires overall firmware 1.7.10.
Well, someday it will be more available and someday maybe we can find out if it can be more useful. ![]()
I thought about one of these a long time back but did not really think it was worth it without custom sounds. Now they are in perpetual over-priced sold-out Ubiquiti status and WAY over-priced gouging on eBay.
Updated Version(s):
- UnifiProtectAPI.groovy = 0.2.40
Change(s):
- Correction to turning off WebSockets when you Save Preferences and have the WebSocket preference disabled.
- Correction to CPU Load (usually used for NVRs) value.
- Additional data handling due to new data in the API.
What information do you need? How would I find and get it to you?
The first and foremost thing is always what the State Variable "Type" is reported as for any new child device/new Ubiquiti device someone wants me to add.
As for recording possible activities/capabilities, if you use Chrome here are the steps:
- Go to the Unifi Controller's webpage in Chrome and login (preferably with the same login you use with the Hubitat driver).
- Go to the Protect app page.
- Navigate to whatever setting/feature/function you want to collect data on.
- BEFORE applying/saving/moving, or whatever the feature is, go to the Chrome menu, More tools, Developer tools.
- A side pane will open next to your main browser window. It can record network activity for this window only. When you are ready to record, make sure the recording button in the upper left of the developer pane is selected.
- When you are done with whatever item you wanted to capture data for, select the stop recording button (same spot, in the upper left of the developer pane). Please try to record only a specific function/feature at a time.
There are two methods to provide me data.
a) The easiest is to select the Export HAR... (button on end of the row with the recording button, looks like a down arrow). This provides me with all the information you can view in the lower window with the URLs, payloads, etc... but it does record everything used in the window and it cannot be readily edited to hide/redact information.
b) The second method is to review the data and send it to me as copied text. Looking at the list of rows that appear as things are used, try to find the relevant activity. Select that row. It should open a pane with a top row of Headers, Payload, Preview, Response... I will need to know information from Headers, Payload, and Response. In particular:
- Headers including the Request URL and Request Method (in completely new scenarios, which should not apply here since I already know, I may need to know more about if it includes cookies, tokens, etc...). Of course specific things can be redacted as long as I can tell the overall structure.
- Payload, preferably copied in full from the "view source" version. Redacting certain things can be done as long as I can figure out the overall style of data it was sending in the request.
- Response, basically the same as the Payload so I know what response (if any) the controller provides to the request.
Sending this information to me in a message, or posting the .har in a location you can share with me (until downloaded) OR asking me for my email to send it is OK. It generally works best if you keep each recording/data chunk to the smallest function/feature at a time, but you are welcome to send me multiple at once.
In the case of the chime I was figuring whatever actions are involved with changing the tone it will trigger per type of action it can be triggered on, turning it off/muting, turning on, etc...
Sent you a PM with two files. They will automatically delete in 7 days.
Thanks for providing the samples!
Just so everyone knows... it does not look like I will be able to conveniently provide the ability to change the configured chime or play specific ones in different scenarios controlled by the Hubitat. The sounds are each given UniqueIDs (like some stuff in the Network API). Without dynamic commands in drivers (where I could re-write the list of possible sounds for each user's system) I cannot customize them properly.
I am going to keep looking at it in the hopes of finding a method, but the initial take is that it will not work out as easily as I was hoping.
Updated Version(s):
- UnifiProtectAPI.groovy = 0.2.41
- UnifiProtectChild.groovy = 0.1.11
- UnifiProtectChild-Camera.groovy = 0.1.11
Change(s):
- Adding support for 3rd-party cameras. I have two on my system and got new data as a result. Even before this, it did create new child devices using the Camera child driver. The Take command does work on the two cameras I have. Ubiquiti indicates that not everything may work with cameras (like pan/tilt/zoom functions) so there is only so much I can do with the cameras at this point. But the 3rd party data is now being recognized and passed on (if it seemed appropriate) to the child devices. In this case it was the rstp URL provided as well as whether the camera was a 3rd-party camera or not. The NVR also has a data point that indicates if 3rd-party cameras are enabled or not so I added that as a state variable not as an event (most people would know if they enabled it and I could not think of a need for it in Rule Machine).
- The two child drivers had the two additional attributes added to them.
Maybe I'm missing something but i cant seem to figure out how to get the Protect notifications for AI. if the camera detects motion i have a rule that turns on the external lights. I want to shut off the motion in the camera and only use the AI (Car, person, animal) detection. how can i use these triggers to do the same thing as the motion.
this looks like what i need but i dont have anything that look like smartDetectType
