# Control smartphone camera with Node red installed on Android

**URL:** <https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089>\
**Category:** General\
**Created:** [24 October 2019 13:15 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089 "2019-10-24T13:15:55Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 October 2019 10:39 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/21 "2019-10-25T10:39:35Z")

</div>

Try googling “termux file location”?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 October 2019 10:45 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/22 "2019-10-25T10:45:00Z")

</div>

> [@YT2310](#):
>
> no, cause i don t know at what file path the files are

Probably best to specify the full path to wherever you want the image written. Then you will know where it is.

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [25 October 2019 11:02 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/23 "2019-10-25T11:02:48Z")

</div>

I do that and now i get a return:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0ab64dc647cfd39182cf29cdffd59a79c1f47265.png)

But if i convert into a buffer, I can not load the jpg.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 October 2019 11:50 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/24 "2019-10-25T11:50:22Z")

</div>

If your input is an image it is a binary file you need the output format to be "a single buffer object"

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [25 October 2019 11:51 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/25 "2019-10-25T11:51:48Z")

</div>

okay and how do i get this? is there a node for?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 October 2019 12:04 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/26 "2019-10-25T12:04:21Z")

</div>

Try looking at the options in the file node you are using...

---

<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:** [25 October 2019 13:53 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/27 "2019-10-25T13:53:55Z")

</div>

> [@YT2310](#):
>
> no, cause i don t know at what file path the files are

To view the current directory you're in on (most) \*NIX systems, try the `pwd` command, which outputs the Working Directory.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [25 October 2019 16:39 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/28 "2019-10-25T16:39:35Z")

</div>

Alternative approach  
Install RedMobile on phone (costs £4)

Use it to take pictures and forward them onto another machine to process them via MQTT

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0ca4cef9e796145fdd0526cca5a8fb5aafe5bb1e.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/69a890c1d50a5453afaa373360262c73c7a644ef.png)

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [28 October 2019 07:02 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/29 "2019-10-28T07:02:52Z")

</div>

okay now I fixed it! thank you all for your help 🙂

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 October 2019 10:32 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/30 "2019-10-28T10:32:30Z")

</div>

Just another solution if anyone comes along in future

I ran IP WEbcam on my 'droid phone

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d750d5c594d81e8ebe7b563c5222e446fe53ac24.jpeg)

And then used the HTTP Request node on a flow on my Win10 machine to grab a picture

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8de0de578bd3f5d563a31e56345aafed9ac45737.png)

---

<div class="post-metadata">

**Author:** ![YT2310](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yt2310/32/35255_2.png) [@YT2310](https://discourse.nodered.org/u/YT2310)\
**Post date:** [28 October 2019 11:53 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/31 "2019-10-28T11:53:43Z")

</div>

could you send your flow?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 October 2019 12:03 UTC](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089/32 "2019-10-28T12:03:21Z")

</div>

```auto
[{"id":"9620d9cf.4d9068","type":"http request","z":"f3dbc12c.1a5de","name":"","method":"GET","ret":"bin","paytoqs":false,"url":"http://192.168.0.201:8080/shot.jpg ","tls":"","persist":false,"proxy":"","authType":"","x":246,"y":176,"wires":[["95aec0b1.34251"]]},{"id":"5c893194.71501","type":"debug","z":"f3dbc12c.1a5de","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":732,"y":176,"wires":[]},{"id":"1ac17d10.e803d3","type":"inject","z":"f3dbc12c.1a5de","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":104,"y":176,"wires":[["9620d9cf.4d9068"]]},{"id":"720f87a9.8b1788","type":"image viewer","z":"f3dbc12c.1a5de","name":"","width":160,"data":"payload","dataType":"msg","x":732,"y":220,"wires":[[]]},{"id":"85116094.595bd","type":"file","z":"f3dbc12c.1a5de","name":"","filename":"","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":732,"y":66,"wires":[[]]},{"id":"95aec0b1.34251","type":"simpletime","z":"f3dbc12c.1a5de","name":"","x":400,"y":176,"wires":[["5c893194.71501","720f87a9.8b1788","40faaa59.2ea964"]]},{"id":"40faaa59.2ea964","type":"template","z":"f3dbc12c.1a5de","name":"","field":"filename","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"c:\\users\\simon\\pictures\\ipcam\\{{myepoch}}.jpg","output":"str","x":566,"y":132,"wires":[["34327726.415df8","85116094.595bd"]]},{"id":"34327726.415df8","type":"debug","z":"f3dbc12c.1a5de","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":732,"y":132,"wires":[]}]

```

additional nodes are  
node-red-contrib-simpletime (to add timestamp to filename) and node-red-contrib-image-tools (for image viewer)

[Previous page](https://discourse.nodered.org/t/control-smartphone-camera-with-node-red-installed-on-android/17089.md?page=1)
