pergolafabio / Hikvision-Addons

Home Assistant: Hikvision Doorbell
187 stars 41 forks source link

Answer call not working #192

Closed tv4you2016 closed 8 months ago

tv4you2016 commented 8 months ago

What happened?

Hi, I'm using a DS-KH6320-WTE1 + DS-KD8003-IME1

Add-on

Hikvision Doorbell

What version of the add-on are you running?

3.0.0-beta.59

Installation type

Home Assistant add-on

Relevant log output

<NoNeedReboot>
<videoResolutionChange opt="true"/>
<videoFrameRateChange opt="true"/>
</NoNeedReboot>
</IpViewDevAbility>

2024-03-25 15:15:15.269 | DEBUG    | mqtt:__init__:165 - Configuring 2 door switches
2024-03-25 15:15:15.276 | DEBUG    | event:register_handler:234 - Adding event handler MQTT
2024-03-25 15:15:15.279 | DEBUG    | mqtt_input:__init__:21 - Setting up MQTTInput
2024-03-25 15:15:15.280 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/System/deviceInfo  
[2024-03-25 15:15:15.282][INF] Private connect 192.168.0.64:8000 sock=148 this=0xe3d6be4 cmd=0x117000 port=58884
2024-03-25 15:15:15.287 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: <DeviceInfo version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<deviceName>Embedded Net VIS</deviceName>
<deviceID>48443832-3234-3337-3138-bcbac28b4ba5</deviceID>
<model>DS-KH6320-WTE1</model>
<serialNumber>DS-KH6320-WTE10120191105WRD82243718CLU</serialNumber>
<macAddress>bc:ba:c2:8b:4b:a5</macAddress>
<firmwareVersion>V2.2.2</firmwareVersion>
<firmwareReleasedDate>build 221129</firmwareReleasedDate>
<encoderVersion>V1.0</encoderVersion>
<encoderReleasedDate>build 000000</encoderReleasedDate>
<deviceType>DVR</deviceType>
<RS485Num>1</RS485Num>
<telecontrolID>255</telecontrolID>
<alarmOutNum>2</alarmOutNum>
<alarmInNum>8</alarmInNum>
<customizedInfo></customizedInfo>
<OEMCode>1</OEMCode>
</DeviceInfo>

[2024-03-25 15:15:15.287][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]
2024-03-25 15:15:15.306 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/System/deviceInfo  
2024-03-25 15:15:15.321 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: <DeviceInfo version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<deviceName>OUTDOOR STATION</deviceName>
<deviceID>7d49925b-4fc7-406b-a0ec-bcbac28b982c</deviceID>
<deviceDescription> Vis</deviceDescription>
<deviceLocation>STD-CGI</deviceLocation>
<systemContact>STD-CGI</systemContact>
<model>DS-KD8003-IME1</model>
<serialNumber>DS-KD8003-IME10120191109RRD82865016</serialNumber>
<macAddress>bc:ba:c2:8b:98:2c</macAddress>
<firmwareVersion>V2.2.56</firmwareVersion>
<firmwareReleasedDate>build 220713</firmwareReleasedDate>
<bootVersion>33685560</bootVersion>
<bootReleasedDate>1443597</bootReleasedDate>
<hardwareVersion>0x0</hardwareVersion>
<encoderVersion>V4.0</encoderVersion>
<encoderReleasedDate>build 181206</encoderReleasedDate>
<deviceType>    Vis</deviceType>
<telecontrolID>88</telecontrolID>
<supportBeep>true</supportBeep>
<supportVideoLoss>true</supportVideoLoss>
<alarmOutNum>2</alarmOutNum>
<alarmInNum>4</alarmInNum>
<RS485Num>1</RS485Num>
<customizedInfo></customizedInfo>
</DeviceInfo>

