D-Link Forums

The Graveyard - Products No Longer Supported => IP Cameras => DCS-2330L => Topic started by: S0NIC on March 01, 2018, 06:32:23 AM

Title: Reboot IP Camera via Siri (Apple HomeKit & Homebridge & bash script)
Post by: S0NIC on March 01, 2018, 06:32:23 AM
Sometimes the video transmission stops, even though the camera is on and can still be managed through the web interface. In such situations, only a restart helps. Since I have the camera in Apple HomeKit integrated via Homebridge, I do the restart using Siri with the following command as a switch:

Code: [Select]
curl http://USERNAME:PASSWORD@CAM-IP-ADDRESS/vb.htm?setallreboot=1
The Homebridge instructions can be found here:

Code: [Select]
       {
            "platform": "cmdSwitch2",
            "name": "CMD",
            "switches": [
                {
                    "name": "Reboot_DCS-2330L",
                    "on_cmd": "curl http://USERNAME:PASSWORD@CAM-IP-ADDRESS/vb.htm?setallreboot=1",
                    "off_cmd": "exit 1",
                    "state_cmd": "exit 1",
                    "polling": true,
                    "intervall": 1
                }
            ]
        },

Quote
Type   DCS-2330L
Firmware Version   1.14.03
Hardware Version   A

I have used Fiddler to find the right URL.
https://en.wikipedia.org/wiki/Fiddler_(software) (https://en.wikipedia.org/wiki/Fiddler_(software))