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

Can't find panel id #62

Open jsassner opened 5 months ago

jsassner commented 5 months ago

Trying to do a proxy install of risco-mqtt-local, have changed ip on panel to point to my docker instance. When i enable debug i can see that the proxy sends commands back and forth, so that part works. I can also see in the logs below that the app can retrieve the zones, but it does complain about the panel id not being able to find it. I tried entering the CPID (11 characters) and also panel_id = 1 as seen in the doc, none works.

I just realised i used a forked version from @markxroberts , but i can't create issues on his fork. Edit: i just tried the vanackej version also, latest from docker hub.

{
    "log": "verbose",
    "panel": {
        "panelIp": "192.168.0.5",
        "panelPort": 1000,
        "panelPassword": 5678,
        "panelId": 1,
        "watchDogInterval": 10000,
        "socketMode": "proxy",
        "commandsLog": false,
        "cloudUrl": "www.riscocloud.com",
        "cloudPort": 33000
    },
[+] Running 1/0
 ✔ Container risco-mqtt-local  Created                                                                                                                            0.0s
Attaching to risco-mqtt-local
risco-mqtt-local  | Loading config from: /data/config.json
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] autoConnect enabled, starting communication
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [verbose] Start Connection to Panel
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] [RML] Connecting to mqtt server: mqtt://192.168.0.1:1883
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] Listening on IP :: and Port 33000
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] [RML] Connected on mqtt server: mqtt://192.168.0.1:1883
risco-mqtt-local  | 3/19/2024, 4:33:07 PM [info] [RML] Panel is not connected, waiting
risco-mqtt-local  | 3/19/2024, 4:33:08 PM [info] Incoming connection from panel received
risco-mqtt-local  | 3/19/2024, 4:33:08 PM [info] RiscoCloud Socket: ready
risco-mqtt-local  | 3/19/2024, 4:33:08 PM [info] Setting a timer for panel connection in 30000 ms
risco-mqtt-local  | 3/19/2024, 4:33:38 PM [verbose] Authenticating to the panel
risco-mqtt-local  | 3/19/2024, 4:33:38 PM [verbose] Command[1] Sending Command: RMT=5678
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Command[1] Received data: ACK, crcOk: true
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Command[2] Sending Command: LCL
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Command[2] Received data: ACK, crcOk: true
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Setting up encryption using Panel Id
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Command[50] Received data: CLOCK=19/03/2024 16:33, crcOk: true
risco-mqtt-local  | 3/19/2024, 4:33:39 PM [verbose] Command[3] Sending Command: ZLBL*1:8?
risco-mqtt-local  | 3/19/2024, 4:33:40 PM [verbose] Command[3] Received data: ZLBL*1:8=R�kdetektor Uppe R�relse Kontoret        R�relse Ovanv�ni        Kamera VardagsrMagnet Grov-ing Magnet Fin-ing  Kamera Entre    Magnet Altan, crcOk: false
risco-mqtt-local  | 3/19/2024, 4:33:40 PM [verbose] Command[3] inCryptTest enabled, emitting response without checks to latest sent command
risco-mqtt-local  | 3/19/2024, 4:33:40 PM [warn] Bad Panel Id: 1. Trying to find the right one
risco-mqtt-local  | 3/19/2024, 4:33:41 PM [error] No remaining possible Panel Id, abandon
risco-mqtt-local  | 3/19/2024, 4:33:41 PM [error] Unable to connect to the control panel.
risco-mqtt-local  | 3/19/2024, 4:33:41 PM [verbose] Command[4] Sending Command: DCN
risco-mqtt-local  | 3/19/2024, 4:33:41 PM [verbose] Command[NaN] Received data: L5, crcOk: false
risco-mqtt-local  | 3/19/2024, 4:33:41 PM [warn] Command[NaN] Wrong CRC value for the response.
risco-mqtt-local  | 3/19/2024, 4:33:42 PM [verbose] Command[75] Received data: 75, crcOk: false
risco-mqtt-local  | 3/19/2024, 4:33:42 PM [warn] Command[75] Wrong CRC value for the response.
risco-mqtt-local  | 3/19/2024, 4:33:45 PM [verbose] Command[75] Received data: 75, crcOk: false
risco-mqtt-local  | 3/19/2024, 4:33:45 PM [warn] Command[75] Wrong CRC value for the response.
risco-mqtt-local  | 3/19/2024, 4:33:46 PM [warn] Command[4] 'DCN' Timeout
risco-mqtt-local  | 3/19/2024, 4:33:46 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":0,"commandId":4,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,17,48,52,68,67,78,23,65,53,50,52,3]}}
risco-mqtt-local  | 3/19/2024, 4:33:46 PM [warn] Error while sending DCN command
risco-mqtt-local  | 3/19/2024, 4:33:46 PM [info] TCP Socket Disconnected
risco-mqtt-local  | 3/19/2024, 4:33:46 PM [info] Won't attempt automatic reconnection
markxroberts commented 5 months ago