[2024-03-25 15:15:15.312][INF] Private connect 192.168.0.63:8000 sock=175 this=0xe3d6be4 cmd=0x117000 port=59072
[2024-03-25 15:15:15.321][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]
2024-03-25 15:15:15.335 | DEBUG    | event:start:255 - Registering callback function using SDK
2024-03-25 15:15:15.335 | DEBUG    | doorbell:setup_alarm:90 - Arming the device via SDK
2024-03-25 15:15:15.342 | DEBUG    | doorbell:setup_alarm:90 - Arming the device via SDK
[2024-03-25 15:15:15.339][INF] Private connect 192.168.0.64:8000 sock=202 this=0xe3d6be4 cmd=0x111020 port=58898
[2024-03-25 15:15:15.345][INF] Private connect 192.168.0.63:8000 sock=205 this=0xe3d71c8 cmd=0x111020 port=59086
2024-03-25 15:15:15.359 | DEBUG    | input:loop_forever:29 - Waiting for input command
[2024-03-25 15:15:45.407][DBG] Alarm chan [1] recv timeout[2]!
[2024-03-25 15:16:15.443][DBG] Alarm chan [1] recv timeout[2]!
2024-03-25 15:16:25.664 | DEBUG    | event:_handle_callback:220 - Callback invoked from SDK
2024-03-25 15:16:25.666 | DEBUG    | event:_invoke_handlers:192 - Invoking 2 handlers
2024-03-25 15:16:25.666 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from Outdoor
2024-03-25 15:16:25.667 | INFO     | mqtt:video_intercom_alarm:374 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', port=1883, username='addons', password='aKaiL9ewo5Aed6phewu9shei9eyieSho2eejoh0aih6eQuohphieye8hue9roh6N', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, discovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='Outdoor', model='DS-KD8003-IME1', manufacturer='Hikvision', sw_version='V2.2.56', hw_version='0x0', identifiers='6883457568564848514573776949484950484957494948578282685650565453484954', connections=None, configuration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', object_id='outdoor_call_state', qos=None, unique_id='6883457568564848514573776949484950484957494948578282685650565453484954-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/Outdoor/Call-state
config_topic: homeassistant/sensor/Outdoor/Call-state/config
state_topic: hmd/sensor/Outdoor/Call-state/state
wrote_configuration: True

[2024-03-25 15:16:25.664][INF] Alarm[1] IP[192.168.0.63] data_len[568] alarm_len[568] status[430]
2024-03-25 15:16:29.457 | INFO     | mqtt_input:_reject_call_callback:308 - Received reject command for doorbell: Indoor
2024-03-25 15:16:29.458 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/VideoIntercom/callSignal?format=json {"CallSignal": {"cmdType": "reject"}} 
[2024-03-25 15:16:29.464][INF] Private connect 192.168.0.64:8000 sock=206 this=0xe3d77ac cmd=0x117001 port=46038
2024-03-25 15:16:29.484 | DEBUG    | sdk.utils:call_ISAPI:165 - Response output: {
    "statusCode":   "1",
    "statusString": "OK",
    "errorMsg": "ok",
    "errorCode":    1
}
[2024-03-25 15:16:29.484][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]
2024-03-25 15:16:30.486 | DEBUG    | event:_handle_callback:220 - Callback invoked from SDK
2024-03-25 15:16:30.488 | DEBUG    | event:_invoke_handlers:192 - Invoking 2 handlers
2024-03-25 15:16:30.488 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from Outdoor
2024-03-25 15:16:30.488 | INFO     | mqtt:video_intercom_alarm:377 - Call dismissed, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', port=1883, username='addons', password='aKaiL9ewo5Aed6phewu9shei9eyieSho2eejoh0aih6eQuohphieye8hue9roh6N', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, discovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='Outdoor', model='DS-KD8003-IME1', manufacturer='Hikvision', sw_version='V2.2.56', hw_version='0x0', identifiers='6883457568564848514573776949484950484957494948578282685650565453484954', connections=None, configuration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', object_id='outdoor_call_state', qos=None, unique_id='6883457568564848514573776949484950484957494948578282685650565453484954-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/Outdoor/Call-state
config_topic: homeassistant/sensor/Outdoor/Call-state/config
state_topic: hmd/sensor/Outdoor/Call-state/state
wrote_configuration: True

