diff --git a/hikvision-doorbell/DOCS.md b/hikvision-doorbell/DOCS.md deleted file mode 100644 index 7bac16b..0000000 --- a/hikvision-doorbell/DOCS.md +++ /dev/null @@ -1,233 +0,0 @@ -# Home Assistant Add-on: Hikvision Doorbell - -## Configuration -**Note**: _Remember to restart the add-on when the configuration is changed._ - -The following configuration options are available to be setup using the **Configuration** tab of this add-on in the Home Assistant interface: - -### Doorbells -Configure the connection to the doorbells. If a value is not defined, the default setting is used. - -For each of your doorbells, repeat the following configuration: - -| Option | Default | Description | -| -------- | ---- | ---- | -| name | | Custom name for this doorbell (visibile in the HA UI and the sensors names) -| ip | | IP address of the doorbell -| port | 8000 | (Optional) Port of the doorbell -| username | admin | Username to access the doorbell -| password | | Password to access the doorbell -| output_relays | | (optional) Set this option if you don't see the correct number of door switches or if you have attached an secure door control module on your indoor -| caller_info | false | (optional) If you want to see the button prssed as an atribute on the call sensor, usefull for intercoms with multiple buttons. -| scenes | false | (optional) Extra Scene buttons for indoor panels - -#### Example config -The following configuration setups two doorbells, named `Front door` and `Rear door` and an `Indoor` panel -```yaml -- name: "Front door" - ip: 192.168.0.1 - username: admin - password: password - -- name: "Rear door" - ip: 192.168.0.2 - username: admin - password: password - -- name: "Indoor" - ip: 192.168.0.3 - username: admin - password: password - caller_info: true - scenes: true - -- name: "Indoor Extension" - ip: 192.168.0.4 - username: admin - password: password -``` - -### System -The following system settings are available: - -| Name | Default | Description | -| -------- | ---- | ---- | -| log_level | WARNING | The verbosity of the add-on logs. Available options: _ERROR_ _WARNING_ _INFO_ _DEBUG_ -| sdk_log_level | NONE | The verbosity of the Hikvision SDK logs. Available options: _NONE_ _ERROR_ _INFO_ _DEBUG_ - -#### Example config -```yaml -log_level: WARNING -sdk_log_level: NONE -``` - -## Setup - -### Requirements - -A running MQTT broker. - -You can use the officially supported __Mosquitto broker__, available in the official add-ons section of your Home Assistant instance. -You can quickly set it up by clicking the following button: -[![Open your Home Assistant instance and show the dashboard of a Supervisor add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=core_mosquitto), or by manually finding it inside your `Add-on store`. - -After you have started the __Mosquitto broker__ add-on, you should be able to automatically connect Home Assistant to the broker by going to `Settings` -> `Devices & Services` -> `MQTT`, and clicking `Configure`. - -(Optional) If you have an external MQTT broker, you can define it the add-on config too: - -#### Example config -```yaml -host: 192.168.0.17 -port: 1883 -ssl: false -username: user -password: pass -``` - -### Getting started - -After you have setup an MQTT broker, you can start __Hikvision Doorbell__. -Each of you defined doorbell should be visible as a device under `Settings` -> `Devices & Services` -> `Devices`. - -### Sensors, switches and buttons -For each of your doorbells, the following entities are available: - -- Sensors - - `Call state` (_idle_, _ringing_, _dismissed_) -- Switches - - `Door relays` (one for each available relay, open the door connected to the output relay of the device) -- Buttons - - `Answer call` - - `Reject call` - - `Reboot` - - ... -- Device triggers (depending on device model) - - `Motion detected` - - `Tamper alarm` - - `Door not closed` - - ... - - The _device triggers_ are used to signal alarms and events generated by the doorbells (the type of events generated depends on the specific model). - These are special entities that do not have a state associated to them (therefore are not visible in the list of HA entities, but under each `Device info` page). - - **NOTE**: The device triggers are discovered *once the associated event is triggered on the device at least once.* - - You can use a [device trigger](https://www.home-assistant.io/docs/automation/trigger/#device-triggers) in an automation by using a trigger of type `Device`. - Check out the [Automating Home Assistant](https://www.home-assistant.io/getting-started/automation/) guide on automations or the [Automation](https://www.home-assistant.io/docs/automation/) documentation for full details. - -

- -

