Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[{
"id": "55f3bc6a.8e7b5c",
"type": "tab",
"label": "Front Door Motion",
"disabled": false,
"info": ""
}, {
"id": "b8dc9ef2.f1ea",
"type": "server-state-changed",
"z": "55f3bc6a.8e7b5c",
"name": "motion detected",
"server": "b9441c53.35ff6",
"entityidfilter": "binary_sensor.m3026_0_vmd4_camera1profile1",
"entityidfiltertype": "substring",
"haltifstate": "off",
"x": 400,
"y": 120,
"wires": [
["4729640d.1807dc"]
]
}, {
"id": "73571db2.b69a84",
"type": "delay",
"z": "55f3bc6a.8e7b5c",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 400,
"y": 400,
"wires": [
["58123c36.01ed34"]
]
}, {
"id": "58123c36.01ed34",
"type": "exec",
"z": "55f3bc6a.8e7b5c",
"command": "ffmpeg -hide_banner -loglevel info -i /home/pi/tmp/frontdoor.mkv -codec copy /tmp/frontdoor.mp4 -y",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "convert clip",
"x": 570,
"y": 400,
"wires": [
["396dbf44.d9db2"],
["396dbf44.d9db2"],
["e1797828.6b2138"]
]
}, {
"id": "48df96c7.73a33",
"type": "api-call-service",
"z": "55f3bc6a.8e7b5c",
"name": "telegram justin",
"server": "b9441c53.35ff6",
"service_domain": "notify",
"service": "telegram_justin",
"data": "{ \t\"title\": \"Motion detected\", \t\"message\": \"Motion detected\", \t\"data\": { \t\t\"video\": { \t\t\t\"file\": \"/tmp/frontdoor.mp4\", \t\t\t\"caption\": \"Motion detected\" \t\t} \t} }",
"mergecontext": "",
"x": 1220,
"y": 380,
"wires": [
["396dbf44.d9db2"]
]
}, {
"id": "fac12bbf.8f8a8",
"type": "api-call-service",
"z": "55f3bc6a.8e7b5c",
"name": "telegram leah",
"server": "b9441c53.35ff6",
"service_domain": "notify",
"service": "telegram_leah",
"data": "{ \t\"title\": \"Motion detected\", \t\"message\": \"Motion detected\", \t\"data\": { \t\t\"video\": { \t\t\t\"file\": \"/tmp/frontdoor.mp4\", \t\t\t\"caption\": \"Motion detected\" \t\t} \t} }",
"mergecontext": "",
"x": 1220,
"y": 420,
"wires": [
["396dbf44.d9db2"]
]
}, {
"id": "3a43c6d6.2ca85a",
"type": "api-current-state",
"z": "55f3bc6a.8e7b5c",
"name": "justin away",
"server": "b9441c53.35ff6",
"halt_if": "home",
"override_topic": false,
"override_payload": false,
"entity_id": "device_tracker.phone1",
"x": 790,
"y": 120,
"wires": [
["b6908558.5d3138"]
]
}, {
"id": "b6908558.5d3138",
"type": "api-current-state",
"z": "55f3bc6a.8e7b5c",
"name": "leah away",
"server": "b9441c53.35ff6",
"halt_if": "home",
"override_topic": false,
"override_payload": false,
"entity_id": "device_tracker.phone2",
"x": 940,
"y": 120,
"wires": [
["73571db2.b69a84"]
]
}, {
"id": "4729640d.1807dc",
"type": "time-range-switch",
"z": "55f3bc6a.8e7b5c",
"name": "night time",
"lat": "35.2306",
"lon": "-80.7790",
"startTime": "21:00",
"endTime": "6:00",
"startOffset": 0,
"endOffset": 0,
"x": 580,
"y": 120,
"wires": [
["73571db2.b69a84"],
["3a43c6d6.2ca85a"]
]
}, {
"id": "e1797828.6b2138",
"type": "exec",
"z": "55f3bc6a.8e7b5c",
"command": "/home/pi/person-detect/detect.sh /tmp/frontdoor.mp4",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "detect person",
"x": 760,
"y": 400,
"wires": [
["396dbf44.d9db2"],
["396dbf44.d9db2"],
["74acf147.742b3"]
]
}, {
"id": "74acf147.742b3",
"type": "switch",
"z": "55f3bc6a.8e7b5c",
"name": "check exit code",
"property": "payload.code",
"propertyType": "msg",
"rules": [{
"t": "eq",
"v": "0",
"vt": "str"
}],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 980,
"y": 400,
"wires": [
["48df96c7.73a33", "fac12bbf.8f8a8"]
]
}, {
"id": "396dbf44.d9db2",
"type": "debug",
"z": "55f3bc6a.8e7b5c",
"name": "",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 1080,
"y": 520,
"wires": []
}, {
"id": "100a0de5.6ac50a",
"type": "catch",
"z": "55f3bc6a.8e7b5c",
"name": "",
"scope": null,
"uncaught": false,
"x": 740,
"y": 520,
"wires": [
["396dbf44.d9db2"]
]
}, {
"id": "b9441c53.35ff6",
"type": "server",
"z": "",
"name": "Home Assistant",
"url": "https://someurl.com",
"pass": "abcd"
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.