[2024-03-25 15:16:30.486][INF] Alarm[1] IP[192.168.0.63] data_len[568] alarm_len[568] status[430]
[2024-03-25 15:16:45.505][DBG] Alarm chan [1] recv timeout[2]!
2024-03-25 15:16:49.029 | DEBUG    | event:_handle_callback:220 - Callback invoked from SDK
[2024-03-25 15:16:49.029][INF] Alarm[1] IP[192.168.0.63] data_len[568] alarm_len[568] status[430]
2024-03-25 15:16:49.032 | DEBUG    | event:_invoke_handlers:192 - Invoking 2 handlers
2024-03-25 15:16:49.033 | INFO     | event:video_intercom_alarm:120 - Video intercom alarm from Outdoor
2024-03-25 15:16:49.035 | INFO     | mqtt:video_intercom_alarm:374 - Doorbell ringing, updating sensor 
settings: mqtt=MQTT(host='core-mosquitto', port=1883, username='addons', password='aKaiL9ewo5Aed6phewu9shei9eyieSho2eejoh0aih6eQuohphieye8hue9roh6N', client_name=None, tls_key=None, tls_certfile=None, tls_ca_cert=None, discovery_prefix='homeassistant', state_prefix='hmd') entity=SensorInfo(component='sensor', device=DeviceInfo(name='Outdoor', model='DS-KD8003-IME1', manufacturer='Hikvision', sw_version='V2.2.56', hw_version='0x0', identifiers='6883457568564848514573776949484950484957494948578282685650565453484954', connections=None, configuration_url=None), device_class=None, enabled_by_default=None, entity_category=None, expire_after=None, force_update=None, icon='mdi:bell', name='Call state', object_id='outdoor_call_state', qos=None, unique_id='6883457568564848514573776949484950484957494948578282685650565453484954-call_state', unit_of_measurement=None, state_class=None) debug=False manual_availability=True
topic_prefix: sensor/Outdoor/Call-state
config_topic: homeassistant/sensor/Outdoor/Call-state/config
state_topic: hmd/sensor/Outdoor/Call-state/state
wrote_configuration: True

2024-03-25 15:16:52.692 | INFO     | mqtt_input:_answer_call_callback:354 - Received answer command for doorbell: Indoor
2024-03-25 15:16:52.693 | DEBUG    | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: PUT /ISAPI/VideoIntercom/callSignal?format=json {"CallSignal": {"cmdType": "answer"}} 
2024-03-25 15:16:52.703 | DEBUG    | sdk.utils:call_ISAPI:162 - Response status: {
    "statusCode":   "4",
    "statusString": "Invalid Operation",
    "subStatusCode":    "Unknow",
    "errorMsg": "noRequest",
    "errorCode":    1073770506
}
2024-03-25 15:16:52.704 | ERROR    | mqtt_input:_answer_call_callback:367 - Error while answering call with ISAPI: ('Error while calling ISAPI /ISAPI/VideoIntercom/callSignal?format=json', 29, 'Device operation failed.')
[2024-03-25 15:16:52.697][INF] Private connect 192.168.0.64:8000 sock=206 this=0xe3d77ac cmd=0x117001 port=42142
[2024-03-25 15:16:52.703][DBG] SimpleSTDCommandToDvr with out cmd[PUT /ISAPI/VideoIntercom/callSignal?format=json], input size[37], max segment length[262144]

Relevant configuration

No response

Anything else?

No response

pergolafabio commented 8 months ago

remember, to make "answer" working, for some reason , Hikconnect is mandatory, your indoor station needs to be connected to hikconnect and offcourse, you can only send "anwser" when the indoor is in "ringing" state

pergolafabio commented 8 months ago

Let me know if you still have Q

tv4you2016 commented 6 months ago

@pergolafabio Sorry for my late response, but for personal reasons I couldn't do it sooner. I have to say that after activating Hikconnect everything worked. I can answer the call, turn off reject and activate the lock. You can add these 2 devices to the list of compatible devices

pergolafabio commented 6 months ago

no problem

alltough i still dont know why hikconnect is needed for this to work :-)