Page 1 of 1

Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Monday 13 September 2021 22:50
by hoeby
Last vacation was my birthday and got a foscam VD1 as gift.
Before getting this gift, i didn't like those bells. Expensive and not full-fill my domotica wishes.
But i have to say, for me the foscam can full fill those wishes.

- Not the biggest, but also not the smallest doorbell. Smaller than the first ring doorbells
- No cloud servers needed for record video. The foscam has the option for SD-card
- Default it is possible, to program url commands. Like the json options for domoticz.
This works for: Motion detection, sound detection, video call (push button), Face detection.
For face detection, 3 months for free, after that you need to pay.
- add to domoticz camera's

How does it look
Image

The SD card is a option. Live video works, playback not (of course).
Max 128gb could be placed.

Program the URL links. For this you have to install foscam VMS, to get to those settings. This is freeware software from foscam
Keep in mind, you need to have the lastest firmware for this, older version have a bug. I use this version: VD1 Firmware 1.x.2.23 [02-09-2021]
Just take the domoticz JSON commands and it works. I used a dummy switch in domoticz, it perfectly switches On
links.JPG
links.JPG (48.35 KiB) Viewed 5261 times
Adding in domoticz works also by default
What to fill in:
* Name: front door
* Protocol: http
* IP Adres: the IP address of the doorbell
* Port: 88 (this is the default http port for this bell, you could change it)
* User: leave empty
* Password: leave empty
* Image URL: /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=<USER>&pwd=<PASSWORD>

In the IMAGE URL, change <USER> and <PASSWORD> to your credentials.

Only thing to look at. A chime for it.
But i have to say. I didn't looked at the chime function. Maybe it is default there, maybe not. Have to look for it.

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Wednesday 15 September 2021 10:40
by EddyG
Can this device be excluded from the Internet and still function properly?

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Friday 17 September 2021 8:57
by hoeby
I could test this by changing gateway address, to a fault gateway address
Will that be a good test for you?

I don't have different vlans in my network. Which excludeds the devices from internet

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Friday 17 September 2021 21:19
by EddyG
I think so. I am fortunate that I have a router in which I can block IP-addresses from having Internet access.

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Sunday 19 September 2021 16:41
by hoeby
Changed the gateway and dns1 + 2 to non existing numbers.
After changing this the app didn't work anymore, when my phone is on LTE. When i am on wifi it works.
Mirrored a port on my switch and looked if there was data. Yes there was data, but to the wrong gateway. The doorbell is trying to go outdoor, but it can't find the way how to.

These things tested:
- sending url to domoticz when button pushed: works
- camera image in domoticz: works
- ir switch automatic: works
- ir switch scheduler: works, but could be of sync, because no ntp for time
- recording video: works

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Sunday 19 September 2021 18:52
by EddyG
Tnx for the test. :)

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Sunday 19 September 2021 19:05
by hoeby
The doorbell has more url options.
Foscam products have a range of cgi commands which can be send by url. Like motion alarm On or Off.
There are a lot more command. Foscam even made a pdf file for it. Not all commands work out of this pdf, but there is a logic how the url needs to be build, you could read out the settings and reproduce the correct cgi url

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Wednesday 27 October 2021 12:53
by Dave47
Hello,

Is it possible to open de video stream url in Domoticz or snapshot from Foscam VD1 doorbell?

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Wednesday 27 October 2021 13:52
by hoeby
Yes no problem.

See post one:
-add to domoticz camera's

When add to domoticz
Protocol: http
Ip: your doorbell ip
Port: 88
User: leave empty
Pass: leave empty
Imageurl: cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=(your user name)&pwd=(your password)

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Thursday 23 December 2021 21:58
by azonneveld
This camera also connects to synology surveillance station.
It is not native supported, but when you add is as: Foscam - FI9901EP, most functions will work

