Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arming error #97

Open
petrleocompel opened this issue Feb 12, 2024 · 4 comments
Open

Arming error #97

petrleocompel opened this issue Feb 12, 2024 · 4 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@petrleocompel
Copy link
Owner

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:240
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:31:48 (1 occurrences)
Last logged: 10:31:48

[140061426111680] Unexpected response status code 400 returned with message { "statusCode": 4, "statusString": "Invalid Operation", "subStatusCode": "arming", "errorCode": 1073774621, "errorMsg": "arming" }
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/hikvision_axpro/alarm_control_panel.py", line 127, in async_alarm_arm_away
    await self.coordinator.async_arm_away()
  File "/config/custom_components/hikvision_axpro/__init__.py", line 319, in async_arm_away
    is_success = await self.hass.async_add_executor_job(self.axpro.arm_away, sub_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hikaxpro.py", line 197, in arm_away
    return self._base_json_request(f"http://{self.host}{consts.Endpoints.Alarm_ArmAway.replace('{}', sid)}",
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hikaxpro.py", line 180, in _base_json_request
    raise errors.UnexpectedResponseCodeError(response.status_code, response.text)
errors.errors.UnexpectedResponseCodeError: Unexpected response status code 400 returned with message { "statusCode": 4, "statusString": "Invalid Operation", "subStatusCode": "arming", "errorCode": 1073774621, "errorMsg": "arming" }

@petrleocompel petrleocompel added the bug Something isn't working label Feb 12, 2024
@petrleocompel petrleocompel self-assigned this Feb 12, 2024
@petrleocompel petrleocompel added the question Further information is requested label Aug 29, 2024
@petrleocompel
Copy link
Owner Author

Could be a problem of "open zone" or user not having permission to arm

@Drealine
Copy link

Hi @petrleocompel
Having the same issue but with some new cases.
I can arm/disarm but can't switch from home to away in HomeAssistant, it give me the same error

@PierluigiGreto
Copy link

Hello,

I have the same issue with an AX PRO device. Please let me know if I can help in finding the issue.
When I arm the alarm with the official app there is a prompt showing that the battery is lost and that there isn't 3g connection, can be this the issue blocking the API?

Thank you

@petrleocompel
Copy link
Owner Author

@Drealine @PierluigiGreto

It is not a same issue until you provide logs.
Arming works in general. I am using it every day.

You can read the FAQ of dev branch currently.
https://github.com/petrleocompel/hikaxpro_hacs/tree/dev?tab=readme-ov-file#cannot-arm-my-system-with-ha
It will give you some general help.
Also if you want me to "focus" on this you need to provide logs.

This log is from somebody who send it via email and I have no clue who was it.
Also his system was not supporting the endpoint so it seems like dead point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants