TJForc / risco-lan-bridge

risco-lan-bridge is a "bridge" between a node.js application and a Risco Panel
Other
21 stars 12 forks source link

Socket Error : Destroy Panel Socket due to RiscoCloud Socket Error #14

Closed pergolafabio closed 2 years ago

pergolafabio commented 2 years ago

PS: not related to this : https://github.com/TJForc/risco-lan-bridge/issues/13

ok, i had the project running for a day, this night i got a mail alert that my panel was offline for a few minutes, it seems it was retsored... but what could be the cause? it was offline for about 10 minutes, i grabbed the log files , see below

thnx for looking into it

Response from Panel.
Expected response for Command Id : 20.
Received From Panel : CLOCK=01/12/2021 03:23
Clock datas.
[Panel => MQTT] Published alarm online
SendCommand receive this response : CLOCK=01/12/2021 03:23
Sending Command : CLOCK
Command CRC Value : C66C
Command Sent.
Sequence : 21 - Data Sent : CLOCK
Received data Buffer from Panel : [2,17,48,52,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,135,127,145,144,5,190,3]
Received data Buffer : [2,17,48,52,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,135,127,145,144,5,190,3]
Command CRC Value : A1F9
CRC Ok
Response from Panel.
Expected response for Command Id : 21.
Received From Panel : CLOCK=01/12/2021 03:23
Clock datas.
[Panel => MQTT] Published alarm online
SendCommand receive this response : CLOCK=01/12/2021 03:23
RiscoCloud Socket Error : Error: read ETIMEDOUT
Socket Error : Destroy Panel Socket due to RiscoCloud Socket Error
Socket Closed.
TCP Socket Disconnected
RiscoCloud Socket Closed.
Sending Command : CLOCK
Command CRC Value : C65F
Socket Destroyed while using it.
TCP Socket Disconnected
Start Connection to Panel
TCP Socket is already created, Connect It
Listening on IP :: and Port 33000
TCP Socket must be created now
Panel Socket and RiscoCloud Socket Connected.
Received Cloud data Buffer from Panel : 
Sending Command : CLOCK
Command CRC Value : C65F
Command Sent.
Sequence : 22 - Data Sent : CLOCK
Received Cloud data Buffer from RiscoCloud : 
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from RiscoCloud : 
Received Cloud data Buffer from RiscoCloud 
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from Panel : 
Command : '22 CLOCK' Timeout!!!
SendCommand receive this response : undefined
Received Cloud data Buffer from RiscoCloud : [2,19,53,52,0,16,2,0,5,0,23,50,67,68,70,3]
Received Cloud data Buffer from Panel : [2,19,53,53,4,56,0,5,0,4,1,0,1,0,80,101,114,103,111,108,97,32,81,117,105,110,116,101,110,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,57,67,50,65,3]
Sending Command : CLOCK
Command CRC Value : C65F
Command Sent.
Sequence : 22 - Data Sent : CLOCK
Received data Buffer from Panel : [2,50,50,78,48,53,23,66,52,55,68,3]
Received data Buffer : [2,50,50,78,48,53,23,66,52,55,68,3]
Command CRC Value : B47D
CRC Ok
Response from Panel.
Expected response for Command Id : 22.
Received From Panel : N05
Receipt of an error code: Invalid parameter
SendCommand receive this response : N05
Received Cloud data Buffer from RiscoCloud : [2,19,53,53,0,16,2,0,5,0,23,69,67,67,70,3]
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from RiscoCloud :
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from RiscoCloud 
Received Cloud data Buffer from Panel : 
Received Cloud data Buffer from RiscoCloud : [2,19,53,57,0,16,2,0,10,0,23,69,70,51,51,3]
Received Cloud data Buffer from RiscoCloud : [2,19,53,57,0,9,0,16,3,0,82,35,16,3,33,18,1,16,3,23,68,55,53,69,3]
Sending Command : CLOCK
Command CRC Value : 064F
Command Sent.
Sequence : 23 - Data Sent : CLOCK
Received data Buffer from Panel : [2,50,51,78,48,53,23,55,52,52,48,3]
Received data Buffer : [2,50,51,78,48,53,23,55,52,52,48,3]
Command CRC Value : 7440
CRC Ok

