For now i have the same problem with the user/passwords in it.
Made a quick work-around in node-red.
On the end of this message, the flow i made.
The ip-address + port needs to be filled in with your nodered ip-address + port
Code: Select all
[
{
"id": "dabe49dae1a5027b",
"type": "tab",
"label": "Foscam Doorbell",
"disabled": false,
"info": "",
"env": []
},
{
"id": "92ef6e2c36db918a",
"type": "http in",
"z": "dabe49dae1a5027b",
"name": "",
"url": "foscam",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 180,
"y": 120,
"wires": [
[
"f8d346a8f0d08dc1"
]
],
"info": "http://192.168.1.50:1880/endpoint/doorbell-alarm"
},
{
"id": "93a85c4d6da594dc",
"type": "http response",
"z": "dabe49dae1a5027b",
"name": "",
"statusCode": "200",
"headers": {},
"x": 920,
"y": 220,
"wires": []
},
{
"id": "d4f8d4dbaba8d5bb",
"type": "comment",
"z": "dabe49dae1a5027b",
"name": "Foscam VD1 url instructions",
"info": "What to change in flow:\n- Change node \"Set motion idx\" to the correct domoticz idx number.\n- Change node \"Set sound idx\" to the correct domoticz idx number.\n- Change node \"Set call idx\" to the correct domoticz idx number.\n- Change node \"Set face idx\" to the correct domoticz idx number.\n- Change node \"Set topic\" to the correct domoticz topic in name.\n- Change mqtt node to correct mqtt server address.\n\nPossible URL's which can be used\nURL for motion detection = http://ip-address:port/foscam?action=motion\nURL for sound detection = http://ip-address:port/foscam?action=sound\nURL for video call = http://ip-address:port/foscam?action=call\nURL for face detection = http://ip-address:port/foscam?action=face",
"x": 220,
"y": 60,
"wires": []
},
{
"id": "f2e3fbe1dacfd076",
"type": "template",
"z": "dabe49dae1a5027b",
"name": "GET reply",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "GET request received for: {{payload.action}}.",
"output": "str",
"x": 760,
"y": 220,
"wires": [
[
"93a85c4d6da594dc"
]
]
},
{
"id": "f8d346a8f0d08dc1",
"type": "switch",
"z": "dabe49dae1a5027b",
"name": "",
"property": "payload.action",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "motion",
"vt": "str"
},
{
"t": "eq",
"v": "sound",
"vt": "str"
},
{
"t": "eq",
"v": "call",
"vt": "str"
},
{
"t": "eq",
"v": "face",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 5,
"x": 410,
"y": 120,
"wires": [
[
"f2e3fbe1dacfd076",
"26d3e6603c1f2545"
],
[
"f2e3fbe1dacfd076",
"449d4d2a51250533"
],
[
"f2e3fbe1dacfd076",
"2578b4030564c2d7"
],
[
"f2e3fbe1dacfd076",
"2298cc101b2b70f1"
],
[
"58f1118c4058aece"
]
]
},
{
"id": "58f1118c4058aece",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "400 bad request",
"rules": [
{
"t": "set",
"p": "payload.action",
"pt": "msg",
"to": "400 Bad Request, wrong url string provided",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 580,
"y": 220,
"wires": [
[
"f2e3fbe1dacfd076"
]
]
},
{
"id": "2298cc101b2b70f1",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set face idx",
"rules": [
{
"t": "set",
"p": "src",
"pt": "msg",
"to": "4",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 180,
"wires": [
[
"597ebce589c156d8"
]
]
},
{
"id": "2578b4030564c2d7",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set call idx",
"rules": [
{
"t": "set",
"p": "src",
"pt": "msg",
"to": "3",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 140,
"wires": [
[
"597ebce589c156d8"
]
]
},
{
"id": "449d4d2a51250533",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set sound idx",
"rules": [
{
"t": "set",
"p": "src",
"pt": "msg",
"to": "2",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 780,
"y": 100,
"wires": [
[
"597ebce589c156d8"
]
]
},
{
"id": "26d3e6603c1f2545",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set motion idx",
"rules": [
{
"t": "set",
"p": "idx",
"pt": "msg",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 780,
"y": 60,
"wires": [
[
"597ebce589c156d8"
]
]
},
{
"id": "597ebce589c156d8",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "domoticz/in",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1000,
"y": 120,
"wires": [
[
"1162129ff7c2753e"
]
]
},
{
"id": "1162129ff7c2753e",
"type": "change",
"z": "dabe49dae1a5027b",
"name": "Set msg.payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"command\": \"switchlight\", \"idx\": src, \"switchcmd\": \"On\"}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1190,
"y": 120,
"wires": [
[
"f4a6e193f417600e"
]
]
},
{
"id": "f4a6e193f417600e",
"type": "mqtt out",
"z": "dabe49dae1a5027b",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "788c0c32d843c276",
"x": 1370,
"y": 120,
"wires": []
},
{
"id": "788c0c32d843c276",
"type": "mqtt-broker",
"name": "",
"broker": "127.0.0.1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"verifyservercert": true,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]