Duet Web Control Webcam Surveillance (Fixed)



  • I had an issue where my TOP 201 Network Webcam utilized the following URI to display a "snapshot" of what it was looking at:
    "http://ipofcamera/webcapture.jpg?command=snap&channel=0"
    But the image would not display when setting a "Webcam Update Interval" of anything greater than "0". I found that the TOP 201 does not like adding an additional "&" sign to the URI, which is what the interface.js script was doing.
    I modified the following code in interface.js from:

    [[language]]
    var newURL = settings.webcamURL;
    		if (newURL.indexOf("?") == -1) {
    			newURL += "?dummy=" + Math.random();
    		} else {
    			newURL += "&dummy=" + Math.random();
    		}
    		$("#img_webcam").attr("src", newURL);
    
    ```to:
    

    [[language]]
    var newURL = settings.webcamURL;
    if (newURL.indexOf("?") != -1) {
    newURL += "?dummy=" + Math.random();
    } else {
    newURL += "&dummy=" + Math.random();
    }
    $("#img_webcam").attr("src", newURL);

    
    The change is in the if statement replacing the "==" to a "!=".
    
    Hope this helps someone else with this issue.


  • where is this interface.js file - how do I find it .. that needs to be edited?



  • @goldentuna:

    where is this interface.js file - how do I find it .. that needs to be edited?

    https://github.com/chrishamm/DuetWebControl
    Download the project, edit the file then build with the build.sh script and upload to your DuetWifi.



  • @Jackal:

    @goldentuna:

    where is this interface.js file - how do I find it .. that needs to be edited?

    https://github.com/chrishamm/DuetWebControl
    Download the project, edit the file then build with the build.sh script and upload to your DuetWifi.

    Thanks Jackal! I only have the Duet .85, so I wasn't sure how to update that file for the Duet WIFI.



  • When you run the build.sh, it will generate 2 files
    .zip one is for Duet 0.8.5 and .bin is for Duet Wifi
    The update instruction is here: https://duet3d.com/wiki/Updating_Duet_Web_Control



  • Sorry, I am having this same issue. Could you please help point me in the right area for figuring out how to "build"? I would love to get this camera to work. I made the change in the bin file you said to make and saved it, but I don't know how to run the build.sh file to compile it. Then I would assume I upload to dwc. Sorry, I am new and am almost at my witts end with this little camera.


  • administrators

    Can you tell me what camera you are using and what exactly is happening? DWC 1.15 and newer provides a few work-arounds for IP cameras that don't support extra HTTP keys and you could embed the whole IP camera website as well by enabling the appropriate option on the settings page.

    I still don't see how the provided JS code resolves problems though - it's actually a bad idea to add a second '?' char to the HTTP link.



  • I am using the ELP IP1881 camera, which as far as I know is identical to the TOP 201. I can't get a stream to the DWC. Last night I did find that I could get the still to update with the http qualifier turned off, but it is super poor quality and choppy as it will not let me update faster than 1 time per second. Do you have any ideas? Also, I would love it if you could point me in a direction to learn how to compile the files to make a new bin. I know cpp basics but not to the extent of paths and compiling multiple files to make a .bin. I guess it doesn't really apply to this camera issue anymore though.

    In short, I would like to see if we can make this little IP camera work as well as my old tablet does with DWC. It updated very fast and seemed more like a stream.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.