Data from Panel, need to send an ACK.
Sending Ack.
Command CRC Value : 5F27
Received From Panel : CLOCK=01/12/2021 03:24
Clock datas.
[Panel => MQTT] Published alarm online
Sending Command : CUSTLST??
Command CRC Value : 4392
Command Sent.
Sequence : 28 - Data Sent : CUSTLST??
Received data Buffer from Panel : 
Received data Buffer : 
Command CRC Value : 3EE6
CRC Ok
Response from Panel.
Expected response for Command Id : 28.
Received From Panel : CUSTLST=0EN;0IT;0IL;0HU;0UK;0SP;0PL;0GR;0BR;0RU;0NL;0FR;0CN;0DK;0CZ;0AU;0TH;0DE
SendCommand receive this response : CUSTLST=0EN;0IT;0IL;0HU;0UK;0SP;0PL;0GR;0BR;0RU;0NL;0FR;0CN;0DK;0CZ;0AU;0TH;0DE
Response crypt: CUSTLST=0EN;0IT;0IL;0HU;0UK;0SP;0PL;0GR;0BR;0RU;0NL;0FR;0CN;0DK;0CZ;0AU;0TH;0DE
Connection to the control panel successfully established.
Risco Panel Connected.
Sending Command : PNLCNF
Command CRC Value : 37CD
Command Sent.
Sequence : 29 - Data Sent : PNLCNF
Received data Buffer from Panel : [2,17,48,60,91,89,99,29,243,60,201,186,128,149,113,183,28,80,25,106,141,3]
Received data Buffer : [2,17,48,60,91,89,99,29,243,60,201,186,128,149,113,183,28,80,25,106,141,3]
Command CRC Value : F408
Response from Panel.
Expected response for Command Id : 36.
Received From Panel : ZLBL*1:8=Bureau   Living  Inkom   Boven               Keuken  RM Bureau           RM Zolder           RM Wasplaats    
SendCommand receive this response : ZLBL*1:8=Bureau Living  Inkom   Boven               Keuken  RM Bureau           RM Zolder           RM Wasplaats    
Sending Command : ZSTT*1:8?
Command CRC Value : 4FB9
Command Sent.
Sequence : 37 - Data Sent : ZSTT*1:8?
Received data Buffer from Panel : 
Received data Buffer : 
Command CRC Value : C5C7
CRC Ok
Response from Panel.
Expected response for Command Id : 37.
Received From Panel : ZSTT*1:8=-A--------   -A--------  -A--------  ----------  -A--------  -A--------  -A--------  -A--------
Zone Status datas.
SendCommand receive this response : ZSTT*1:8=-A-------- -A--------  -A--------  ----------  -A--------  -A--------  -A--------  -A--------
Sending Command : ZLNKTYP1?
Command CRC Value : D4CC
Command Sent.
Sequence : 38 - Data Sent : ZLNKTYP1?
Received data Buffer from Panel : [2,17,49,61,81,91,97,21,233,35,164,217,237,228,85,195,73,38,21,3]
Received data Buffer : [2,17,49,61,81,91,97,21,233,35,164,217,237,228,85,195,73,38,21,3]
Command CRC Value : FB08

