Closed Sylanorr closed 2 years ago
Hi there: I've seen something similar with the non-multi-IP (single connection) unit and a lightsys2 panel.
The Passcode and key can be checked under the main programming menu on the keypad, but one level up from where you disabled the cloud settings (so, offhand I think its something like 'Programming->Communications->ConfigSW->Security', rather than 'Programming->System->Settings->Communications'). Mine was set to default.
It looks as if yours might not be default, given the invalid parameter message? It might also be worthwhile checking the other settings for monitoring service IPs - I had odd results when the MS was disabled on my panel.
There's another twist in this one: It seems there may be something of a socket synchronisation oddity, as I had to enter the panel programming and exit it again (without changing anything) and then restart homebridge for the connection to be successful: Is there a chance that the single-IP module is hanging on to the previous connection until a timeout (30 seconds for sockets??) occurs, and that enter and exit programming mode resets the module somehow? Does it blacklist failed CS command IPs?
Looking at this sequence, it matches what I see here on my lightsys:
Looks like the first packet is a logon: 'Remote=
I left this running for ages, then it suddenly connected with RMT command, and then works fine - I have the unit firewalled off from the cloud as well as the cloud being disabled on the unit.
If I restart homebridge, even though DCN is sent for socket closedown, the lightsys drops back into that timeout state for some reason.
It looks like the 'Hello' of 'Key RMT=Code' is being treated the same way as if the panel doesn't recognise them.
[22/11/2021, 18:01:20] [RiscoLocalAlarm] Socket Connected. [22/11/2021, 18:01:20] [RiscoLocalAlarm] Sending Command : RMT=0960 [22/11/2021, 18:01:20] [RiscoLocalAlarm] Command CRC Value : A461 [22/11/2021, 18:01:20] [RiscoLocalAlarm] Command Sent. [22/11/2021, 18:01:20] [RiscoLocalAlarm] Sequence : 1 - Data Sent : RMT=0960
More Data:
Please excuse the horrible formatting, but I kept the raw data direct from the homebridge logs:
Here is an example of a timed out connect, then followed by a successful one that is nearly identical (except in CRC) from the original.
Note: nothing was changed between either the plugin or the alarm between these two messages, it just spontaneously connected.
This makes me suspect that its something like the CRC or XOR/Whatever in the outgoing packet for RMT= is incorrect and being dumped by the panel, or we have a state problem in the protocol which is eventually reset.
On shutdown once, I saw the underlying bridge start spouting RMT= commands that had an incorrect number of digits, and the panel always replies with an incorrect parameter error (N06). I'll add a different issue for this. CRC is always correct on the incoming packet, and checks out.
^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m Start Connection to Panel ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mTCP Socket is already created, Connect It^[[39m ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mTCP Socket must be created now^[[39m ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m Socket Connected. ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSending Command : RMT=0960^[[39m ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand CRC Value : 9D34^[[39m ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand Sent.^[[39m ^[[37m[22/11/2021, 18:21:41] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSequence : 10 - Data Sent : RMT=0960^[[39m
^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand : '10 RMT=0960' Timeout!!!^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSendCommand receive this response : undefined^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[31mError when connecting to the control panel.^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[31mTCP Socket Disconnected^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSending Command : DCN^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand CRC Value : B4D4^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand Sent.^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSequence : 10 - Data Sent : DCN^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mReceived data Buffer : [2,49,48,78,48,53,23,52,55,48,52,3]^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand CRC Value : 4704^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCRC Ok^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mResponse from Panel.^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mExpected response for Command Id : 10.^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mReceived From Panel : N05^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m Receipt of an error code: Invalid parameter ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSendCommand receive this response : N05^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSocket Destroyed.^[[39m ^[[37m[22/11/2021, 18:21:46] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSocket Disconnected.^[[39m
^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSending Command : RMT=0960^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand CRC Value : 5865^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand Sent.^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mSequence : 11 - Data Sent : RMT=0960^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mReceived data Buffer : [2,49,49,65,67,75,23,69,56,69,65,3]^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCommand CRC Value : E8EA^[[39m ^[[37m[22/11/2021, 18:21:56] ^[[39m^[[36m[RiscoLocalAlarm]^[[39m ^[[90mCRC Ok^[[39m
Takes almost exactly 20 minutes every time to reconnect from the point of disconnection ... interesting
Hello everyone,
I'm following the conversation but for the moment I don't explain this behavior.
The only help I could give you is that a user is in the same configuration as you and it works correctly.
In the same configuration with one detail, he reset the user codes to regain control of his control panel (he did not have the installer code and his maintainer refused to give it).
The procedure consists of using the default jumper (Dip switch SW1-2 to On and restart by power failure and battery; once restarted, return the SW1-2 DIP to Off).
I advise you to refer to the installation manual to do the manipulation and especially to make a backup of the panel configuration (via the "Configuration Software" software).
During this reset, the Cloud is disabled by default and I wonder if some settings are not reset at the same time.
Hi there, thanks so much for all the hard work on this plugin! - I’ve got an installer account, and all the codes, and have fully power down cycled it. I’m cautious of blowing away the config at the moment because it’s a pretty large system - I’ll double check what gets removed (I don’t have the official installer configuration software).
I’m investigating if this is related to the CS Callback settings, or the Monitoring Centre settings.
Once the connection is made, it’s reliable and solid. If the connection is broken in any way, it takes 20mins of retrying to reconnect, even though the socket is being properly opened (which suggests that it’s not the cloud configuration, which is disabled).
Working on it :-)
CS Callback options Disabled, MS/ARC also disabled: Same result. It's precisely 20 minutes after the first 'timed out' packet that connection is suddenly made. I've also had one occasion of the plugin deleting all the accessories once it logged in because it failed to report any sensors, and currently it doesn't report outputs either. I think the bridge might need a little work, so looking over there now.
Got it: Fixed in the bridge...
This shows the same trace as above, and the fix is tested on a LightSYS with the older IPC.
Good evening
Thank you all for the advice. I do not know very well or how but, it works now ... Weird, it seems that the debug mode display prevents the plugin to work properly. Now that it is disabled, the plugin works perfectly.
For me, we can close the thread
I don't really see the link with debugging but I believe you. Monofin's pull requests have been accepted and risco-lan-bridge version 0.10.5 contains new code.
I close but do not hesitate to reopen it if necessary.
Hello Gawindx,
Glad to see you back on this extension!
First of all, thank you again for your work which has allowed me to have access to my power plant via risco cloud for more than a year perfectly.
I'm trying to migrate to this new extension and unfortunately for me, the configuration seems a bit more complicated than before:
1) I see in the announcement that the LightSYS are not tested and may not work, however, the Risco-Lan-Bridge of TJForc announces that they are well compatible.
2) I don't have a Multi IP module, so I know that I need to disable the Risco cloud for this to work (which I did via my control panel).
3) I am unable to find out if 5678 is the correct password for me, nor do I know how to find the TCP port used by my control unit.
Nevertheless, here is my config file and the error I get, can you help me identify where my error is coming from?
{ "platform" : "RiscoLocalAlarm", "name": "RiscoLocalAlarm", "Panel_IP": "192.168.0.11", "Panel_Port" : 1000, "Panel_Model" : "lightsys", "Panel_Password" : 5678, "Panel_Key" : 1, "OccupancyPreventArming" : false, "Partition" : "all", "Outputs" : "all". }
And here are the logs in debug mode :
[2021-11-21 6:49:59] [RiscoLocalAlarm] Initializing RiscoLocalAlarm platform... [2021-11-21 6:49:59] [RiscoLocalAlarm] Initialising LightSys Panel [2021-11-21 6:49:59] [RiscoLocalAlarm] Local GMT Timezone is : +01:00 [2021-11-21 6:49:59] [RiscoLocalAlarm] Start Connection to Panel [2021-11-21 6:49:59] [RiscoLocalAlarm] TCP Socket is not already created, Create It [2021-11-21 6:49:59] [RiscoLocalAlarm] Pseudo Buffer Created for Panel Id(0001): [2,5,11,23,47,94,189,122,244,232,208,161,66,133,11,22,45,90,181,107,214,173,90,180,104,208,161,67,135,15,31,63,126,253,251,247,239,223,191,127,255,255,254,252,249,242,229,202,149,43,86,172,88,176,96,193,131,6,12,25,50,100,200,144,32,65,130,5,11,23,47,95,190,125,250,245,234,213,170,85,170,84,168,81,162,68,136,17,35,70,140,24,49,98,197,138,21,42,85,171,87,175,94,188,121,243,230,204,152,49,98,197,138,21,43,86,172,88,177,99,198,141,27,54,109,218,180,105,210,165,74,149,42,85,171,86,173,90,181,106,212,168,80,160,64,129,2,4,9,19,39,78,157,58,117,234,213,170,85,170,85,171,87,175,95,190,124,248,240,225,195,135,15,30,60,120,240,224,193,131,6,12,25,51,102,205,154,53,107,215,175,94,189,122,245,235,215,175,95,190,125,251,246,236,216,176,96,192,129,2,4,8,17,34,68,137,19,39,78,156,56,113,227,199,143,30,61,122,245,234,213,171,86,172,89,179,102,205,154,53,107,215,174,92,185,115,231,207,158,61,123,247,239,223,191] [2021-11-21 6:49:59] [RiscoLocalAlarm] TCP Socket must be created now [2021-11-21 6:49:59] [RiscoLocalAlarm] Initial Discovery Phase [2021-11-21 6:49:59] Loading 1 accessories... [2021-11-21 6:49:59] [RiscoLocalAlarm] Socket Connected. [2021-11-21 6:49:59] [RiscoLocalAlarm] Sending Command : RMT=5678 [2021-11-21 6:49:59] [RiscoLocalAlarm] Command CRC Value : B0F8 [2021-11-21 6:49:59] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:49:59] [RiscoLocalAlarm] Sequence : 1 - Data Sent : RMT=5678 [2021-11-21 6:50:04] [RiscoLocalAlarm] Command : '01 RMT=5678' Timeout!!! [2021-11-21 6:50:04] [RiscoLocalAlarm] SendCommand receive this response : undefined [2021-11-21 6:50:04] [RiscoLocalAlarm] Error when connecting to the control panel. [2021-11-21 6:50:04] [RiscoLocalAlarm] TCP Socket Disconnected [2021-11-21 6:50:04] [RiscoLocalAlarm] Sending Command : DCN [2021-11-21 6:50:04] [RiscoLocalAlarm] Command CRC Value : A5E8 [2021-11-21 6:50:04] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:50:04] [RiscoLocalAlarm] Sequence : 1 - Data Sent : DCN [2021-11-21 6:50:04] [RiscoLocalAlarm] Received data Buffer : [2,48,49,78,48,53,23,53,54,51,56,3] [2021-11-21 6:50:04] [RiscoLocalAlarm] Command CRC Value : 5638 [2021-11-21 6:50:04] [RiscoLocalAlarm] CRC Ok [2021-11-21 6:50:04] [RiscoLocalAlarm] Response from Panel. [2021-11-21 6:50:04] [RiscoLocalAlarm] Expected response for Command Id : 01. [2021-11-21 6:50:04] [RiscoLocalAlarm] Received From Panel : N05 [2021-11-21 6:50:04] [RiscoLocalAlarm] Receipt of an error code: Invalid parameter [2021-11-21 6:50:04] [RiscoLocalAlarm] SendCommand receive this response : N05 [2021-11-21 6:50:04] [RiscoLocalAlarm] Socket Destroyed. [2021-11-21 6:50:04] [RiscoLocalAlarm] Socket Disconnected. [2021-11-21 6:50:14] [RiscoLocalAlarm] Start Connection to Panel [2021-11-21 6:50:14] [RiscoLocalAlarm] TCP Socket is already created, Connect It [2021-11-21 6:50:14] [RiscoLocalAlarm] TCP Socket must be created now [2021-11-21 6:50:14] [RiscoLocalAlarm] Socket Connected. [2021-11-21 6:50:14] [RiscoLocalAlarm] Sending Command : RMT=5678 [2021-11-21 6:50:14] [RiscoLocalAlarm] Command CRC Value : BF08 [2021-11-21 6:50:14] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:50:14] [RiscoLocalAlarm] Sequence : 2 - Data Sent : RMT=5678 [2021-11-21 6:50:19] [RiscoLocalAlarm] Command : '02 RMT=5678' Timeout!!! [2021-11-21 6:50:19] [RiscoLocalAlarm] SendCommand receive this response : undefined [2021-11-21 6:50:19] [RiscoLocalAlarm] Error when connecting to the control panel. [2021-11-21 6:50:19] [RiscoLocalAlarm] TCP Socket Disconnected [2021-11-21 6:50:19] [RiscoLocalAlarm] Sending Command : DCN [2021-11-21 6:50:19] [RiscoLocalAlarm] Command CRC Value : A5AC [2021-11-21 6:50:19] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:50:19] [RiscoLocalAlarm] Sequence : 2 - Data Sent : DCN [2021-11-21 6:50:19] [RiscoLocalAlarm] Received data Buffer : [2,48,50,78,48,53,23,53,54,55,67,3] [2021-11-21 6:50:19] [RiscoLocalAlarm] Command CRC Value : 567C [2021-11-21 6:50:19] [RiscoLocalAlarm] CRC Ok [2021-11-21 6:50:19] [RiscoLocalAlarm] Response from Panel. [2021-11-21 6:50:19] [RiscoLocalAlarm] Expected response for Command Id : 02. [2021-11-21 6:50:19] [RiscoLocalAlarm] Received From Panel : N05 [2021-11-21 6:50:19] [RiscoLocalAlarm] Receipt of an error code: Invalid parameter [2021-11-21 6:50:19] [RiscoLocalAlarm] SendCommand receive this response : N05 [2021-11-21 6:50:19] [RiscoLocalAlarm] Socket Destroyed. [2021-11-21 6:50:19] [RiscoLocalAlarm] Socket Disconnected. [2021-11-21 6:50:29] [RiscoLocalAlarm] Start Connection to Panel [2021-11-21 6:50:29] [RiscoLocalAlarm] TCP Socket is already created, Connect It [2021-11-21 6:50:29] [RiscoLocalAlarm] TCP Socket must be created now [2021-11-21 6:50:29] [RiscoLocalAlarm] Socket Connected. [2021-11-21 6:50:29] [RiscoLocalAlarm] Sending Command : RMT=5678 [2021-11-21 6:50:29] [RiscoLocalAlarm] Command CRC Value : 7A59 [2021-11-21 6:50:29] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:50:29] [RiscoLocalAlarm] Sequence : 3 - Data Sent : RMT=5678 [2021-11-21 6:50:34] [RiscoLocalAlarm] Command : '03 RMT=5678' Timeout!!! [2021-11-21 6:50:34] [RiscoLocalAlarm] SendCommand receive this response : undefined [2021-11-21 6:50:34] [RiscoLocalAlarm] Error when connecting to the control panel. [2021-11-21 6:50:34] [RiscoLocalAlarm] TCP Socket Disconnected [2021-11-21 6:50:34] [RiscoLocalAlarm] Sending Command : DCN [2021-11-21 6:50:34] [RiscoLocalAlarm] Command CRC Value : 6591 [2021-11-21 6:50:34] [RiscoLocalAlarm] Command Sent. [2021-11-21 6:50:34] [RiscoLocalAlarm] Sequence : 3 - Data Sent : DCN [2021-11-21 6:50:34] [RiscoLocalAlarm] Received data Buffer : [2,48,51,78,48,53,23,57,54,52,49,3] [2021-11-21 6:50:34] [RiscoLocalAlarm] Command CRC Value : 9641 [2021-11-21 6:50:34] [RiscoLocalAlarm] CRC Ok [2021-11-21 6:50:34] [RiscoLocalAlarm] Response from Panel. [2021-11-21 6:50:34] [RiscoLocalAlarm] Expected response for Command Id : 03. [2021-11-21 6:50:34] [RiscoLocalAlarm] Received From Panel : N05 [2021-11-21 6:50:34] [RiscoLocalAlarm] Receipt of an error code: Invalid parameter [2021-11-21 6:50:34] [RiscoLocalAlarm] SendCommand receive this response : N05 [2021-11-21 6:50:34] [RiscoLocalAlarm] Socket Destroyed. [2021-11-21 6:50:34] [RiscoLocalAlarm] Socket Disconnected.