# Node or nodes which takes pictures with an ip camera with username and password each time when it have an request

**URL:** https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554
**Category:** General
**Created:** [12 May 2020 20:22 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554 "2020-05-12T20:22:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [12 May 2020 20:22 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/1 "2020-05-12T20:22:01Z")

</div>

Hello.  
I'm new on Node-RED and I don't know how it works all nodes.  
I want to take a picture with an IP camera and save it in (ex: /home/pi/Pictures foleder) on Raspberry each time when I have an request from an "rpi-gpio in node" or an "inject node" with the same name and overwrite it each time.  
The problem is that when I'm accessing the camera IP with my laptop for ex, I need to use a username and password and I don't know how to insert them with nodes. (I have an dahua camera)  
Can somebody tell me if it's possible and how can I do it?

Thank in advance !!!

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [13 May 2020 08:28 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/2 "2020-05-13T08:28:59Z")

</div>

It depends on what you camera supports. The brand I have support RTSP and with that you can use the live stream like this **rtsp://84.27.12.000:554/user=admin&password=123456&channel=1&stream=0.sdp?**  
Note, the url is not for all the camera's the same. Read you manual or google for it.

Bart made a nice example in this topic how to capture 1 frame from the stream;

> [@How to display CCTV camera in dashboard (RTSP)](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/153):
>
> Just one thing. If Im not wrong, setting -r after the input rtsp you're definig the option on the output. That means than the node works on all stream received and than shows just the output setting. Wouldn't be better the set the input option in order to avoid the worthless node working on all the input streaming?

This works great for me.

And here is a discussion how to overlay text over your image; [Overlay text onto image](https://discourse.nodered.org/t/overlay-text-onto-image/16011)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 May 2020 08:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/3 "2020-05-13T08:32:12Z")

</div>

> [@VladMarta](#):
>
> I have an dahua camera

I'm pretty sure they use digest authentication.

Try a http request node with digest authentication set.

Inject\>http request node\>debug

See what comes back.

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [13 May 2020 19:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/4 "2020-05-13T19:32:16Z")

</div>

I'm getting something like :  
buffer[48]  
[0 … 9]  
[10 … 19]  
...  
and in this case where is image stored?

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [13 May 2020 20:14 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/5 "2020-05-13T20:14:04Z")

</div>

The buffer you’re seeing is the data representing the image.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [13 May 2020 22:29 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/6 "2020-05-13T22:29:26Z")

</div>

P.S. Here is some extra information from Vlad about his project, to make sure everybody can see the whole 'picture' 😉

> The idea of all those things are that I create a project with openalpr which open my gates by processing my license plate using a raspberry pi and it's camera, but that camera has a low quality and it doesn't work when is very sunny because of reflections and I want to use a IP camera instead, or a CCTV digital camera but I think it's easier with an IP one.  
> I Followed this tutorial for this project: [Car Plate Recognition System with Raspberry Pi and Node-RED | Random Nerd Tutorials](https://randomnerdtutorials.com/car-plate-recognition-system-with-raspberry-pi-and-node-red/)

The others have already given good information, but will try to summarize it:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/477fdf407c679f5ddc3a3c8dfe9a69861bfc180f.png)

1. You inject a random message to start the image capture
2. Via a http-request node you can capture an image from the ip camera. Enter the snapshot url from your camera (you need to have a look in the manual because it differs from device to device). As Steve explained a lot of camera's use digest authentication, but some use basic authentication. Pick whatever your need ... The output should return a Buffer (see last option) in the msg.payload, not a string!!!!
3. The file node will write the msg.payload to the specified file path.

When you want to do license plate recognition, you can add a wire from the output (of the http-request node) to the input of one of the following nodes:

- [node-red-contrib-openalpr-cloud](https://flows.nodered.org/node/node-red-contrib-openalpr-cloud)
- [node-red-contrib-plate-recognizer](https://flows.nodered.org/node/node-red-contrib-plate-recognizer)

I wrote the openalpr node a few years ago, and it is based on some older technology. Personally I would use the plate-recognizer node, which has very good recognition results! Please look on this forum and on my readme page for examples of the plate-recognizer node. It should be enough information to get started...

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [14 May 2020 16:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/7 "2020-05-14T16:32:45Z")

</div>

It's really helpful, Thank you a lot !!!

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 04:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/8 "2020-05-17T04:32:33Z")

</div>

I tried with your example and when I'm trying to open the image or to use "image info node" I'm getting this error : ("Unknown image format: TypeError: unsupported file type: undefined (file: undefined)") ... I tried to use also a "base64 converter" node " edit image node" and I couldn't get a different result. Should I have something installed on my raspberry, like an IP camera viewer software? Because I can't also to see what my cameras can see from raspberry, only from Windows because I have installed some plug-ins but I couldn't find them for ubuntu..

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [17 May 2020 05:02 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/9 "2020-05-17T05:02:33Z")

</div>

> [@VladMarta](#):
>
> Should I have something installed on my raspberry

For an ip cam nothing extra is needed. Can you please share your flow (see [here](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)).

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 05:10 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/10 "2020-05-17T05:10:52Z")

</div>

```auto
[{"id":"23795431.4338cc","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"716ae1e9.9f25c","type":"inject","z":"23795431.4338cc","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":40,"wires":[["7391a304.a462ec"]]},{"id":"38cd9ebd.6db0f2","type":"file","z":"23795431.4338cc","name":"111111","filename":"/home/pi/Pictures/bun/image.jpg","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":110,"y":200,"wires":[["43298460.6b3a1c"]]},{"id":"43298460.6b3a1c","type":"debug","z":"23795431.4338cc","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":130,"y":260,"wires":[]},{"id":"c407c8c7.56cfe8","type":"debug","z":"23795431.4338cc","name":"1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":330,"y":140,"wires":[]},{"id":"7391a304.a462ec","type":"http request","z":"23795431.4338cc","name":"camera image request","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.111","tls":"","persist":false,"proxy":"","authType":"digest","x":160,"y":80,"wires":[["55489135.56b5b","a907b3dc.36c0d","c407c8c7.56cfe8","38cd9ebd.6db0f2"]]},{"id":"55489135.56b5b","type":"moment","z":"23795431.4338cc","d":true,"name":"","topic":"","input":"headers.date","inputType":"msg","inTz":"Etc/GMT+2","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYYMMDD hhmmss","locale":"C","output":"datetimeFormatted","outputType":"msg","outTz":"America/Winnipeg","x":440,"y":60,"wires":[[]],"info":"tried to find the timezone code for 0\nhttps://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json\nand convert to local"},{"id":"a907b3dc.36c0d","type":"base64","z":"23795431.4338cc","d":true,"name":"","action":"","property":"payload","x":120,"y":140,"wires":[["38cd9ebd.6db0f2"]]}]

```

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 05:12 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/11 "2020-05-17T05:12:56Z")

</div>

and

```auto
[{"id":"7560039.90485fc","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"c7028be8.634588","type":"jimp-image","z":"7560039.90485fc","name":"Kitten from placekitten.com","data":"payload","dataType":"str","ret":"img","parameter1":"","parameter1Type":"msg","parameter2":"","parameter2Type":"msg","parameter3":"","parameter3Type":"msg","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","parameterCount":0,"jimpFunction":"none","selectedJimpFunction":{"name":"none","fn":"none","description":"Just loads the image.","parameters":[]},"x":240,"y":180,"wires":[["abdc5ac3.f453f8","99335dc4.d6255"]]},{"id":"d2e9a3fb.d848b","type":"http request","z":"7560039.90485fc","name":"camera image request","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.111","tls":"","persist":false,"proxy":"","authType":"basic","x":380,"y":120,"wires":[["21c61fde.46433","934d0469.063648"]]},{"id":"c55bb245.83d01","type":"inject","z":"7560039.90485fc","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":330,"y":40,"wires":[["d2e9a3fb.d848b"]]},{"id":"21c61fde.46433","type":"base64","z":"7560039.90485fc","name":"","action":"","property":"payload","x":640,"y":160,"wires":[["c7028be8.634588","8ce0658b.7227f8"]]},{"id":"abdc5ac3.f453f8","type":"debug","z":"7560039.90485fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":240,"wires":[]},{"id":"934d0469.063648","type":"image-info","z":"7560039.90485fc","name":"","x":650,"y":60,"wires":[[]]},{"id":"8ce0658b.7227f8","type":"imageSimple","z":"7560039.90485fc","imageData":"payload","imageType":"str","autoresize":false,"original":true,"localfile":false,"flipX":false,"flipY":false,"width":200,"height":200,"rotate":0,"crop":false,"cropX":0,"cropY":0,"cropWidth":200,"cropHeight":200,"x":540,"y":360,"wires":[[]]},{"id":"99335dc4.d6255","type":"jimp-image","z":"7560039.90485fc","name":"Set Quality 90%","data":"payload","dataType":"msg","ret":"img","parameter1":"99","parameter1Type":"num","parameter2":"true","parameter2Type":"bool","parameter3":"0","parameter3Type":"str","parameter4":"RESIZE_NEAREST_NEIGHBOR","parameter4Type":"Jimp","parameter5":"","parameter5Type":"","parameter6":"","parameter6Type":"","parameter7":"","parameter7Type":"","parameter8":"","parameter8Type":"","parameterCount":1,"jimpFunction":"quality","selectedJimpFunction":{"name":"quality","fn":"quality","description":"Set the quality of the image. Useful for reducing size of image before calling the write function.","parameters":[{"name":"quality","type":"num","required":true,"hint":"Quality value 1 ~ 100"}]},"x":180,"y":260,"wires":[["f7d319d6.6ba548","abdc5ac3.f453f8"]],"icon":"font-awesome/fa-image"},{"id":"f7d319d6.6ba548","type":"image viewer","z":"7560039.90485fc","name":"","width":"200","data":"payload","dataType":"msg","x":190,"y":340,"wires":[[]]}]

```

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [17 May 2020 08:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/12 "2020-05-17T08:32:23Z")

</div>

In one flow you use basic authentication, in the other flow you use digest authentication. If you don't setup your authentication (with username/password) correctly, there will never be a valid image in the output of the http-request node...

Add a [node-red-contrib-image-output](https://flows.nodered.org/node/node-red-contrib-image-output) after your http-request node. As long as you don't have an image previewed there, it has no use to add all kind of image processing nodes in your flow. You have to focus on the http-request node only at this point. When you don't enter the correct security settings there, nothing will ever work ...

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [17 May 2020 11:29 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/13 "2020-05-17T11:29:35Z")

</div>

Not sure at all what you are doing here...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/1/712ebb410a30d9c71394e7142a4ef44f22c9eff6.png)

As @BartButenaers says, keep is simple.  
e.g.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8fcdd8afd170ad5390c8fb4493ac9435525e5e21.jpeg)

```auto
[{"id":"ffb8a714.ea9888","type":"http request","z":"4d512b28.912bc4","name":"camera image request","method":"GET","ret":"bin","paytoqs":false,"url":"https://picsum.photos/200/300","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":120,"wires":[["1f1afe2.af8eb02"]]},{"id":"d2c53e2b.f0046","type":"inject","z":"4d512b28.912bc4","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":190,"y":120,"wires":[["ffb8a714.ea9888"]]},{"id":"1f1afe2.af8eb02","type":"image viewer","z":"4d512b28.912bc4","name":"","width":"200","data":"payload","dataType":"msg","x":590,"y":120,"wires":[[]]}]

```

Then you can get more adventurous...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bc6d61a62409c9535f2e695c02f9f896ccb592b3.jpeg)

```auto
[{"id":"ffb8a714.ea9888","type":"http request","z":"4d512b28.912bc4","name":"camera image request","method":"GET","ret":"bin","paytoqs":false,"url":"https://picsum.photos/200/300","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":120,"wires":[["733d290b.b183d8","55aaaa98.bce024"]]},{"id":"d2c53e2b.f0046","type":"inject","z":"4d512b28.912bc4","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":190,"y":120,"wires":[["ffb8a714.ea9888"]]},{"id":"1f1afe2.af8eb02","type":"image viewer","z":"4d512b28.912bc4","name":"","width":"200","data":"payload","dataType":"msg","x":870,"y":120,"wires":[[]]},{"id":"733d290b.b183d8","type":"jimp-image","z":"4d512b28.912bc4","name":"","data":"payload","dataType":"msg","ret":"img","parameter1":"45","parameter1Type":"num","parameter2":"RESIZE_NEAREST_NEIGHBOR","parameter2Type":"resizeMode","parameter3":"","parameter3Type":"msg","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","parameterCount":2,"jimpFunction":"rotate","selectedJimpFunction":{"name":"rotate","fn":"rotate","description":"rotate the image clockwise by a number of degrees. Optionally, a resize mode can be passed. If `false` is passed as the second parameter, the image width and height will not be resized.","parameters":[{"name":"deg","type":"num","required":true,"hint":"the number of degrees to rotate the image by"},{"name":"mode","type":"resizeMode|bool","required":false,"hint":"resize mode or a boolean, if false then the width and height of the image will not be changed"}]},"x":570,"y":120,"wires":[["a03d832d.0ec7","730f902c.24f16"]]},{"id":"a03d832d.0ec7","type":"jimp-image","z":"4d512b28.912bc4","name":"","data":"payload","dataType":"msg","ret":"img","parameter1":"3","parameter1Type":"num","parameter2":"RESIZE_NEAREST_NEIGHBOR","parameter2Type":"none","parameter3":"","parameter3Type":"none","parameter4":"","parameter4Type":"none","parameter5":"","parameter5Type":"none","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","parameterCount":1,"jimpFunction":"blur","selectedJimpFunction":{"name":"blur","fn":"blur","description":"fast blur the image by r pixels","parameters":[{"name":"r","type":"num","required":true,"hint":"the pixel radius of the blur"}]},"x":710,"y":120,"wires":[["1f1afe2.af8eb02"]]},{"id":"730f902c.24f16","type":"image viewer","z":"4d512b28.912bc4","name":"","width":"200","data":"payload","dataType":"msg","x":670,"y":240,"wires":[[]]},{"id":"55aaaa98.bce024","type":"image viewer","z":"4d512b28.912bc4","name":"","width":"200","data":"payload","dataType":"msg","x":530,"y":400,"wires":[[]]}]

```

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 11:52 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/14 "2020-05-17T11:52:46Z")