Can you make it work in direct mode? There are quite a few unrecognised characters in the log. Do these appear in the labels on your system?

jsassner commented 5 months ago

I tried direct mode, same issue with finding the panel id.

risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[3] Received data: ZLBL*1:8=R�kdetektor Uppe R�relse Kontoret R�relse Ovanv�ni Kamera Vardagsr Magnet Grov-ing Magnet Fin-ing Kamera Entre Magnet Altan, crcOk: false

Those characters are swedish ÅÄÖ characters.

I have an old firmware: RW132-3.82 nov 18 2013 I did read another issue in this repository that also had an old firmware, but their issue was fixed by some code fix. I can look up the issue if needed. I really hope you're not gonna say "update firmware" cause i'm a bit worried about doing that never done it before. Are there guides for how to do that?

The output:

risco-mqtt-local  | Loading config from: /data/config.json
risco-mqtt-local  | 3/21/2024, 2:59:42 PM [info] autoConnect enabled, starting communication
risco-mqtt-local  | 3/21/2024, 2:59:42 PM [verbose] Start Connection to Panel
risco-mqtt-local  | 3/21/2024, 2:59:42 PM [info] Connecting to mqtt server: mqtt://192.168.0.1:1883
risco-mqtt-local  | 3/21/2024, 2:59:42 PM [info] Connected on mqtt server: mqtt://192.168.0.1:1883
risco-mqtt-local  | 3/21/2024, 2:59:42 PM [info] Panel is not connected, waiting
risco-mqtt-local  | 3/21/2024, 2:59:46 PM [verbose] Socket Connected, log in to panel
risco-mqtt-local  | 3/21/2024, 2:59:46 PM [verbose] Authenticating to the panel
risco-mqtt-local  | 3/21/2024, 2:59:46 PM [verbose] Command[1] Sending Command: RMT=5678
risco-mqtt-local  | 3/21/2024, 2:59:51 PM [warn] Command[1] 'RMT=5678' Timeout
risco-mqtt-local  | 3/21/2024, 2:59:51 PM [verbose] Command[1] retrying command
risco-mqtt-local  | 3/21/2024, 2:59:51 PM [verbose] Command[1] Sending Command: RMT=5678
risco-mqtt-local  | 3/21/2024, 2:59:51 PM [verbose] Command[1] Received data: ACK, crcOk: true
risco-mqtt-local  | 3/21/2024, 2:59:51 PM [verbose] Command[2] Sending Command: LCL
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[2] Received data: ACK, crcOk: true
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Setting up encryption using Panel Id
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[52] Received data: PSTT1=--------R-E--, crcOk: true
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[2] inCryptTest enabled, emitting response without checks to latest sent command
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[3] Sending Command: ZLBL*1:8?
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[3] Received data: ZLBL*1:8=R�kdetektor Uppe R�relse Kontoret        R�relse Ovanv�ni  Kamera Vardagsr Magnet Grov-ing Magnet Fin-ing  Kamera Entre    Magnet Altan, crcOk: false
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [verbose] Command[3] inCryptTest enabled, emitting response without checks to latest sent command
risco-mqtt-local  | 3/21/2024, 2:59:52 PM [warn] Bad Panel Id: 1. Trying to find the right one
risco-mqtt-local  | 3/21/2024, 2:59:54 PM [error] No remaining possible Panel Id, abandon
risco-mqtt-local  | 3/21/2024, 2:59:54 PM [error] Unable to connect to the control panel.
risco-mqtt-local  | 3/21/2024, 2:59:54 PM [verbose] Command[4] Sending Command: DCN
risco-mqtt-local  | 3/21/2024, 2:59:54 PM [verbose] Command[21] Received data: 21, crcOk: false
risco-mqtt-local  | 3/21/2024, 2:59:54 PM [warn] Command[21] Wrong CRC value for the response.
risco-mqtt-local  | 3/21/2024, 2:59:59 PM [warn] Command[4] 'DCN' Timeout
risco-mqtt-local  | 3/21/2024, 2:59:59 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":0,"commandId":4,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,48,52,68,67,78,23,65,53,50,52,3]}}
risco-mqtt-local  | 3/21/2024, 2:59:59 PM [warn] Error while sending DCN command
risco-mqtt-local  | 3/21/2024, 2:59:59 PM [info] TCP Socket Disconnected
risco-mqtt-local  | 3/21/2024, 2:59:59 PM [info] Won't attempt automatic reconnection
vanackej commented 5 months ago

You can try to set log level to debug, in order to see what happens between those 2 steps :

