You would want Trace enabled on the parent device to be able to see the WebSocket data. Enabling Trace on the child will only have it show when it receives data or has it's preference saved (you can see the result of that from the log). In this case, the child is not even receiving the events to begin with, so that is why we need to see if the parent is getting any data to send to it. Children do not work with the API at all. Everything goes through the parent.
Thank you, as you noticed, I did not have trace enabled on the parent. I have enabled that and am getting websocket responses logged:
still no dice on the doorbell push
So good news, bad news... Good news that the WebSocket connection is working. Bad news is that the API is not providing ANYTHING on it apparently. Do you have any other Protect-related devices that could be used to see if anything comes back for it at all?
You may want to set it to Trace logging only when trying to check for something, and then turn it back to Info (or Debug) otherwise. Debug will get basically the same information as Info except it also includes information about any "unhandled" data (stuff I have not seen to code to yet).
I do not remember if I asked before, but what type of Doorbell is it (not that this should matter, just curious)?
This is my only protect device aside from the chime. I have g4 doorbell pro POE version
Something weird is going on here... I just checked mine and I am getting the same "lack of response" problem. I even enabled extra (normally VERY excessive) logging on mine... and nothing is coming across at all. Not from any of my cameras or my other devices. Everything else is working normally... I can control the brightness of the floodlight, set the PTZ to move, etc... so all the normal API functions are working. Just the WebSocket is having issues... but nothing has been changed there lately.
Nothing showing in the Release Notes as having impacted it (although there have been multiple updates in Early Access lately so maybe they broke something). What version of Protect are you on?
Same issue for me. UniFi OS 4.2.8, Protect 5.3.41. The tomw integration is successfully receiving doorbell button push events.
@bill.d @fleetmack:
Ok, thanks... my WebSocket portion is based on tomw's (much of it is identical, with permission)... so that means I broke something. Although now I need to go digging around to find what since I do not remember changing anything lately in those areas. But that at least continues giving me clues.
EDIT:
Ok, try disabling the WebSocket preference, Save Preferences. Then go back in and enable it and Save Preferences again. I just did that (while trying something else) and now I am getting flooded with activity including the motion and such. I wonder if the connection somehow "broke" during an update or something. I will have to look at a way to reset it regularly. Let me know if this works for either/both of you.
That worked. Thanks.
Wish it worked for me but it didn't, boo. I deleted the child device and tried again that way, no dice
The child device would not have impacted it... they are really just a place for data and to help represent things. All the real code and communication happens with the parent device.
I would say you could try removing the parent and starting from scratch with it... this one is becoming more confusing. If that does not work and you are willing, shoot me a personal message and I can try making a custom version of the driver to try to debug it in more detail (and step by step).
I tried removing and re-adding but the same thing occurred. I ended up using the older "Unifi Protect Controller" that I found on another thread instead of the "UnifiProtectAPI" and all is well now
Sorry it did not work out for you, but and least you found one that did. Although I am still curious about why it did not work.