</div>

I tried with basic and digest to check both ways if it's working...  
I set usernam and Password as I set them for accessing the camera.

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 11:54 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/15 "2020-05-17T11:54:12Z")

</div>

```auto
[{"id":"535ad2b6.10ba0c","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"29229f97.984c4","type":"base64","z":"535ad2b6.10ba0c","name":"Encode","x":420,"y":40,"wires":[["e7e9e370.3f42","8f7d82e0.49da2"]]},{"id":"699e2847.a6d938","type":"http request","z":"535ad2b6.10ba0c","name":"","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.111","tls":"","persist":false,"proxy":"","authType":"digest","x":237.63544845581055,"y":39.39583969116211,"wires":[["29229f97.984c4"]]},{"id":"e7e9e370.3f42","type":"ui_template","z":"535ad2b6.10ba0c","group":"8176f0be.ba7bf","name":"Display image","order":1,"width":"6","height":"6","format":"<img width=\"16\" height=\"16\" alt=\"mjpeg test...\" src=\"data:image/jpg;base64,{{msg.payload}}\" />\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":620,"y":40,"wires":[[]]},{"id":"d1f1fddf.1f68e","type":"inject","z":"535ad2b6.10ba0c","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":40,"wires":[["699e2847.a6d938"]]},{"id":"6eb9bb6b.3539c4","type":"http request","z":"535ad2b6.10ba0c","name":"","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.111","tls":"","persist":false,"proxy":"","authType":"digest","x":270,"y":140,"wires":[["d565baf1.afdb08","25c047cd.5a8628"]]},{"id":"d565baf1.afdb08","type":"image","z":"535ad2b6.10ba0c","name":"","width":160,"data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":540,"y":140,"wires":[]},{"id":"eddea2ac.181f3","type":"inject","z":"535ad2b6.10ba0c","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":140,"wires":[["6eb9bb6b.3539c4"]]},{"id":"ed5f0030.4f33a","type":"image viewer","z":"535ad2b6.10ba0c","name":"","width":"200","data":"payload","dataType":"msg","x":470,"y":260,"wires":[[]]},{"id":"3301f248.97339e","type":"http request","z":"535ad2b6.10ba0c","name":"","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.111","tls":"","persist":false,"proxy":"","authType":"digest","x":270,"y":260,"wires":[["ed5f0030.4f33a","365d95a.b4a926a"]]},{"id":"104aa59d.1826ea","type":"inject","z":"535ad2b6.10ba0c","name":"Start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":90,"y":260,"wires":[["3301f248.97339e"]]},{"id":"8f7d82e0.49da2","type":"debug","z":"535ad2b6.10ba0c","name":"First tried","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":740,"y":100,"wires":[]},{"id":"25c047cd.5a8628","type":"debug","z":"535ad2b6.10ba0c","name":"second tried","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":720,"y":240,"wires":[]},{"id":"365d95a.b4a926a","type":"debug","z":"535ad2b6.10ba0c","name":"third tried","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":340,"wires":[]},{"id":"8176f0be.ba7bf","type":"ui_group","z":"535ad2b6.10ba0c","name":"Kitchen","tab":"6334a962.ce9008","order":1,"disp":true,"width":"6"},{"id":"6334a962.ce9008","type":"ui_tab","z":"535ad2b6.10ba0c","name":"Cameras","icon":"camera_alt","order":2}]

```

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 11:57 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/16 "2020-05-17T11:57:22Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/afd70a4699fba815aec9d10f062fcd423a837caa.png)

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 11:59 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/17 "2020-05-17T11:59:19Z")