Response from Panel.
Expected response for Command Id : 49.
Received From Panel : ZLBL*9:16=RM Nachthal         Zone 10 Zone 11 Zone 12 Zone 13 Zone 14 Zone 15 Zone 16
SendCommand receive this response : ZLBL*9:16=RM Nachthal       Zone 10 Zone 11 Zone 12 Zone 13 Zone 14 Zone 15 Zone 16
Sending Command : ZSTT*9:16?
Command CRC Value : A10F
Command Sent.
Sequence : 1 - Data Sent : ZSTT*9:16?
Received data Buffer from Panel : 
Received data Buffer : 
Command CRC Value : 8F83
CRC Ok
Response from Panel.
Expected response for Command Id : 01.
Received From Panel : ZSTT*9:16=-A--------  ----------  ----------  ----------  ----------  ----------  ----------  ----------
Zone Status datas.
SendCommand receive this response : ZSTT*9:16=-A--------    ----------  ----------  ----------  ----------  ----------  ----------  ----------
Sending Command : ZLNKTYP9?
Command CRC Value : CA68
Command Sent.
Sequence : 2 - Data Sent : ZLNKTYP9?
Received data Buffer from Panel : [2,17,50,55,81,91,97,21,233,35,164,209,237,228,85,177,59,39,26,3]
Received data Buffer : [2,17,50,55,81,91,97,21,233,35,164,209,237,228,85,177,59,39,26,3]
Command CRC Value : 4017

Response from Panel.
Expected response for Command Id : 08.
Received From Panel : PSTT*1:4=-------HR-E----- ----------------    ----------------    ----------------
Partition Status data.
SendCommand receive this response : PSTT*1:4=-------HR-E-----   ----------------    ----------------    ----------------
End of device discovery.
[Panel => MQTT] Published alarm_control_panel for homeassistant autodiscovery on partition 1
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : Bureau
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : Living
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : Inkom
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : Boven           
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : Keuken
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : RM Bureau       
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : RM Zolder       
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : RM Wasplaats
[Panel => MQTT] Published binary_sensor for homeassistant autodiscovery : RM Nachthal     
Subscribe on riscopanel/alarm/1/set topic
[Panel => MQTT] Published alarm online
[Panel => MQTT] Published alarm status armed_home on partition 1
[Panel => MQTT] Published sensor status 0 on zone Bureau
[Panel => MQTT] Published sensor status 0 on zone Living
[Panel => MQTT] Published sensor status 0 on zone Inkom
[Panel => MQTT] Published sensor status 0 on zone Boven           
[Panel => MQTT] Published sensor status 0 on zone Keuken
[Panel => MQTT] Published sensor status 0 on zone RM Bureau       
[Panel => MQTT] Published sensor status 0 on zone RM Zolder       
[Panel => MQTT] Published sensor status 0 on zone RM Wasplaats
[Panel => MQTT] Published sensor status 0 on zone RM Nachthal     
System initialization completed.
Command : '12 CLOCK' Timeout!!!
SendCommand receive this response : undefined
Sending Command : CLOCK
Command CRC Value : DF64
Command Sent.
Sequence : 9 - Data Sent : CLOCK
Received data Buffer from Panel : [2,17,50,60,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,147,152,1,176,3]
Received data Buffer : [2,17,50,60,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,147,152,1,176,3]
Command CRC Value : C9B7
CRC Ok
Response from Panel.
Expected response for Command Id : 09.
Received From Panel : CLOCK=01/12/2021 03:24
Clock datas.
[Panel => MQTT] Published alarm online
[Panel => MQTT] Published alarm online
SendCommand receive this response : CLOCK=01/12/2021 03:24
Sending Command : CLOCK
Command CRC Value : 133C
Command Sent.
Sequence : 10 - Data Sent : CLOCK
Received data Buffer from Panel : [2,17,51,53,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,228,231,118,190,3]
Received data Buffer : [2,17,51,53,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,228,231,118,190,3]
Command CRC Value : 4F59
CRC Ok
Response from Panel.
Expected response for Command Id : 10.
Received From Panel : CLOCK=01/12/2021 03:24
Clock datas.
[Panel => MQTT] Published alarm online
[Panel => MQTT] Published alarm online
SendCommand receive this response : CLOCK=01/12/2021 03:24
Sending Command : CLOCK
Command CRC Value : D32C
Command Sent.
Sequence : 11 - Data Sent : CLOCK
Received data Buffer from Panel : [2,17,51,52,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,148,224,115,179,3]
Received data Buffer : [2,17,51,52,72,91,96,29,246,71,196,217,255,144,112,170,57,38,31,107,149,91,229,151,104,128,127,148,224,115,179,3]
Command CRC Value : DA04
pergolafabio commented 2 years ago

gonna close, se here

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