- - - - -## Sending commands to the doorbells - -There are two ways in which you can interact with your doorbells: -- via the automatically created MQTT entities (switches, buttons) -- manually invoking the add-on `stdin` service - -### MQTT entities - -This add-on automatically creates [switches](https://www.home-assistant.io/integrations/switch/) and [buttons](https://www.home-assistant.io/integrations/button/) you can toggle and react to from the Home Assistant UI or from your own automations. - -### STDIN service (advanced) - -There is an advanced method to interact with the devices by sending a text message to the add-on on its `standard input` (STDIN). -You can use the built-in `hassio.addon_stdin` service provided by Home Assistant. - -The input string must be in the format -``` - -``` -- `` is one of: - - | Command | Description | - | -------- | ---- | - | unlock | Unlock the specified door (`` must be `1` or `2`) connected to the doorbell station output relay - | reboot | Reboot the specified door station - | reject | Reject the incoming call and stop the indoor stations from ringing - | request | Unknown - | cancel | Unknown - | answer | Unknown - | reject | Unknown - | bellTimeout | Unknown - | hangUp | Unknown - | deviceOnCall | Unknown - | atHome | Sending scene "At home" for indoor panels - | goOut | Sending scene "Go out" for indoor panels - | goToBed | Sending scene "Go to bed" for indoor panels - | custom | Sending scene "custom" for indoor panels - | setupAlarm | Turn on the alarm on the indoor panel - | closeAlarm | Turn off the alarm on the indoor panel - | muteAudioOutput | Mutes the audio output of the doorbell / indoor station - | unmuteAudioOutput | Unmutes the audio output of the doorbell / indoor station -- `` is the custom name given to the doorbell in the configuration options, all lowercase and with whitespace substituted by underscores `_`. - - E.G.: If the doorbell is named `Front door`, the input string must reference it as `front_door`. - -- `` can be an additional string, used for instance to specify additional options for a command - -#### Example -For more details see the [official documentation]((https://www.home-assistant.io/integrations/hassio/#service-hassioaddon_stdin)) about the `hassio.addon_stdin` service. - -#### Unlock a door -This service unlocks the door connected to the _1st_ output relay of the door station named `Front door`: -````yaml -service: hassio.addon_stdin -data: - addon: aff2db71_hikvision_doorbell - input: unlock front_door 1 -```` - -#### Reboot the device -To reboot the doorbell named `Rear door`: -````yaml -service: hassio.addon_stdin -data: - addon: aff2db71_hikvision_doorbell - input: reboot rear_door -```` - -#### Reject a call -It might come in handy in tandem with a sensor monitoring the status of the front door. When someone presses the ring button on the doorbell, if the door is opened by hand without picking up the call, the below service rejects the call. -All indoor stations including the Hik-Connect devices stop ringing. - -This example has been tested on a `DS-KD8003` outdoor unit with indoor stations named `Indoor unit`. -This type of command must be sent to an indoor station only. - -````yaml -service: hassio.addon_stdin -data: - addon: aff2db71_hikvision_doorbell - input: reject indoor_unit -```` - -## Support -If you find a bug or need support [open an issue here](https://github.com/pergolafabio/Hikvision-Addons/issues/new) on GitHub. -If possible, please provide a copy of your logs in the issue form to help us better diagnose the problem! - -### Troubleshooting -Have a look at the **Log** tab of the add-on in the Home Assistant UI. - -You can increase the verbosity by changing the `system.log_level` configuration option. For instance: -```yaml -system: - log_level: DEBUG - sdk_log_level: DEBUG -``` - -*N.B.*: When the add-on connects to a doorbell for the first time, it might happen that your door station gets stuck, because it is downloading the complete backlog of events. A reboot might be required. - diff --git a/hikvision-doorbell/README.md b/hikvision-doorbell/README.md deleted file mode 100644 index 67a8069..0000000 --- a/hikvision-doorbell/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Home Assistant Add-on: Hikvision Doorbell - -

- - Supports amd64 Architecture - - - Supports aarch64 Architecture - - - Supports i386 Architecture - -

- -Connect your Hikvision IP door stations to Home Assistant to receive events (like motion detection or incoming calls) and send back commands (like opening a door connected to the door station relay or rejecting a call). - - -## Features -- Capture doorbell **events**: _doorbell ringing_ /_motion detection_ /_door unlocked_ / _tamper alarm_ -- **Open doors** connected to the doorbell (_useful for older devices where port 80 is blocked and `ISAPI` is not available_) -- Remote actions such as **answering**/**rejecting** the call, **hanging** up. - - _This can be exploited in an HA automation. When for example a Zigbee door sensor signals a door opened, the ringing on the indoor stations and on the Hik-Connect devices is stopped. Se the documentation for more details._ -- **Reboot** the door station -- Remote scenes support such as **atHome**/**goOut**/**goToBed**/**custom** - -### Example - -Here is an example setup showing two doorbells, an indoor and an outdoor unit: - -

- -

- -## Getting started - -**Note**: **Hikvision Doorbell** requires an MQTT broker to function correctly. Refer to the **Documentation** tab of the add-on to learn how to setup the official **Mosquitto add-on**. - -- Click the following button to automatically open the add-on in you Home Assistance UI: -

- - Open your Home Assistant instance and show the dashboard of a Supervisor add-on. - -

- - If you are having problems, here are the manual steps: - - Open you Home Assistance interface, and navigate to `Settings` -> `Add-ons` -> `Add-on store` -> `Repositories` (in the upper-right corner) - - Paste the following URL in the input field: `https://github.com/pergolafabio/Hikvision-Addons` - - Confirm the dialog by clicking **ADD**. - - **Hikvision Doorbell** should be available in the `Add-on store` of your Home Assistant. (If it is not visible after some minutes, reload the store page by navigating to `Settings` -> `Add-ons` -> `Add-on store`). - -- Select the **Hikvision Doorbell** add-on, then click **INSTALL**. -- Have a look at the **Documentation** tab of the add-on to setup the required configuration and to understand how this addon can be integrated in Home Assistant -(The documentation can also be browsed online in the [Github repository](DOCS.md)). - -## Supported devices -This devices has been reported to be working from other HA users. -If your device is not on the list, we are happy to include it. Just [open an issue here][issue] on GitHub and let us know the kind of device you have. - -- DS-KV8413 -- DS-KD8003 -- DS-KV8113 -- DS-KV8213 -- DS-KV6113 -- DS-HD -- DS-KV8102-IM (Only open door supported) - - -## Additional resources -- [Add-on documentation](DOCS.md) -- [Development documentation](docs/) -- [Home Assistant community forum](https://community.home-assistant.io/t/add-on-hikvision-doorbell-integration/532796) - -## Contributing - -This is an active open-source project. We are always open to people who want to -use the code or contribute to it. Thank you for being involved! :heart_eyes: - -Have a look at the [documentation folder](docs/) for more information. - -### Contributors - - - - -Made with [contrib.rocks](https://contrib.rocks). - -## Donations - Like my work? You can always [send me a donation](https://paypal.me/pergolafabio). - -## Credits -This add-on was initially inspired by [this script](https://github.com/laszlojakab/hikvision-intercom-python-demo).