diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3830b7..c2b0c16 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ They test specific ISAPI requests and use data from `tests/fixtures/ISAPI`. They ### The behavior of the Hikvision device in HomeAssistant -They initialize the entire device in the HomeAssistant environment and uses data from `tests/fixtures/devices`. Each JSON file contains all the responses to GET requests sent by the given device. +They initialize the entire device in the HomeAssistant environment and use data from `tests/fixtures/devices`. Each JSON file contains all the responses to GET requests sent by the given device. The fixtures can be recorded for any device in the Device Info window by clicking DOWNLOAD DIAGNOSTICS button. All sensitive data such as MAC addresses, IPs, and serial numbers are anonymized so they can be safely made public. @@ -128,4 +128,4 @@ If you want to debug the tests in Visual Studio Code: 4. add a breakpoint -5. run the "Docker: Python tests debug" job in VS Code \ No newline at end of file +5. run the "Docker: Python tests debug" job in VS Code diff --git a/README.md b/README.md index 7081407..5ab3bf8 100644 --- a/README.md +++ b/README.md @@ -125,12 +125,14 @@ Download logs from `Settings / System / Logs` - DS-7616NI-Q2/16P - DS-7616NXI-I2/16P/S - DS-7716NI-I4/16P +- DS-7732NI-M4 - ERI-K104-P4 ### DVR -- iDS-7204HUHI-M1/P - iDS-7204HUHI-M1/FA/A +- iDS-7204HUHI-M1/P +- iDS-7208HQHI-M1(A)/S(C) ### IP Camera @@ -145,10 +147,14 @@ Download logs from `Settings / System / Logs` - DS-2CD2387G2-LU - DS-2CD2387G2H-LISU/SL - DS-2CD2425FWD-IW +- DS-2CD2443G0-IW +- DS-2CD2532F-IWS - DS-2CD2546G2-IS - DS-2CD2747G2-LZS - DS-2CD2785G1-IZS - DS-2CD2H46G2-IZS (C) +- DS-2CD2T46G2-ISU/SL - DS-2CD2T87G2-L - DS-2CD2T87G2P-LSU/SL - DS-2DE4425IW-DE (PTZ) +- DS-2SE4C425MWG-E/26 diff --git a/custom_components/hikvision_next/config_flow.py b/custom_components/hikvision_next/config_flow.py index 81d6ad4..48d5107 100755 --- a/custom_components/hikvision_next/config_flow.py +++ b/custom_components/hikvision_next/config_flow.py @@ -41,11 +41,11 @@ async def get_schema(self, user_input: dict[str, Any]): schema = vol.Schema( { vol.Required(CONF_HOST, default="http://"): str, + vol.Optional(CONF_VERIFY_SSL, default=True): bool, vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str, vol.Required(CONF_SET_ALARM_SERVER, default=True): bool, vol.Required(CONF_ALARM_SERVER_HOST): str, - vol.Optional(CONF_VERIFY_SSL, default=True): bool, vol.Optional(RTSP_PORT_FORCED): vol.And(int, vol.Range(min=1)), } ) diff --git a/custom_components/hikvision_next/translations/en.json b/custom_components/hikvision_next/translations/en.json index be73a34..4fa2bc7 100644 --- a/custom_components/hikvision_next/translations/en.json +++ b/custom_components/hikvision_next/translations/en.json @@ -12,8 +12,8 @@ "host": "URL", "password": "Password", "username": "Username", - "verify_ssl": "Verify Hikvision device SSL certificate (uncheck for self-signed certificate)", - "rtsp_port_forced": "RTSP port forwarded on router (Optional)", + "verify_ssl": "Verify SSL certificate (uncheck for self-signed certificate)", + "rtsp_port_forced": "Force RTSP port (Optional)", "set_alarm_server": "Set notifications host using following address:", "alarm_server": "Home Assistant address accessible by Hikvison device" } diff --git a/custom_components/hikvision_next/translations/fr.json b/custom_components/hikvision_next/translations/fr.json index fdbfe78..7a80818 100644 --- a/custom_components/hikvision_next/translations/fr.json +++ b/custom_components/hikvision_next/translations/fr.json @@ -10,8 +10,8 @@ "host": "URL", "password": "Mot de passe", "username": "Nom d'utilisateur", - "verify_ssl": "Vérifiez le certificat SSL de l'appareil Hikvision (décochez la case pour un certificat self-signed)", - "rtsp_port_forced": "Port RTSP transféré sur le routeur (facultatif)", + "verify_ssl": "Vérifiez le certificat SSL (décochez la case pour un certificat self-signed)", + "rtsp_port_forced": "Forcer le port RTSP (facultatif)", "set_alarm_server": "Définir le serveur d'alarme à l'aide l'adresse suivante :", "alarm_server": "Adresse d'Home Assistant accessible par l'appareil Hikvision" } diff --git a/custom_components/hikvision_next/translations/it.json b/custom_components/hikvision_next/translations/it.json index e9a87f1..2d48c42 100644 --- a/custom_components/hikvision_next/translations/it.json +++ b/custom_components/hikvision_next/translations/it.json @@ -10,8 +10,8 @@ "host": "URL", "password": "Password", "username": "Username", - "verify_ssl": "Verificare il certificato SSL del dispositivo Hikvision (deselezionare per il certificato self-signed)", - "rtsp_port_forced": "Porta RTSP inoltrata sul router (facoltativo)", + "verify_ssl": "Verificare il certificato SSL (deselezionare per il certificato self-signed)", + "rtsp_port_forced": "Forza la porta RTSP (facoltativo)", "set_alarm_server": "Indirizzo del server di ricezione degli allarmi:", "alarm_server": "indirizzo di Home Assistant accessibile dal dispositivo Hikvison" } diff --git a/custom_components/hikvision_next/translations/pl.json b/custom_components/hikvision_next/translations/pl.json index adfa4d7..da86cf6 100644 --- a/custom_components/hikvision_next/translations/pl.json +++ b/custom_components/hikvision_next/translations/pl.json @@ -12,8 +12,8 @@ "host": "URL", "password": "Hasło", "username": "Nazwa użytkownika", - "rtsp_port_forced": "Port RTSP przekierowany na routerze (opcjonalnie)", - "verify_ssl": "Zweryfikuj certyfikat SSL urządzenia Hikvision (odznacz dla certyfikatu self-signed)", + "rtsp_port_forced": "Wymuś port RTSP (opcjonalnie)", + "verify_ssl": "Zweryfikuj certyfikat SSL (odznacz dla certyfikatu self-signed)", "set_alarm_server": "Ustaw host powiadomień używając następującego adresu:", "alarm_server": "Adres Home Assistant dostępny dla urządzenia Hikvision" } diff --git a/custom_components/hikvision_next/translations/pt-BR.json b/custom_components/hikvision_next/translations/pt-BR.json index bf99d0e..b403225 100644 --- a/custom_components/hikvision_next/translations/pt-BR.json +++ b/custom_components/hikvision_next/translations/pt-BR.json @@ -10,8 +10,8 @@ "host": "URL", "password": "Senha", "username": "Nome de usuário", - "rtsp_port_forced": "Porta RTSP encaminhada no roteador (opcional)", - "verify_ssl": "Verifique o certificado SSL do dispositivo Hikvision (desmarque o certificado self-signed)", + "rtsp_port_forced": "Forçar porta RTSP (opcional)", + "verify_ssl": "Verifique o certificado SSL (desmarque o certificado self-signed)", "set_alarm_server": "Defina o servidor de alarme usando o seguinte endereço:", "alarm_server": "Endereço do Home Assistant acessível pelo dispositivo Hikvison" } diff --git a/custom_components/hikvision_next/translations/pt.json b/custom_components/hikvision_next/translations/pt.json index 326e761..10fe3ec 100644 --- a/custom_components/hikvision_next/translations/pt.json +++ b/custom_components/hikvision_next/translations/pt.json @@ -10,8 +10,8 @@ "host": "Link", "password": "Password", "username": "Utilizador", - "rtsp_port_forced": "Porta RTSP encaminhada no router (opcional)", - "verify_ssl": "Verifique o certificado SSL do dispositivo Hikvision (desmarque o certificado self-signed)", + "rtsp_port_forced": "Forçar porta RTSP (opcional)", + "verify_ssl": "Verifique o certificado SSL (desmarque o certificado self-signed)", "set_alarm_server": "Sefinir um alarme usando o seguinte endereço:", "alarm_server": "Home Assistant endreço é acessivel pelo Hikvison device?" } diff --git a/custom_components/hikvision_next/translations/ru.json b/custom_components/hikvision_next/translations/ru.json index 6739b5e..d0a16b8 100644 --- a/custom_components/hikvision_next/translations/ru.json +++ b/custom_components/hikvision_next/translations/ru.json @@ -10,8 +10,8 @@ "host": "URL", "password": "Пароль", "username": "Имя пользователя", - "rtsp_port_forced": "Порт RTSP перенаправлен на маршрутизатор (необязательно)", - "verify_ssl": "Проверьте SSL-сертификат устройства Hikvision (снимите флажок для self-signed сертификата)", + "rtsp_port_forced": "Принудительный RTSP-порт (необязательно)", + "verify_ssl": "Проверьте SSL-сертификат (снимите флажок для self-signed сертификата)", "set_alarm_server": "Установить сервер тревоги используя следующий адрес:", "alarm_server": "Home Assistant адрес, доступный Hikvison устройству" }