pergolafabio / Hikvision-Addons

Home Assistant: Hikvision Doorbell
182 stars 40 forks source link

[Errno 1] Operation not permitted #183

Closed pergolafabio closed 9 months ago

pergolafabio commented 9 months ago

What happened?

A user on openhab forum, with "newer" device type is reporing error below on startup, the events are working tough Device Type: DS-KV9503-WBE1 https://community.openhab.org/t/hikvision-hikvision-ds-kis604-s-b-grab-ring-bell-signal/138075/50

Add-on

Hikvision Doorbell

What version of the add-on are you running?

3.0.14

Installation type

Docker container (standalone)

Relevant log output

2024-01-23 18:33:36.861 | DEBUG | doorbell:setup_alarm:90 - Arming the device via SDK
Exception in callback BaseSelectorEventLoop._add_reader(0, >)
handle: <Handle BaseSelectorEventLoop._add_reader(0, >)>
Traceback (most recent call last):

File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 256, in _add_reader*
key = self._selector.get_key(fd)*
File “/usr/local/lib/python3.10/selectors.py”, line 193, in get_key*
raise KeyError(“{!r} is not registered”.format(fileobj)) from None*
KeyError: ‘0 is not registered’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.10/asyncio/events.py”, line 80, in _run*
self._context.run(self._callback, self._args)
File “/usr/local/lib/python3.10/asyncio/selector_events.py”, line 258, in _add_reader*
self._selector.register(fd, selectors.EVENT_READ,*
File “/usr/local/lib/python3.10/selectors.py”, line 360, in register*
self._selector.register(key.fd, poller_events)*
PermissionError: [Errno 1] Operation not permitted
2024-01-23 18:33:36.866 | DEBUG | input:loop_forever:29 - Waiting for input command
[2024-01-23 18:33:36.863][INF] Private connect 192.168.1.60:8000 sock=169 this=0xb58abce4 cmd=0x111020 port=41626
2024-01-23 18:33:51.390 | DEBUG | event:_handle_callback:220 - Callback invoked from SDK
[2024-01-23 18:33:51.390][INF] Alarm[0] IP[192.168.1.60] data_len[568] alarm_len[568] status[104]
2024-01-23 18:33:51.391 | DEBUG | event:_invoke_handlers:192 - Invoking 2 handlers
*2024-01-23 18:33:51.392 | DEBUG | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/System/deviceInfo *
[2024-01-23 18:33:51.395][INF] Private connect 192.168.1.60:8000 sock=172 this=0xb58ac2c8 cmd=0x117000 port=34764
2024-01-23 18:33:51.401 | DEBUG | sdk.utils:call_ISAPI:165 - Response output:
OUTDOOR STATION
xxxxxxxxxx
VIS
STD-CGI
STD-CGI
DS-KV9503-WBE1
DS-KV9503-xxxxxxxx
xxxxxxxxxx
V2.3.5
build 230328
33751045
1508124
0x10101
VIS
doorStation
88
true
true
0
1
baseline
1
4
e255

Relevant configuration

No response

Anything else?

No response

Andrey19-01 commented 9 months ago

Hikvision Doorbell (Beta) Current version: 3.0.0-beta.57 start

true

2024-01-25 09:22:33.652 | DEBUG | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/System/IO/outputs
[2024-01-25 09:22:33.645][INF] Private connect 192.168.1.65:8000 sock=136 this=0x729c0bd4 cmd=0x11000 port=40720 2024-01-25 09:22:33.663 | DEBUG | sdk.utils:call_ISAPI:162 - Response status:

4 Invalid Operation notSupport

2024-01-25 09:22:33.664 | DEBUG | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/AccessControl/RemoteControl/door/capabilities
[2024-01-25 09:22:33.656][INF] Private connect 192.168.1.65:8000 sock=136 this=0x729c0bd4 cmd=0x117000 port=40730 [2024-01-25 09:22:33.663][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/IO/outputs], input size[0], max segment length[262144] 2024-01-25 09:22:33.675 | DEBUG | sdk.utils:call_ISAPI:165 - Response output:

[2024-01-25 09:22:33.667][INF] Private connect 192.168.1.65:8000 sock=136 this=0x729c0bd4 cmd=0x117000 port=40740 [2024-01-25 09:22:33.675][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/AccessControl/RemoteControl/door/capabilities], input size[0], max segment length[262144] 2024-01-25 09:22:33.676 | DEBUG | mqtt:init:166 - Configuring 2 door switches 2024-01-25 09:22:33.685 | DEBUG | event:register_handler:234 - Adding event handler MQTT 2024-01-25 09:22:33.686 | DEBUG | mqtt_input:init:21 - Setting up MQTTInput 2024-01-25 09:22:33.687 | DEBUG | sdk.utils:call_ISAPI:125 - Call ISAPI request method url body: GET /ISAPI/System/deviceInfo
[2024-01-25 09:22:33.690][INF] Private connect 192.168.1.65:8000 sock=142 this=0x729c0bd4 cmd=0x117000 port=40756 2024-01-25 09:22:33.708 | DEBUG | sdk.utils:call_ISAPI:165 - Response output:

OUTDOOR STATION 7d49925b-4fc7-406b-a0ec-000000000000 VIS STD-CGI STD-CGI DS-KV9503-WBE1 DS-KV9503-WBE10020230920ENAG9149283 08:54:11:0a:46:e4 V2.3.5 build 230906 33751045 1509638 0x10101 VIS doorStation 88 true true 0 1 baseline 1 4 e255

[2024-01-25 09:22:33.708][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144] 2024-01-25 09:22:33.755 | DEBUG | event:start:255 - Registering callback function using SDK 2024-01-25 09:22:33.756 | DEBUG | doorbell:setup_alarm:90 - Arming the device via SDK 2024-01-25 09:22:33.761 | DEBUG | input:loop_forever:29 - Waiting for input command [2024-01-25 09:22:33.758][INF] Private connect 192.168.1.65:8000 sock=169 this=0x729c0bd4 cmd=0x111020 port=40758

pergolafabio commented 9 months ago

Hmm, don't see any error here , this is not the start of the log... , it's too much, can you disable debug and start add-on again and then post from beginning?

Does everything work for you?

Andrey19-01 commented 9 months ago

Вызов по прежнему не приходит, ответить я не могу. Жду, что ответит европейская техподдержка, почему нет вызова в хикконнект

2024-01-25 11:28:41.455 | DEBUG | config:load_mqtt_config:129 - Loading MQTT configuration from supervisor 2024-01-25 11:28:41.456 | DEBUG | config:mqtt_config_from_supervisor:36 - Requesting MQTT service configuration to supervisor 2024-01-25 11:28:41.465 | INFO | sdk.utils:loadSDK:44 - Using OS: Linux with architecture: x86_64 loop[2] find 2 mac and 0 ip [2024-01-25 11:28:41.485][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/lib/x86_64-linux-gnu/libz.so.1.2.11], hHandleRet[-1713715456] [2024-01-25 11:28:41.491][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-amd64/libcrypto.so], hHandleRet[-1709845472] [2024-01-25 11:28:41.492][DBG] CCoreGlobalCtrlBase::LoadDSo, HPR_LoadDSo Succ, Path[/app/lib-amd64/libssl.so], hHandleRet[-1709070736] 2024-01-25 11:28:41.600 | INFO | doorbell:authenticate:79 - Connected to doorbell: OutDoor 2024-01-25 11:28:41.600 | INFO | event:init:87 - Setting up event handler: Console stdout 2024-01-25 11:28:41.601 | INFO | mqtt:init:117 - Setting up event handler: MQTT [2024-01-25 11:28:41.603][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCVoiceTalk.so] SUCC [2024-01-25 11:28:41.604][DBG] AbilityAnalyze---Init-- over, DeviceList path [/app/lib-amd64/HCNetSDKCom/LocalXml/DeviceList.xml], load result[0] [2024-01-25 11:28:41.605][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCGeneralCfgMgr.so] SUCC [2024-01-25 11:28:41.606][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCPlayBack.so] SUCC [2024-01-25 11:28:41.607][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCIndustry.so] SUCC [2024-01-25 11:28:41.607][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCDisplay.so] SUCC [2024-01-25 11:28:41.607][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCPreview.so] SUCC [2024-01-25 11:28:41.608][DBG] CComBase::Load, Load szDllPath[/app/lib-amd64/HCNetSDKCom/libHCAlarm.so] SUCC [2024-01-25 11:28:41.611][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144] [2024-01-25 11:28:41.662][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/IO/outputs], input size[0], max segment length[262144] [2024-01-25 11:28:41.668][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/AccessControl/RemoteControl/door/capabilities], input size[0], max segment length[262144] [2024-01-25 11:28:41.693][DBG] SimpleSTDCommandToDvr with out cmd[GET /ISAPI/System/deviceInfo], input size[0], max segment length[262144]

В четверг, 25 январь 2024 г. 10:11:10 (+03:00), Pergola Fabio пишет:

Hmm, don't see any error here , this is not the start of the log... , it's too much, can you disable debug and start add-on again and then post from beginning?

Does everything work for you?

— Reply to this email directly, view it on GitHub https://github.com/pergolafabio/Hikvision-Addons/issues/183#issuecomment-1909475818 , or unsubscribe https://github.com/notifications/unsubscribe-auth/A4QU2GQ7YJFFAIGH3VWP2U3YQIAQXAVCNFSM6AAAAABCIJBSP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGQ3TKOBRHA . You are receiving this because you commented.

-- Степанюк А.И. Раб. 01631 9 00 00 МТС, Viber, Telegram +375 29 200 74 42 Skype:Stepanuyk

pergolafabio commented 9 months ago

my guess there is no call event in the SDK, but in latest addon, i have added a "caller info" button, you can make for example an sensor to trigger that every xx seconds, to see the status, .. its a polling , not that great, but better then nothing