By the way, 5G wifi connection works over a remarkable distance (+10m with limited line of sight)

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Sunday 19 June 2022 16:59
by efarmer1
since I use a username and pasword for my domestics set up I'm unable to get the camera working in my dummy switch
testing in webbrowser does work and disabling the pw protection of Domoticz also works.
Anny tips?

http://IP:port/json.htm?type=command&param=switchlight&idx=4823&switchcmd=On
http://PW:USN@IP:port/json.htm?type=command&param=switchlight&idx=4823&switchcmd=On
http://192.168.7.216:port/json.htm?username:USERNAME&password:PW?type=command&param=switchlight&idx=4823&switchcmd=On

foscam vd1 fw 1.17.2.9
Domoticz 2022.1

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Monday 10 April 2023 10:23
by hofst01
Hello,

In the meantime native support in Synology Surveillance Station is supported. You can now choose the VD1.

After I have installed Domoticz 2023.1 (build 1563) my json call to Domoticz doesn't work anymore?
A switch in domoticz switches "ON" when someone pushes the doorbell.
With this switch I then send an e-mail with a picture of the person at the doorbell, worked flawless....

It was working, in detector, alarmkoppeling, video-oproep, with:
https://domoticz-ip<:port>/json.htm?username=<base64 encoded username>&password=<base64 encoded password>&type=command&param=switchlight&idx=739&switchcmd=On

I read in release notes that from 2022.2 build 14708 this isn't working anymore!
So I changed it to:
https://<username>:<password>@domoticz-ip<:port>/json.htm?type=command&param=switchlight&idx=739&switchcmd=On

But this don't work!!
I changed also json calls from IFTTT and this works fine in the new format, but not from the VD1 doorbell.
The command works in my browser from the laptop connected to the same WIFI as the doorbell?

Anyone any ideas????

Foscam VD1 firmware 1.17.2.9
Domoticz 2023.1 (build 1563)

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Monday 10 April 2023 18:49
by Kedi
I suppose your doorbell is in the same network as Domoticz?
If so go to Setup -> Settings -> Security and put the IP of the VD1 in Trusted Networks.

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Saturday 15 April 2023 8:28
by hofst01
Kedi,

Thank you for your reply.
Yes, that is what I have tried also, but doesn't work either......

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Saturday 15 April 2023 8:58
by hoeby
It looks it doesn't have anything to do with version 2023.1
Because efarmer1 reports the same on 19 june 2022, with version 2022.1

If i have it correct. The VD1 doens't do a POST with these URL's, but it does a GET.
Don't know why it does a GET, because what does it want to do with the information it received.
Maybe this gives the problem, when user/pass is added.

My domoticz version is still 2022.1 and then everything works.
I have a test environment on 2023.1, because of the change in user/passwords i didn't update my main environment. First want to test everything.
Will try to test en see what happens, but need to find some time to do this test.

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Saturday 15 April 2023 9:06
by hoeby
Just a question.

Do you use nodered?
Maybe then there are options to get it quickly working again.
In nodered it is possible to capture the GET url and convert it to something domoticz can work with.

Re: Foscam VD1 doorbell, great thing which default works in domoticz

Posted: Sunday 16 April 2023 8:51
by hoeby
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.

Instructions for this flow:
The ip-address + port needs to be filled in with your nodered ip-address + port
What to change in flow:
- Change node "Set motion idx" to the correct domoticz idx number.
- Change node "Set sound idx" to the correct domoticz idx number.
- Change node "Set call idx" to the correct domoticz idx number.
- Change node "Set face idx" to the correct domoticz idx number.
- Change node "Set topic" to the correct domoticz topic in name.
- Change mqtt node to correct mqtt server address.

Possible URL's which can be used
URL for motion detection = http://ip-address:port/foscam?action=motion
URL for sound detection = http://ip-address:port/foscam?action=sound
URL for video call = http://ip-address:port/foscam?action=call
URL for face detection = http://ip-address:port/foscam?action=face

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": ""
    }
]