Voilà le flux, je l’avais publié puis enlevé car tellement d’infos que je n’étais pas sûr de l’avoir assez anonymisé, jettes un oeil au cas ou j’aurai laissé des trucs en trop…
[
{
"id": "d838f64686718fd4",
"type": "tab",
"label": "Snapshot camérs",
"disabled": false,
"info": "",
"env": []
},
{
"id": "4cdb400.5a8f3c",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/ptz",
"command": "/ptz",
"description": "",
"registercommand": false,
"language": "",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
"outputs": 1,
"x": 230,
"y": 320,
"wires": [
[
"c9163001cd8adc76"
]
]
},
{
"id": "fdbea5e0.730e08",
"type": "http request",
"z": "d838f64686718fd4",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/local/snapshot_ptz.jpg",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 730,
"y": 320,
"wires": [
[
"14ed2a75924433b1"
]
]
},
{
"id": "b5d7e8fa.e4aa08",
"type": "telegram sender",
"z": "d838f64686718fd4",
"name": "",
"bot": "f9e88713e8567cb0",
"haserroroutput": false,
"outputs": 1,
"x": 970,
"y": 560,
"wires": [
[]
]
},
{
"id": "c9163001cd8adc76",
"type": "api-call-service",
"z": "d838f64686718fd4",
"name": "",
"server": "59781b09.703574",
"version": 7,
"debugenabled": true,
"action": "camera.snapshot",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"camera.ptz_obs_ptz_obs"
],
"labelId": [],
"data": "{\"filename\":\"/config/www/snapshot_ptz.jpg\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "camera",
"service": "snapshot",
"x": 530,
"y": 320,
"wires": [
[
"fdbea5e0.730e08"
]
]
},
{
"id": "e03ce5f0493faf63",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/cour",
"command": "/cour",
"description": "",
"registercommand": false,
"language": "",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
"outputs": 1,
"x": 230,
"y": 380,
"wires": [
[
"6e4910b92d209a63"
]
]
},
{
"id": "3aa074dc28344ac5",
"type": "http request",
"z": "d838f64686718fd4",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/local/snapshot_cour.jpg",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 730,
"y": 380,
"wires": [
[
"14ed2a75924433b1"
]
]
},
{
"id": "6e4910b92d209a63",
"type": "api-call-service",
"z": "d838f64686718fd4",
"name": "",
"server": "59781b09.703574",
"version": 7,
"debugenabled": true,
"action": "camera.snapshot",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"camera.reolink_cour_reolink_cour"
],
"labelId": [],
"data": "{\"filename\":\"/config/www/snapshot_cour.jpg\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "camera",
"service": "snapshot",
"x": 530,
"y": 380,
"wires": [
[
"3aa074dc28344ac5"
]
]
},
{
"id": "68446867b329e231",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/grenier",
"command": "/grenier",
"description": "",
"registercommand": false,
"language": "",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
"outputs": 1,
"x": 230,
"y": 440,
"wires": [
[
"96bf173a63d95332"
]
]
},
{
"id": "47a8212a8f94847e",
"type": "http request",
"z": "d838f64686718fd4",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/local/snapshot_grenier.jpg",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 730,
"y": 440,
"wires": [
[
"14ed2a75924433b1"
]
]
},
{
"id": "96bf173a63d95332",
"type": "api-call-service",
"z": "d838f64686718fd4",
"name": "",
"server": "59781b09.703574",
"version": 7,
"debugenabled": true,
"action": "camera.snapshot",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"camera.parc_new_parc_new"
],
"labelId": [],
"data": "{\"filename\":\"/config/www/snapshot_grenier.jpg\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "camera",
"service": "snapshot",
"x": 530,
"y": 440,
"wires": [
[
"47a8212a8f94847e"
]
]
},
{
"id": "e3f3671e90d45a6f",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/atelier",
"command": "/atelier",
"description": "",
"registercommand": false,
"language": "",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
"outputs": 1,
"x": 230,
"y": 500,
"wires": [
[
"3ad81ce26ac18a20"
]
]
},
{
"id": "9f64bbeefcb0080a",
"type": "http request",
"z": "d838f64686718fd4",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ui.nabu.casa/local/snapshot_atelier.jpg",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 730,
"y": 500,
"wires": [
[
"14ed2a75924433b1"
]
]
},
{
"id": "14ed2a75924433b1",
"type": "function",
"z": "d838f64686718fd4",
"name": "send picture",
"func": "var pl = {\n content: msg.payload,\n message: `Hey ${msg.originalMessage.from.first_name}, here is the random piture you requested`,\n type : 'photo',\n chatId: xxxxxxxxxx,\n chat: msg.originalMessage.chat,\n from: msg.originalMessage.from,\n message_id : msg.originalMessage.message_id\n}\n\nmsg.payload = pl;\n\n\n/* type can be one of the following\nphoto\naudio\nvideo\nsticker\nvoice\ndocument\n*/\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 950,
"y": 440,
"wires": [
[
"b5d7e8fa.e4aa08"
]
]
},
{
"id": "3ad81ce26ac18a20",
"type": "api-call-service",
"z": "d838f64686718fd4",
"name": "",
"server": "59781b09.703574",
"version": 7,
"debugenabled": true,
"action": "camera.snapshot",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"camera.atelier"
],
"labelId": [],
"data": "{\"filename\":\"/config/www/snapshot_atelier.jpg\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "camera",
"service": "snapshot",
"x": 530,
"y": 500,
"wires": [
[
"9f64bbeefcb0080a"
]
]
},
{
"id": "7246c0adf0f2821a",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/obs",
"command": "/obs",
"description": "",
"registercommand": false,
"language": "",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
"outputs": 1,
"x": 230,
"y": 560,
"wires": [
[
"6d9af760d4f47e1c"
]
]
},
{
"id": "e6e0ae32dcbb54d6",
"type": "http request",
"z": "d838f64686718fd4",
"name": "",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "https://fyljyk9jid8jyw0dqkmrxvskzl2sun4h.ui.nabu.casa/local/snapshot_obs.jpg",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 730,
"y": 560,
"wires": [
[
"14ed2a75924433b1"
]
]
},
{
"id": "6d9af760d4f47e1c",
"type": "api-call-service",
"z": "d838f64686718fd4",
"name": "",
"server": "59781b09.703574",
"version": 7,
"debugenabled": true,
"action": "camera.snapshot",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"camera.foscam_foscam"
],
"labelId": [],
"data": "{\"filename\":\"/config/www/snapshot_obs.jpg\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "camera",
"service": "snapshot",
"x": 530,
"y": 560,
"wires": [
[
"e6e0ae32dcbb54d6"
]
]
},
{
"id": "8eceaff9b3ed2e3d",
"type": "telegram event",
"z": "d838f64686718fd4",
"name": "",
"bot": "f9e88713e8567cb0",
"event": "callback_query",
"autoanswer": false,
"x": 120,
"y": 120,
"wires": [
[
"873722f06c6eb5dc"
]
]
},
{
"id": "873722f06c6eb5dc",
"type": "function",
"z": "d838f64686718fd4",
"name": "function 3",
"func": "msg.callback = msg.payload;\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 280,
"y": 120,
"wires": [
[
"8573d92109b4a85d"
]
]
},
{
"id": "8573d92109b4a85d",
"type": "switch",
"z": "d838f64686718fd4",
"name": "",
"property": "payload.content",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "3",
"vt": "str"
},
{
"t": "cont",
"v": "4",
"vt": "str"
},
{
"t": "cont",
"v": "5",
"vt": "str"
},
{
"t": "cont",
"v": "6",
"vt": "str"
},
{
"t": "cont",
"v": "7",
"vt": "str"
}
],
"checkall": "false",
"repair": true,
"outputs": 5,
"x": 180,
"y": 220,
"wires": [
[
"c9163001cd8adc76"
],
[
"6e4910b92d209a63"
],
[
"96bf173a63d95332"
],
[
"3ad81ce26ac18a20"
],
[
"6d9af760d4f47e1c"
]
]
},
{
"id": "f49250503fc1bfb6",
"type": "telegram command",
"z": "d838f64686718fd4",
"name": "/Caméras",
"command": "/camera",
"description": "Demande snapshot des caméras",
"registercommand": true,
"language": "",
"scope": "default",
"bot": "f9e88713e8567cb0",
"strict": false,
"hasresponse": true,
"useregex": false,
"removeregexcommand": false,
"outputs": 2,
"x": 100,
"y": 60,
"wires": [
[
"4b241a302fe345f5"
],
[]
]
},
{
"id": "4b241a302fe345f5",
"type": "function",
"z": "d838f64686718fd4",
"name": "function 6",
"func": "var opts = {\n reply_markup: JSON.stringify({\n \"inline_keyboard\": [[\n {\n \"text\": \"PTZ\",\n \"callback_data\": \"3\"\n },\n {\n \"text\": \"Cour\",\n \"callback_data\": \"4\" \n },\n {\n \"text\": \"Grenier\",\n \"callback_data\": \"5\" \n },\n {\n \"text\": \"Atelier\",\n \"callback_data\": \"6\" \n }, \n {\n \"text\": \"Obs\",\n \"callback_data\": \"7\"\n } \n ]\n ]\n })\n};\n\nmsg.error = false;\n\nmsg.payload.content = 'Selection?';\nmsg.payload.options = opts;\n\nmsg.payload.chatId = xxxxxxxxxxxxxxxxx;\nmsg.payload.type = \"message\";\n\nreturn [msg];",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 60,
"wires": [
[
"28fd3a1fb64bdd67"
]
]
},
{
"id": "28fd3a1fb64bdd67",
"type": "telegram sender",
"z": "d838f64686718fd4",
"name": "",
"bot": "f9e88713e8567cb0",
"haserroroutput": false,
"outputs": 1,
"x": 550,
"y": 60,
"wires": [
[]
]
},
{
"id": "f9e88713e8567cb0",
"type": "telegram bot",
"botname": "alerte",
"usernames": "Alerte47bot",
"chatids": "xxxxxxxxxxxx",
"baseapiurl": "",
"testenvironment": false,
"updatemode": "polling",
"addressfamily": "",
"pollinterval": "300",
"usesocks": false,
"sockshost": "",
"socksprotocol": "socks5",
"socksport": "6667",
"socksusername": "anonymous",
"sockspassword": "",
"bothost": "",
"botpath": "",
"localbotport": "8443",
"publicbotport": "8443",
"privatekey": "",
"certificate": "",
"useselfsignedcertificate": false,
"sslterminated": false,
"verboselogging": false
},
{
"id": "59781b09.703574",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]