Trouble with HTTP webcam
-
Hi, I have a few reolink 510WA cameras and I was trying to set one up in the DWC as a monitor.
I found the HTTP snapshot of the camera which is:
'http://192.168.1.51:80/cgi-bin/api.cgi?cmd=Snap&channel=0&user=admin&password=111919'And I can successfully get individual snapshot images when putting the url into a web browser.
I cannot unfortunately get it to show up in DWC and when I embed into an iFrame it just says refused to connect.Is there something I am missing?
Any advice would be greatly appreciated as I was hoping to have this camera monitor a bank of printers.
-
DWC version?
-
Hi, the version is 3.4.5, Tho on a single machine we have is DWC 3.4.0 - I havent checked which machine DWC I was trying to update the webcam for.
Also I just realised the G-Code directory button when you open .g files links to the dozuki page and not the new docs page. Is there a way for me to change this as clicking the button sends to a de-activeated webpage.
-
@Phaedrux
Just doubled checked, The machine was running 3.4.0 - I have now updated it to 3.4.5 however the behaviour is identical. -
Bit of further digging, Using the f12 dev tools. I have a single error relating to the webcam component:
Refused to display 'http://192.168.1.51/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Unfortunately I am not savvy enough to know how to fix this, but it does seem like a clue
-
Bit of further digging, It looks like when I turn the Iframe option off I get this warning instead
-
@Notepad I'm not an expert in this field, however it could be that you needs to allow cross-origin requests to the IP address of the webcam. See the C parameter in the M586 command https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m586-configure-network-protocols.
-
@dc42
Thanks for the response, unfortunately it doesn't seem to have worked, but It could be how I am inputting the site data to the console. The following picture is all the combinations I have tried.How does this look?
I also tried this:
But it also hasn't worked.
Its annoying because it feels so close to getting it working but not close enough for it to actually work. -
@Notepad I'll ask @chrishamm to take a look at this.
-
@dc42 Much appreciated
-
@dc42 @Notepad Setting the CORS site parameter on the Duet web server has no effect for other domains, only for those that want to access web resources from the Duet itself. You probably need to turn off CORS (CORB) on the IP webcam if it supports that. The other solution may be to disable CORS altogether in your browser, but I wouldn't recommend that as it can be a security risk.