vanackej / risco-mqtt-local

Provide Risco alarm system integration to Home assistant using local TCP communication (no cloud required) and MQTT
MIT License
24 stars 11 forks source link

Connection to panel works only when bad password provided #10

Closed kkmaslowski closed 2 years ago

kkmaslowski commented 2 years ago

Hi. I tried 0.3.0 and 0.3.2 version and when panel password is correct I got warning about timeout and it starts guessing panel Id without success:

Loading config from: /usr/src/app/config.json
1/5/2022, 3:32:25 PM [info] autoConnect enabled, starting communication
1/5/2022, 3:32:25 PM [info] Connecting to mqtt server: mqtt://192.168.10.100:1883
1/5/2022, 3:32:25 PM [warn] Command[5] Command response was unexpected, ignoring. Data[N05]. sequenceId[1]
1/5/2022, 3:32:25 PM [warn] Command[5] Receipt of an error code: Invalid parameter
1/5/2022, 3:32:25 PM [info] Connected on mqtt server: mqtt://192.168.10.100:1883
1/5/2022, 3:32:25 PM [info] Panel is not connected, waiting
1/5/2022, 3:32:30 PM [warn] Command[1] 'RMT=5678' Timeout
1/5/2022, 3:32:30 PM [warn] Bad Panel Id: 1. Trying to find the right one
1/5/2022, 3:32:34 PM [error] No remaining possible Panel Id, abandon
1/5/2022, 3:32:34 PM [error] Unable to connect to the control panel.
1/5/2022, 3:32:34 PM [warn] Command[NaN] Wrong CRC value for the response.
1/5/2022, 3:32:35 PM [warn] Command[NaN] Wrong CRC value for the response.
1/5/2022, 3:32:38 PM [warn] Command[NaN] Wrong CRC value for the response.
1/5/2022, 3:32:39 PM [warn] Command[4] 'DCN' Timeout
1/5/2022, 3:32:39 PM [warn] Command[NaN] Wrong CRC value for the response.
1/5/2022, 3:32:41 PM [warn] Command[NaN] Wrong CRC value for the response.
1/5/2022, 3:32:44 PM [warn] Command[4] 'DCN' Timeout

But when I set bad panel password (1234 like in your example) it starts guessing password till 5678 and after that everything starts working correctly!!

Loading config from: /usr/src/app/config.json
1/5/2022, 3:37:11 PM [info] autoConnect enabled, starting communication
1/5/2022, 3:37:11 PM [info] Connecting to mqtt server: mqtt://192.168.10.100:1883
1/5/2022, 3:37:12 PM [warn] Command[null] Receipt of an error code: CRC Error
1/5/2022, 3:37:12 PM [info] Connected on mqtt server: mqtt://192.168.10.100:1883
1/5/2022, 3:37:12 PM [info] Panel is not connected, waiting
1/5/2022, 3:37:12 PM [warn] Command[null] Receipt of an error code: CRC Error
1/5/2022, 3:37:17 PM [warn] Command[1] 'RMT=56788' Timeout
1/5/2022, 3:37:17 PM [warn] Command[1] Receipt of an error code: Invalid Value
1/5/2022, 3:37:17 PM [warn] Provided password is incorrect
1/5/2022, 3:37:17 PM [info] Trying to guess password (brut force)
1/5/2022, 3:37:17 PM [info] Trying passwords from 0000 to 9999...
1/5/2022, 3:37:17 PM [info] 0000 to 0099...
1/5/2022, 3:37:22 PM [info] 0100 to 0199...
1/5/2022, 3:37:27 PM [info] 0200 to 0299...
1/5/2022, 3:37:32 PM [info] 0300 to 0399...
1/5/2022, 3:37:38 PM [info] 0400 to 0499...
1/5/2022, 3:37:43 PM [info] 0500 to 0599...
1/5/2022, 3:37:48 PM [info] 0600 to 0699...
1/5/2022, 3:37:54 PM [info] 0700 to 0799...
1/5/2022, 3:37:59 PM [info] 0800 to 0899...
1/5/2022, 3:38:04 PM [info] 0900 to 0999...
1/5/2022, 3:38:10 PM [info] 1000 to 1099...
1/5/2022, 3:38:17 PM [warn] Command[10] 'RMT=1037' Timeout
1/5/2022, 3:38:20 PM [info] 1100 to 1199...
...
1/5/2022, 3:42:48 PM [info] 5600 to 5699...
1/5/2022, 3:42:52 PM [info] Discovered Access Code : 5678
1/5/2022, 3:42:52 PM [info] Panel info: LightSys/RP432, FW 2.59
1/5/2022, 3:42:52 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
1/5/2022, 3:43:00 PM [warn] Command[45] 'ZLBL*25:32?' Timeout
1/5/2022, 3:43:01 PM [warn] Command[16] Receipt of an error code: Device Doesn't Exists
1/5/2022, 3:43:01 PM [info] Output does not exists, stopping outputs discovery
1/5/2022, 3:43:01 PM [info] Panel is ready, subscribing to panel partitions and zones events
1/5/2022, 3:43:01 PM [info] Panel and MQTT communications are ready
1/5/2022, 3:43:01 PM [info] Publishing Home Assistant discovery info
1/5/2022, 3:43:01 PM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA on partition 1
1/5/2022, 3:43:01 PM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA on partition 2
1/5/2022, 3:43:01 PM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA on partition 3
1/5/2022, 3:43:01 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Wiatrołap, HA name = Wiatrołap
...
Kotłownia
1/5/2022, 3:43:02 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Garaż, HA name = Garaż
1/5/2022, 3:43:02 PM [info] Subscribing to Home assistant commands topics
1/5/2022, 3:43:02 PM [info] Subscribe on riscopanel/alarm/1/set topic
1/5/2022, 3:43:02 PM [info] Subscribe on riscopanel/alarm/2/set topic
1/5/2022, 3:43:02 PM [info] Subscribe on riscopanel/alarm/3/set topic
1/5/2022, 3:43:02 PM [info] Publishing initial partitions and zones state to Home assistant
1/5/2022, 3:43:02 PM [info] [Panel => MQTT] Published alarm status disarmed on partition 1
1/5/2022, 3:43:02 PM [info] [Panel => MQTT] Published alarm status disarmed on partition 2
1/5/2022, 3:43:02 PM [info] [Panel => MQTT] Published alarm status disarmed on partition 3
1/5/2022, 3:43:02 PM [info] Initialization completed

