Hi, yea i thought about that too
Here we go:
[
{
"id": "9702a14d.73243",
"type": "file",
"z": "c7da62cf.1df24",
"name": "save image to folder",
"filename": "/home/christian/birdbox/latest.jpg",
"appendNewline": false,
"createDir": true,
"overwriteFile": "true",
"encoding": "base64",
"x": 820,
"y": 320,
"wires": [
[
"2ddc2464.54ebec",
"60a7ffc9.181c3"
]
]
},
{
"id": "ac8e6950.03c7e8",
"type": "comment",
"z": "c7da62cf.1df24",
"name": "Saving image",
"info": "",
"x": 277,
"y": 269,
"wires": [ ]
},
{
"id": "2ddc2464.54ebec",
"type": "debug",
"z": "c7da62cf.1df24",
"name": "file",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 1030,
"y": 320,
"wires": []
},
{
"id": "2b37d903.c98f96",
"type": "ui_button",
"z": "c7da62cf.1df24",
"name": "",
"group": "ba799367.ad2e3",
"order": 5,
"width": "3",
"height": "1",
"passthru": false,
"label": "Take Picture",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "",
"payloadType": "str",
"topic": "",
"x": 90,
"y": 320,
"wires": [
[
"9cb14399.fea1"
]
]
},
{
"id": "2b9b3b3.a7944c4",
"type": "comment",
"z": "c7da62cf.1df24",
"name": "Latest image",
"info": "This template node has the HTML code to display\nthe latest image from the motion program.\n",
"x": 270,
"y": 480,
"wires": []
},
{
"id": "8d55914a.2a88e",
"type": "ui_template",
"z": "c7da62cf.1df24",
"group": "8a23a84e.52b3f8",
"name": "Last Image",
"order": 2,
"width": "7",
"height": "7",
"format": "<!--<img name=\"main\" id=\"main\" border=\"0\" width=\"480\" height=\"460\" src=\"../webcam/{{msg.stamp}}.jpg\"> -->\n<img width=\"480\" height\"460\" src=\"/home/christian/birdbox/latest.jpg\" />\n\n<br>\nLAST IMAGE <h3>\n <i class=\"fa fa-download\" aria-hidden=\"true\"></i>\n <a href=\"../gif/{{ msg.payload }}.gif\" download=\"time-shift.gif\">Download This GIF </a>|\n <i class=\"fa fa-refresh\" aria-hidden=\"true\"></i>\n <a href=\"../ui\"> Reload Page</a>\n \n</h3>",
"storeOutMessages": true,
"fwdInMessages": false,
"resendOnRefresh": false,
"templateScope": "local",
"x": 470,
"y": 540,
"wires": [
[
"885283b2.6709f"
]
]
},
{
"id": "885283b2.6709f",
"type": "debug",
"z": "c7da62cf.1df24",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 650,
"y": 540,
"wires": []
},
{
"id": "25e8662a.c1f86a",
"type": "debug",
"z": "c7da62cf.1df24",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 350,
"y": 360,
"wires": []
},
{
"id": "aeb08572.e35c88",
"type": "configurable interval",
"z": "c7da62cf.1df24",
"name": "configurable interval",
"interval": "10",
"onstart": true,
"do_enable": true,
"msg": "capture photo",
"showstatus": true,
"unit": "seconds",
"statusformat": "YYYY-MM-D HH:mm:ss",
"x": 120,
"y": 400,
"wires": [
[
"25e8662a.c1f86a",
"9cb14399.fea1"
]
]
},
{
"id": "9cb14399.fea1",
"type": "function",
"z": "c7da62cf.1df24",
"name": "set payload and headers",
"func": "msg.headers = {};\n//msg.headers['Accept-Encoding'] = 'gzip';\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 310,
"y": 320,
"wires": [
[
"f5c76e11.d815d"
]
]
},
{
"id": "f5c76e11.d815d",
"type": "jimp-image",
"z": "c7da62cf.1df24",
"name": "single capture",
"data": "http://192.168.22.7/capture",
"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",
"sendProperty": "payload",
"parameterCount": 0,
"jimpFunction": "none",
"selectedJimpFunction": {
"name": "none",
"fn": "none",
"description": "Just loads the image.",
"parameters": []
},
"x": 560,
"y": 320,
"wires": [
[
"9702a14d.73243"
]
]
},
{
"id": "3be63024.85497",
"type": "watch",
"z": "c7da62cf.1df24",
"name": "latest.jpeg",
"files": "/home/christian/birdbox/latest.jpg",
"recursive": "",
"x": 260,
"y": 540,
"wires": [
[
"8d55914a.2a88e",
"31ff0f0b.951cd"
]
]
},
{
"id": "31ff0f0b.951cd",
"type": "image viewer",
"z": "c7da62cf.1df24",
"name": "",
"width": "160",
"data": "payload",
"dataType": "msg",
"x": 790,
"y": 480,
"wires": [
[]
]
},
{
"id": "60a7ffc9.181c3",
"type": "image viewer",
"z": "c7da62cf.1df24",
"name": "",
"width": "160",
"data": "payload",
"dataType": "msg",
"x": 1030,
"y": 380,
"wires": [
[]
]
},
{
"id": "ba799367.ad2e3",
"type": "ui_group",
"name": "Group 2",
"tab": "21cd106a.5f882",
"order": 2,
"disp": true,
"width": 6
},
{
"id": "8a23a84e.52b3f8",
"type": "ui_group",
"z": "",
"name": "Group 1",
"tab": "21cd106a.5f882",
"order": 1,
"disp": false,
"width": "15",
"collapse": false
},
{
"id": "21cd106a.5f882",
"type": "ui_tab",
"z": "",
"name": "Webcam",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]