IFMA (Images from Mail Attachments) is a Node-Red Flow that allows you to get images from mail attachments from cheap IP cameras and make those usable for Home Automation or anything else.
- Forward all your cameras default notifications to your Telegram Bot.
- Save all the images produced from your camera motion sensor into a directory without the need to have an SD-card fisically mounted on the camera itself.
- Create a "Last Motion" tab in your Home automation software like Homeassistant.
- Create a .GIF from a bounch of images
- Anything else you can imagine.
Copy or import the flow configuration from here:
[
{
"id": "b96a06b7.5821c8",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "b7274475.b95da8",
"type": "e-mail in",
"z": "b96a06b7.5821c8",
"name": "Check new mail",
"protocol": "IMAP",
"server": "imap.gmail.com",
"useSSL": true,
"port": "993",
"box": "INBOX",
"disposition": "Read",
"criteria": "UNSEEN",
"repeat": "30",
"fetch": "auto",
"inputs": 0,
"x": 120,
"y": 60,
"wires": [
[
"467a9891.294018"
]
]
},
{
"id": "467a9891.294018",
"type": "change",
"z": "b96a06b7.5821c8",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "attachments",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 60,
"wires": [
[
"8cdc3efb.7659"
]
]
},
{
"id": "8cdc3efb.7659",
"type": "split",
"z": "b96a06b7.5821c8",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 510,
"y": 60,
"wires": [
[
"33d0c5f3.b83d0a"
]
]
},
{
"id": "33d0c5f3.b83d0a",
"type": "change",
"z": "b96a06b7.5821c8",
"name": "",
"rules": [
{
"t": "set",
"p": "filename",
"pt": "msg",
"to": "$join([\"/config/www/\", payload.fileName])",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.content",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
"y": 60,
"wires": [
[
"ecec80a7.d35bc",
"cbad2429.567088"
]
]
},
{
"id": "ecec80a7.d35bc",
"type": "image",
"z": "b96a06b7.5821c8",
"name": "",
"width": 160,
"x": 680,
"y": 100,
"wires": []
},
{
"id": "cbad2429.567088",
"type": "file",
"z": "b96a06b7.5821c8",
"name": "",
"filename": "/config/www/image.jpg",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 910,
"y": 60,
"wires": [
[
"f3c3e51.ebd6518"
]
]
},
{
"id": "f3c3e51.ebd6518",
"type": "image",
"z": "b96a06b7.5821c8",
"name": "",
"width": 160,
"x": 940,
"y": 100,
"wires": []
}
]