Working with TP-Link cameras and IFTTT

I’m using NR v4.05 at the moment on a Linux system. I have my smart lights all working perfectly and have several routines. The problem I’m having, however, is with the KASA / TP-Link cameras. The basic flow is if I’m home, turn the cameras off. If I’m gone, turn them on. I have all of that set. The issue is when the cameras turn on. If a camera is the first in the flow, then it doesn’t turn on, but the others will.

I have three cameras. Basement, front door, kitchen. Each is separated by a 15 second delay, including a 15 second delay before the first camera is triggered. No matter which camera is first, it won't turn on, but the others will. In order to trigger the first camera, I have to add it a second time in the flow.

But with other flows, like turning on the lights, they all function perfectly without having to add a second line. If I change the flow of the cameras, say front door, basement, kitchen, then the front room won't turn on, but the basement and kitchen will.

I've gone through in exhausting detail to make sure the cameras each function, IFTTT is set correctly and I know NR is sending the commands correctly since every light and other camera works.

I don't use IFTTT so I don't know if it may be the issue here.

If you create a simple flow with 3 separate injects each sending the on message for 1 camera and click them in succession does that work ?

Flow - Inject - Camera’s ON. It injects two messages. a topic with my IFTTTKey and a string that states cameras on. that flows into a switch that if cameras_on is received, use output one. If cameras_off is received output two.

Output 1 - delay 15 seconds, basement camera on, 15 second delay, kitchen camera, delay, front room camera. Simple trigger does just fine for that. Same for output 2, just shuts the cameras off.

Second flow, where I struggle:

A ping to my phone. If I’m home, turn the cameras off, which it does very well. Same inputs.

However, when I turn the cameras on using the ping, the first camera fails every time, even though I have it set the exact same (Ctrl-C of the original method).

No promises if this will work, but here’s the basic flow I’m using. Both go through the commands just fine. It’s just not triggering the first camera for whatever reason. IFTTT is set up correctly.

Flow example

Please just post / share code as per the guidelines - How to share code or flow json

rather than post links to unknown web sites.

Thanks

So if I understand correctly it sounds like there is a problem with your flow logic rather than anything external.

As Dave said share the flow here and perhaps someone can see what the issue is.