</div>

![Capture1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbee98a0310c37d34833b3c8e222370365108e09.png)

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [17 May 2020 12:09 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/18 "2020-05-17T12:09:44Z")

</div>

And you are sur that the url in the http request node returns an image? Because a buffer of size 341 seems so small. When you enter that same url (which you have used in the http-request node) in your browser's address bar, then your browser shows an image from your camera?

---

<div class="post-metadata">

### Author: ![VladMarta](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@VladMarta](https://discourse.nodered.org/u/VladMarta)
#### Post date: [17 May 2020 12:21 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/19 "2020-05-17T12:21:52Z")

</div>

![Capture2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9c7dc0fdf8cb117991e570e64c7d8fb271bf6c77.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [17 May 2020 12:32 UTC](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554/20 "2020-05-17T12:32:08Z")

</div>

that data is NOT an image.

I believe `77u/` is XML.

Its certainly NOT an image mime type.

My guess is you are not accessing the correct URL of the camera.

try these URLs...

- [http://192.168.0.111/cgi-bin/snapshot.cgi?1](http://192.168.0.111/cgi-bin/snapshot.cgi?1)
- [http://192.168.0.111/tmpfs/auto.jpg](http://192.168.0.111/tmpfs/auto.jpg)
- [http://192.168.0.111/cgi-bin/snapshot.cgi?chn=[CHANNEL]&u=[USERNAME]&p=[PASSWORD]](http://192.168.0.111/cgi-bin/snapshot.cgi?chn=%5BCHANNEL%5D&u=%5BUSERNAME%5D&p=%5BPASSWORD%5D) (replace CHANNEL , USERNAME and PASSWORD appropriately.

[Next page](https://discourse.nodered.org/t/node-or-nodes-which-takes-pictures-with-an-ip-camera-with-username-and-password-each-time-when-it-have-an-request/26554.md?page=2)
