Amcrest/Dahua Camera Plugin streaming and PTZ for openLuup/ALTUI
-
I am not getting any of the WGET errors in my logs. I am not sure what this status -1 means besides the fact that the camera is rejecting the call. I am also a bit surprised that your credentials in the url are only partially encoded. (the username is doesn't appear to be). Something doesn't seem right.
Honestly I have not gotten to the bottom of the stream. One of my cameras which I just added has all the pan and tilt buttons work so it is communicated properly but the video does not show. I tested on firefox and none of the cameras show any images.
Will try to dig deeper into this as I think it is more java code from ALTUI than it is a plugin/openLuup problem. -
Alright so I made some progress with this. Sorry I am not very good in JS so it took me a while to understand how ALTUI handles this.
I have updated the plugin which should enable getting images from the camera if your browser has the ability to disable cross origin restrictions (i.e Safari "develop" menu). I have tested this on firefox as well but unlike safari, firefox somehow sends an URL without the credentials... which means that you won't be able to see your camera feed. I submitted a pull request to @amg0 to implement credentials in ALTUI.
-
-
Yes the older models would work too and yes you do need to get you browser to log in.
The reason is this:
All the plugin commands go from openLuup to the cameras. This should work without any problems.
The video stream however is a call from your client web-browser to the camera. This requires a separate login on top of the credentials which have already been established between openLuup and the cameras. The behavior obviously then varies a lot from browser to browser. For example Safari remembers the credentials so you only need to log in once and the call from ALTUI done by safari automatically adds the credentials. I discovered that firefox doesn't do that and requires the credentials to be added back in the url. -
This was the very core of the design of ALTUI. The vera was very underpowered already so ALTUI moved the UI processing to the client browser using javascript instead of relying on the webserver on the vera (lightttpd). As the vera is properly incapable of processing high resolution camera streams, ALTUI moved that processing to the browser (and rightfully so) and therefore all the authentication must be done by the client browser.
By the way @amg0 has taken in my pull request so you can expect the next version of ALTUI to support this. I personally didn't notice any problem because I was using Safari. -
Sorry to hear. this is rather puzzling honestly as I have had no issues with mine. Getting the image is a simple API call to the camera. The only challenge was authentication of the credentials which required MD5/digest encoding and this has been fixed in openLuup.
The rest is about ALTUI working with your browser to display to image. Not sure where it is breaking for you. I have old and newer models and the aecrest API has not changed so it should make no difference.