Please check if it's not the same problem as described in: https://github.com/TJForc/risco-lan-bridge/issues/11 Or maybe it's still problem with lack of 10s delay on start: https://github.com/vanackej/risco-mqtt-local/issues/6 You also wrote in other thread: I should maybe Introduce an option to disable panel crypto check at startup, and just assume that CRC errors are CRC errors, not an encryption issue...

correct_password.txt wrong_password.txt

vanackej commented 2 years ago

Hi. I'm doing some cleanup in github issues. Can you update to latest version and reopen an issue using issue template if still applicable please ? Thx

kkmaslowski commented 2 years ago

Hi. I downloaded latest version and problem still exists.

Correct password:

Loading config from: /data/config.json
2/20/2022, 11:12:25 AM [info] autoConnect enabled, starting communication
2/20/2022, 11:12:25 AM [info] Connecting to mqtt server: mqtt://192.168.10.100:1883
2/20/2022, 11:12:26 AM [info] Connected on mqtt server: mqtt://192.168.10.100:1883
2/20/2022, 11:12:26 AM [info] Panel is not connected, waiting
2/20/2022, 11:12:34 AM [warn] Command[1] 'RMT=5678' Timeout
2/20/2022, 11:12:34 AM [warn] Bad Panel Id: 1. Trying to find the right one
2/20/2022, 11:12:37 AM [error] No remaining possible Panel Id, abandon
2/20/2022, 11:12:37 AM [error] Unable to connect to the control panel.
2/20/2022, 11:12:38 AM [warn] Command[51] Wrong CRC value for the response.
2/20/2022, 11:12:40 AM [warn] Command[51] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:12:42 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:12:42 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:12:43 AM [warn] Command[50] Wrong CRC value for the response.
2/20/2022, 11:12:46 AM [warn] Command[50] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:12:47 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:12:48 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:12:49 AM [warn] Command[50] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:12:52 AM [warn] Command[53] Wrong CRC value for the response.
2/20/2022, 11:12:52 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:12:53 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:12:55 AM [warn] Command[53] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:12:57 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:12:58 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:12:58 AM [warn] Command[53] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:13:01 AM [warn] Command[52] Wrong CRC value for the response.
2/20/2022, 11:13:02 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:13:03 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:13:04 AM [warn] Command[52] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:13:07 AM [warn] Command[52] receivedId is the same as lastReceivedId, ignoring this panel message
2/20/2022, 11:13:07 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:13:08 AM [warn] Command[NaN] Wrong CRC value for the response.
2/20/2022, 11:13:10 AM [error] Command[5] Too many bad CRC value.
2/20/2022, 11:13:12 AM [warn] Command[4] 'DCN' Timeout
2/20/2022, 11:13:13 AM [error] Command[NaN] Too many bad CRC value.
2/20/2022, 11:13:13 AM [warn] Command[5] receivedId is the same as lastReceivedId, ignoring this panel message

Wrong password:

Loading config from: /data/config.json
2/20/2022, 11:13:31 AM [info] autoConnect enabled, starting communication
2/20/2022, 11:13:31 AM [info] Connecting to mqtt server: mqtt://192.168.10.100:1883
2/20/2022, 11:13:31 AM [info] Connected on mqtt server: mqtt://192.168.10.100:1883
2/20/2022, 11:13:31 AM [info] Panel is not connected, waiting
2/20/2022, 11:13:36 AM [warn] Command[1] 'RMT=56788' Timeout
2/20/2022, 11:13:37 AM [warn] Command[1] Receipt of an error code: Invalid Value
2/20/2022, 11:13:37 AM [warn] Provided password is incorrect
2/20/2022, 11:13:37 AM [info] Trying to guess password (brut force)
2/20/2022, 11:13:37 AM [info] Trying passwords from 0000 to 9999...
2/20/2022, 11:13:37 AM [info] 0000 to 0099...
2/20/2022, 11:13:42 AM [info] 0100 to 0199...
2/20/2022, 11:13:47 AM [info] 0200 to 0299...
2/20/2022, 11:13:53 AM [info] 0300 to 0399...
2/20/2022, 11:13:58 AM [info] 0400 to 0499...
2/20/2022, 11:14:03 AM [info] 0500 to 0599...
2/20/2022, 11:14:08 AM [info] 0600 to 0699...
2/20/2022, 11:14:14 AM [info] 0700 to 0799...
2/20/2022, 11:14:19 AM [info] 0800 to 0899...
2/20/2022, 11:14:24 AM [info] 0900 to 0999...

and it starts working normally when password is guessed.

@vanackej I can't reopen issue.

pergolafabio commented 2 years ago

You need to open a new issue as he said before

kkmaslowski commented 2 years ago

Done: https://github.com/vanackej/risco-mqtt-local/issues/20