[
{
"id": "c2bdd30df5f7ca25",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env":
},
{
"id": "dbeb857a394954b4",
"type": "inject",
"z": "c2bdd30df5f7ca25",
"name": "Cameras ON",
"props": [
{
"p": "topic",
"v": "IFTTTKey",
"vt": "env"
},
{
"p": "string",
"v": "cameras_on",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 110,
"y": 100,
"wires": [
[
"c659a372ea103ecd"
]
]
},
{
"id": "c659a372ea103ecd",
"type": "link out",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"mode": "link",
"links": [
"eedf1fad277748cd",
"02e7562a673439eb"
],
"x": 235,
"y": 120,
"wires":
},
{
"id": "c1ed38e710c90ba7",
"type": "comment",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"info": "",
"x": 80,
"y": 60,
"wires":
},
{
"id": "ab5b9a0bee432519",
"type": "inject",
"z": "c2bdd30df5f7ca25",
"name": "Cameras OFF",
"props": [
{
"p": "topic",
"v": "IFTTTKey",
"vt": "env"
},
{
"p": "string",
"v": "cameras_off",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 110,
"y": 140,
"wires": [
[
"c659a372ea103ecd"
]
]
},
{
"id": "f56cbddc8dcf8380",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 160,
"wires": [
[
"c4ca9538e7f2d9dd"
]
]
},
{
"id": "9a0cdfc86207583e",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 240,
"wires": [
[
"4f676e0b0d81fa5e"
]
]
},
{
"id": "e19ac960dc9a3ac7",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "Front room camera off",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/FRcam_off/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 920,
"y": 360,
"wires": [
[
"ca0f45dd9f72f97b"
]
]
},
{
"id": "ca0f45dd9f72f97b",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 400,
"wires": [
[
"8f703e491f1edfaa"
]
]
},
{
"id": "8f703e491f1edfaa",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "Kitchen camera off",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/KTcam_off/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 910,
"y": 440,
"wires": [
[
"ec543eca13abad49"
]
]
},
{
"id": "ec543eca13abad49",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 480,
"wires": [
[
"495faa29b145031c"
]
]
},
{
"id": "495faa29b145031c",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "basement camera off",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/BAcam_off/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 920,
"y": 520,
"wires": [

]
},
{
"id": "8dc3b97030be66b1",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 320,
"wires": [
[
"e19ac960dc9a3ac7"
]
]
},
{
"id": "4f676e0b0d81fa5e",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "Front room camera on",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/FRcam_on/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 920,
"y": 280,
"wires": [

]
},
{
"id": "c4ca9538e7f2d9dd",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "Kitchen camera on",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/KTcam_on/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 910,
"y": 200,
"wires": [
[
"9a0cdfc86207583e"
]
]
},
{
"id": "2b4d98f8b20c31ec",
"type": "http request",
"z": "c2bdd30df5f7ca25",
"name": "basement camera on",
"method": "POST",
"ret": "txt",
"paytoqs": "ignore",
"url": "https://maker.ifttt.com/trigger/BAcam_on/with/key/{{topic}}",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": ,
"x": 920,
"y": 120,
"wires": [
[
"f56cbddc8dcf8380"
]
]
},
{
"id": "853ba9d24089d8e5",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "",
"pauseType": "delay",
"timeout": "15",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 880,
"y": 80,
"wires": [
[
"2b4d98f8b20c31ec"
]
]
},
{
"id": "02e7562a673439eb",
"type": "link in",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"links": [
"c09b186cb3fda7ec",
"3cee68a36a2adc2a",
"d943c1e1c7d2cdf6",
"c659a372ea103ecd",
"e7c3abdb96a7ea02",
"3e3f1fcd67c0ed7b"
],
"x": 495,
"y": 200,
"wires": [
[
"d6fe50a3031a216b"
]
]
},
{
"id": "78938824f5893063",
"type": "comment",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"info": "",
"x": 580,
"y": 160,
"wires":
},
{
"id": "d6fe50a3031a216b",
"type": "switch",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"property": "string",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "cameras_on",
"vt": "str"
},
{
"t": "eq",
"v": "cameras_off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 600,
"y": 200,
"wires": [
[
"853ba9d24089d8e5"
],
[
"8dc3b97030be66b1"
]
]
},
{
"id": "9399751c88149127",
"type": "ping",
"z": "c2bdd30df5f7ca25",
"protocol": "Automatic",
"mode": "triggered",
"name": "",
"host": "",
"timer": "20",
"inputs": 1,
"x": 130,
"y": 320,
"wires": [
[
"55a1f4283958d1a7"
]
]
},
{
"id": "55a1f4283958d1a7",
"type": "switch",
"z": "c2bdd30df5f7ca25",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "btwn",
"v": "1",
"vt": "num",
"v2": "1000",
"v2t": "num"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 130,
"y": 360,
"wires": [
[
"7244cdf82bb506d2"
],
[
"df68650712b51f41"
]
]
},
{
"id": "7244cdf82bb506d2",
"type": "change",
"z": "c2bdd30df5f7ca25",
"name": "I am home",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "IFTTTKey",
"tot": "env"
},
{
"t": "set",
"p": "string",
"pt": "msg",
"to": "cameras_off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 310,
"y": 340,
"wires": [
[
"e7c3abdb96a7ea02"
]
]
},
{
"id": "e7c3abdb96a7ea02",
"type": "link out",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"mode": "link",
"links": [
"eedf1fad277748cd",
"02e7562a673439eb"
],
"x": 445,
"y": 340,
"wires":
},
{
"id": "df68650712b51f41",
"type": "change",
"z": "c2bdd30df5f7ca25",
"name": "I am gone",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "IFTTTKey",
"tot": "env"
},
{
"t": "set",
"p": "string",
"pt": "msg",
"to": "cameras_on",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 300,
"y": 380,
"wires": [
[
"cccd4dce59ae0018",
"3e3f1fcd67c0ed7b"
]
]
},
{
"id": "fc754e717054946b",
"type": "comment",
"z": "c2bdd30df5f7ca25",
"name": "Am I home?",
"info": "",
"x": 90,
"y": 240,
"wires":
},
{
"id": "003345661765d32d",
"type": "inject",
"z": "c2bdd30df5f7ca25",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "600",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "192.168.50.25",
"payloadType": "str",
"x": 140,
"y": 280,
"wires": [
[
"9399751c88149127"
]
]
},
{
"id": "3e3f1fcd67c0ed7b",
"type": "link out",
"z": "c2bdd30df5f7ca25",
"name": "Cameras",
"mode": "link",
"links": [
"eedf1fad277748cd",
"02e7562a673439eb"
],
"x": 445,
"y": 380,
"wires":
},
{
"id": "e9db07dc40eaea4a",
"type": "change",
"z": "c2bdd30df5f7ca25",
"name": "Everything off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "everything_off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 320,
"y": 460,
"wires": [
[
"ba43c5017f45278e"
]
]
},
{
"id": "cccd4dce59ae0018",
"type": "delay",
"z": "c2bdd30df5f7ca25",
"name": "20 minute timer",
"pauseType": "delay",
"timeout": "20",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 320,
"y": 420,
"wires": [
[
"e9db07dc40eaea4a"
]
]
},
{
"id": "ba43c5017f45278e",
"type": "link out",
"z": "c2bdd30df5f7ca25",
"name": "Everything off",
"mode": "link",
"links": [
"f66ea68332cb5750"
],
"x": 445,
"y": 460,
"wires":
}
]

Please follow the guidelines. As it stands, the flow you posted is completely unusable.


In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil: icon.

See this post for more details - How to share code or flow json