risco-mqtt-local | 3/21/2024, 2:59:52 PM [warn] Bad Panel Id: 1. Trying to find the right one risco-mqtt-local | 3/21/2024, 2:59:54 PM [error] No remaining possible Panel Id, abandon

Le jeu. 21 mars 2024 à 15:06, Johan @.***> a écrit :

I tried direct mode, same issue with finding the panel id.

risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[3] Received data: ZLBL*1:8=R�kdetektor Uppe R�relse Kontoret R�relse Ovanv�ni Kamera Vardagsr Magnet Grov-ing Magnet Fin-ing Kamera Entre Magnet Altan, crcOk: false

Those characters are swedish ÅÄÖ characters.

I have an old firmware: RW132-3.82 nov 18 2013 I did read another issue in this repository that also had an old firmware, but their issue was fixed by some code fix. I can look up the issue if needed. I really hope you're not gonna say "update firmware" cause i'm a bit worried about doing that never done it before. Are there guides for how to do that?

The output:

risco-mqtt-local | Loading config from: /data/config.json risco-mqtt-local | 3/21/2024, 2:59:42 PM [info] autoConnect enabled, starting communication risco-mqtt-local | 3/21/2024, 2:59:42 PM [verbose] Start Connection to Panel risco-mqtt-local | 3/21/2024, 2:59:42 PM [info] Connecting to mqtt server: mqtt://192.168.0.1:1883 risco-mqtt-local | 3/21/2024, 2:59:42 PM [info] Connected on mqtt server: mqtt://192.168.0.1:1883 risco-mqtt-local | 3/21/2024, 2:59:42 PM [info] Panel is not connected, waiting risco-mqtt-local | 3/21/2024, 2:59:46 PM [verbose] Socket Connected, log in to panel risco-mqtt-local | 3/21/2024, 2:59:46 PM [verbose] Authenticating to the panel risco-mqtt-local | 3/21/2024, 2:59:46 PM [verbose] Command[1] Sending Command: RMT=5678 risco-mqtt-local | 3/21/2024, 2:59:51 PM [warn] Command[1] 'RMT=5678' Timeout risco-mqtt-local | 3/21/2024, 2:59:51 PM [verbose] Command[1] retrying command risco-mqtt-local | 3/21/2024, 2:59:51 PM [verbose] Command[1] Sending Command: RMT=5678 risco-mqtt-local | 3/21/2024, 2:59:51 PM [verbose] Command[1] Received data: ACK, crcOk: true risco-mqtt-local | 3/21/2024, 2:59:51 PM [verbose] Command[2] Sending Command: LCL risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[2] Received data: ACK, crcOk: true risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Setting up encryption using Panel Id risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[52] Received data: PSTT1=--------R-E--, crcOk: true risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[2] inCryptTest enabled, emitting response without checks to latest sent command risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[3] Sending Command: ZLBL1:8? risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[3] Received data: ZLBL1:8=R�kdetektor Uppe R�relse Kontoret R�relse Ovanv�ni Kamera Vardagsr Magnet Grov-ing Magnet Fin-ing Kamera Entre Magnet Altan, crcOk: false risco-mqtt-local | 3/21/2024, 2:59:52 PM [verbose] Command[3] inCryptTest enabled, emitting response without checks to latest sent command risco-mqtt-local | 3/21/2024, 2:59:52 PM [warn] Bad Panel Id: 1. Trying to find the right one risco-mqtt-local | 3/21/2024, 2:59:54 PM [error] No remaining possible Panel Id, abandon risco-mqtt-local | 3/21/2024, 2:59:54 PM [error] Unable to connect to the control panel. risco-mqtt-local | 3/21/2024, 2:59:54 PM [verbose] Command[4] Sending Command: DCN risco-mqtt-local | 3/21/2024, 2:59:54 PM [verbose] Command[21] Received data: 21, crcOk: false risco-mqtt-local | 3/21/2024, 2:59:54 PM [warn] Command[21] Wrong CRC value for the response. risco-mqtt-local | 3/21/2024, 2:59:59 PM [warn] Command[4] 'DCN' Timeout risco-mqtt-local | 3/21/2024, 2:59:59 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":0,"commandId":4,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,48,52,68,67,78,23,65,53,50,52,3]}} risco-mqtt-local | 3/21/2024, 2:59:59 PM [warn] Error while sending DCN command risco-mqtt-local | 3/21/2024, 2:59:59 PM [info] TCP Socket Disconnected risco-mqtt-local | 3/21/2024, 2:59:59 PM [info] Won't attempt automatic reconnection

— Reply to this email directly, view it on GitHub https://github.com/vanackej/risco-mqtt-local/issues/62#issuecomment-2012392642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECPHNMWLHKVWGZMMAHBCLYZLSM3AVCNFSM6AAAAABE52VC2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJSGM4TENRUGI . You are receiving this because you are subscribed to this thread.Message ID: @.***>