pysiaalarm icon indicating copy to clipboard operation
pysiaalarm copied to clipboard

ADM-CID not works

Open piars777 opened this issue 3 years ago • 7 comments

Hi, My alarm uses adm-cid, i added it to HA without setting the encryption key because i can set max 8 char on my alarm, the configuration is ok but from HA the status is always unknown. Can you help me please?

piars777 avatar Jun 12 '21 14:06 piars777

Hey that is fantastic since I can't test that myself, please turn on logging for both the component and package (pysiaalarm) and report back to me here! Take note that you won't see a change in ha until you do something with the alarm itself

eavanvalkenburg avatar Jun 12 '21 16:06 eavanvalkenburg

I set log level like this: homeassistant.components.pysiaalarm: debug

but i can't see any log in the console

piars777 avatar Jun 12 '21 20:06 piars777

you need:

logger:
  default: error
  logs:
    homeassistant.components.sia: debug 
    pysiaalarm: debug

eavanvalkenburg avatar Jun 14 '21 07:06 eavanvalkenburg

any update on this? the current HA integration uses the latest version of the package which has additional ADM-CID codes so should work for a lot of cases, please let me know and otherwise close this issue!

eavanvalkenburg avatar Nov 11 '21 09:11 eavanvalkenburg

Hello, i add the official HA integration and when i activate/deactivate the alarm with my remote i can see this:

`nov. 11 14:46:14 hass hass[1417]: 2021-11-11 14:46:14 DEBUG (MainThread) [homeassistant.components.sia.hub] Adding event to dispatch and bus for code RP for port 1212 and account AAAA nov. 11 14:46:14 hass hass[1417]: 2021-11-11 14:46:14 DEBUG (MainThread) [homeassistant.components.sia.sia_entity_base] Received event: Content: ], Zone (ri): 0, Code: RP, Message: , Account: AAAA, Receiver: R0, Line: L0, Timestamp: None, Length: 0015, Sequence: 0000, CRC: 7137, Calc CRC: 7137, Encrypted Content: None, Full Message: "NULL"0000R0L0#AAAA[]. nov. 11 14:46:14 hass hass[1417]: 2021-11-11 14:46:14 DEBUG (MainThread) [homeassistant.components.sia.sia_entity_base] Received event: Content: ], Zone (ri): 0, Code: RP, Message: , Account: AAAA, Receiver: R0, Line: L0, Timestamp: None, Length: 0015, Sequence: 0000, CRC: 7137, Calc CRC: 7137, Encrypted Content: None, Full Message: "NULL"0000R0L0#AAAA[]. nov. 11 14:46:18 hass hass[1417]: 2021-11-11 14:46:18 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: A3AC0029"ADM-CID"6855R0L0#AAAA[#AAAA|3441 01 042] nov. 11 14:46:18 hass hass[1417]: 2021-11-11 14:46:18 DEBUG (MainThread) [pysiaalarm.event] Content matches: {'account': 'AAAA', 'event_qualifier': '3', 'event_type': '441', 'partition': '01', 'ri': '042', 'xdata': None, 'timestamp': ''} nov. 11 14:46:18 hass hass[1417]: 2021-11-11 14:46:18 DEBUG (MainThread) [homeassistant.components.sia.hub] Adding event to dispatch and bus for code CG for port 1212 and account AAAA nov. 11 14:46:18 hass hass[1417]: 2021-11-11 14:46:18 DEBUG (MainThread) [homeassistant.components.sia.sia_entity_base] Received event: Content: #AAAA|3441 01 042], Zone (ri): 042, Code: CG, Message: , Account: AAAA, Receiver: R0, Line: L0, Timestamp: None, Length: 0029, Sequence: 6855, CRC: A3AC, Calc CRC: A3AC, Encrypted Content: None, Full Message: "ADM-CID"6855R0L0#AAAA[#AAAA|3441 01 042]. nov. 11 14:46:18 hass hass[1417]: 2021-11-11 14:46:18 DEBUG (MainThread) [homeassistant.components.sia.sia_entity_base] Received event: Content: #AAAA|3441 01 042], Zone (ri): 042, Code: CG, Message: , Account: AAAA, Receiver: R0, Line: L0, Timestamp: None, Length: 0029, Sequence: 6855, CRC: A3AC, Calc CRC: A3AC, Encrypted Content: None, Full Message: "ADM-CID"6855R0L0#AAAA[#AAAA|3441 01 042]. nov. 11 14:46:26 hass hass[1417]: 2021-11-11 14:46:26 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: B3540029"ADM-CID"6856R0L0#AAAA[#AAAA|1401 01 042] nov. 11 14:46:26 hass hass[1417]: 2021-11-11 14:46:26 DEBUG (MainThread) [pysiaalarm.event] Content matches: {'account': 'AAAA', 'event_qualifier': '1', 'event_type': '401', 'partition': '01', 'ri': '042', 'xdata': None, 'timestamp': ''} nov. 11 14:46:27 hass hass[1417]: 2021-11-11 14:46:26 DEBUG (MainThread) [homeassistant.components.sia.hub] Adding event to dispatch and bus for code OP for port 1212 and account AAAA nov. 11 14:46:27 hass hass[1417]: 2021-11-11 14:46:26 DEBUG (MainThread) [homeassistant.components.sia.sia_entity_base] Received event: Content: #AAAA|1401 01 042], Zone (ri): 042, Code: OP, Message: , Account: AAAA, Receiver: R0, Line: L0, Timestamp: None, Length: 0029, Sequence: 6856, CRC: B354, Calc CRC: B354, Encrypted Content: None, Full Message: "ADM-CID"6856R0L0#AAAA[#AAAA|1401 01 042].

`

But when i try to activate the alarm from HA i have an error: nov. 11 14:50:33 hass hass[1417]: 2021-11-11 14:50:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [2592291256] nov. 11 14:50:33 hass hass[1417]: Traceback (most recent call last): nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service nov. 11 14:50:33 hass hass[1417]: await hass.services.async_call( nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1495, in async_call nov. 11 14:50:33 hass hass[1417]: task.result() nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1530, in _execute_service nov. 11 14:50:33 hass hass[1417]: await handler.job.target(service_call) nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 213, in handle_service nov. 11 14:50:33 hass hass[1417]: await self.hass.helpers.service.entity_service_call( nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 667, in entity_service_call nov. 11 14:50:33 hass hass[1417]: future.result() # pop exception if have nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 863, in async_request_call nov. 11 14:50:33 hass hass[1417]: await coro nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 704, in _handle_entity_call nov. 11 14:50:33 hass hass[1417]: await result nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/components/alarm_control_panel/__init__.py", line 156, in async_alarm_disarm nov. 11 14:50:33 hass hass[1417]: await self.hass.async_add_executor_job(self.alarm_disarm, code) nov. 11 14:50:33 hass hass[1417]: File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run nov. 11 14:50:33 hass hass[1417]: result = self.fn(*self.args, **self.kwargs) nov. 11 14:50:33 hass hass[1417]: File "/opt/homeassistant/lib/python3.9/site-packages/homeassistant/components/alarm_control_panel/__init__.py", line 152, in alarm_disarm nov. 11 14:50:33 hass hass[1417]: raise NotImplementedError() nov. 11 14:50:33 hass hass[1417]: NotImplementedError

piars777 avatar Nov 11 '21 13:11 piars777

That you cannot set the alarm through HA is by design, because the SIA protocol doesn't allow that!

eavanvalkenburg avatar Nov 11 '21 13:11 eavanvalkenburg

how i can set it?

piars777 avatar Nov 11 '21 18:11 piars777