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

Restart needed on cloud disconnect #57

Open pergolafabio opened 1 year ago

pergolafabio commented 1 year ago

Describe the bug Hi @vanackej , using the addon with cloud proxy method... Yesteday i had a small internet interrupt, but after internet was restored, the addon was not able to connect to cloud anymore, i had to restart the addon to make it functional... It possible on this type of event as in screenshot, that the service can be restarted? I had watchdog enabled, but that doesnt help, since addon keeps on running

Thnx in advance

Configuration

Logs

I only have a screenshot: Screenshot_20230227-064843

markxroberts commented 1 year ago

Thanks for the logs. I think things are now behaving as expected. The underlying Risco-lan-bridge software tries each command 50 times before giving up, hence the long delay. What do you think about writing an automation that shortcuts this and tries to restart the communications with after say 2 minutes? That would allow you to retain control about how long a disconnect you will tolerate.

pergolafabio commented 1 year ago

Well, actually , i can do that already now , cause I can restart the communication when the sensors goes to disconnected for like 2 min, you have the button included for that...

But are you not able to modify the 50 times in the library to something like 10? Or make it an option in the Json file?

pergolafabio commented 1 year ago

For me it's indeed it comes back online, and it seems it's behaving that way, so the issue is resolved for me.. I don't care if if it's 5 or 12 min, it's just important it comes back :-)

markxroberts commented 1 year ago

Try 2023.10.1. There's now a maximum number of commands option. This may have undesired effects as it's not fully tested.! The json option is maxCommands, and the default is 50.

pergolafabio commented 1 year ago

Hmm, updated to the .1 , but after restart I get an infinite loop with Mqtt discovery error, didn't add yet the max commands in the Json...

Screenshot_20231009-091107

markxroberts commented 1 year ago

Silly error on my part. If you set maxCommands to < 50 I think it works.

pergolafabio commented 1 year ago

ah ok , that did it :-)

Gonna start now with "10" and see what happens

pergolafabio commented 1 year ago

I took out UTP, and left it out with maxcommands 10

You see it starts again after command 10, shoudlnt it not restart the communications at this point?

10/9/2023, 8:57:32 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:57:41 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 8:57:46 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 8:57:48 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 8:57:51 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 8:57:56 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 8:57:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":8,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,61,72,91,96,29,246,109,197,174,231,149,3]}}
10/9/2023, 8:57:58 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:58:11 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 8:58:13 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 8:58:16 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 8:58:21 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 8:58:24 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:58:26 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 8:58:26 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":9,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,60,72,91,96,29,246,109,176,174,230,149,3]}}
10/9/2023, 8:58:39 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 8:58:41 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 8:58:46 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 8:58:50 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:58:51 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 8:58:56 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 8:58:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":10,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,53,72,91,96,29,246,109,197,219,227,226,3]}}
10/9/2023, 8:59:06 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 8:59:11 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 8:59:16 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 8:59:16 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:59:21 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 8:59:26 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 8:59:26 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":1,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,52,72,91,96,29,246,109,197,174,149,229,3]}}
10/9/2023, 8:59:32 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 8:59:41 PM [warn] Command[2] 'CLOCK' Timeout
10/9/2023, 8:59:42 PM [info] RiscoCloud Socket: ready
10/9/2023, 8:59:46 PM [warn] Command[2] 'CLOCK' Timeout
10/9/2023, 8:59:51 PM [warn] Command[2] 'CLOCK' Timeout
10/9/2023, 8:59:56 PM [warn] Command[2] 'CLOCK' Timeout
10/9/2023, 8:59:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":2,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,55,72,91,96,29,246,109,197,174,148,228,3]}}
10/9/2023, 8:59:58 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
pergolafabio commented 1 year ago

Now, the cable was connected, but after the command 10 , it just started again the loop, not the restart communcation after the 10th retry

10/9/2023, 9:07:41 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 9:07:46 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 9:07:48 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:07:51 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 9:07:56 PM [warn] Command[8] 'CLOCK' Timeout
10/9/2023, 9:07:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":8,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,61,72,91,96,29,246,109,197,174,231,149,3]}}
10/9/2023, 9:07:58 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:08:11 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 9:08:14 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:08:16 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 9:08:21 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 9:08:25 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:08:26 PM [warn] Command[9] 'CLOCK' Timeout
10/9/2023, 9:08:26 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":9,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,60,72,91,96,29,246,109,176,174,230,149,3]}}
10/9/2023, 9:08:40 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:08:41 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 9:08:46 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 9:08:50 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:08:51 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 9:08:56 PM [warn] Command[10] 'CLOCK' Timeout
10/9/2023, 9:08:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":10,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,53,72,91,96,29,246,109,197,219,227,226,3]}}
10/9/2023, 9:09:06 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:09:11 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 9:09:16 PM [warn] Command[1] 'CLOCK' Timeout
10/9/2023, 9:09:16 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:09:21 PM [warn] Command[1] 'CLOCK' Timeout
pergolafabio commented 1 year ago

ah , on next loop, it did a restart, not sure what is triggering this?

10/9/2023, 9:10:11 PM [warn] Command[3] 'CLOCK' Timeout
10/9/2023, 9:10:16 PM [warn] Command[3] 'CLOCK' Timeout
10/9/2023, 9:10:21 PM [warn] Command[3] 'CLOCK' Timeout
10/9/2023, 9:10:25 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:10:26 PM [warn] Command[3] 'CLOCK' Timeout
10/9/2023, 9:10:26 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":3,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,54,72,91,96,29,246,109,176,174,147,228,3]}}
10/9/2023, 9:10:35 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:10:41 PM [warn] Command[4] 'CLOCK' Timeout
10/9/2023, 9:10:46 PM [warn] Command[4] 'CLOCK' Timeout
10/9/2023, 9:10:50 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:10:51 PM [warn] Command[4] 'CLOCK' Timeout
10/9/2023, 9:10:56 PM [warn] Command[4] 'CLOCK' Timeout
10/9/2023, 9:10:56 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":4,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,49,72,91,96,29,246,109,197,174,146,153,3]}}
10/9/2023, 9:11:00 PM [info] RiscoCloud Socket: ready
10/9/2023, 9:11:11 PM [warn] Command[5] 'CLOCK' Timeout
10/9/2023, 9:11:16 PM [warn] Command[5] 'CLOCK' Timeout
10/9/2023, 9:11:16 PM [error] RiscoCloud Socket: close. Retrying within 10000 ms
10/9/2023, 9:11:18 PM [error] Panel Socket Error : Error: read EHOSTUNREACH
10/9/2023, 9:11:18 PM [info] TCP Socket Disconnected
10/9/2023, 9:11:18 PM [info] Automatic reconnection will be attempted in 10000 ms
10/9/2023, 9:11:18 PM [error] Command[5] error: Error: read EHOSTUNREACH
10/9/2023, 9:11:18 PM [error] Panel Socket Closed.
10/9/2023, 9:11:18 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":5,"attempts":3,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,48,72,91,96,29,246,109,176,174,145,153,3]}}
10/9/2023, 9:11:28 PM [info] Listening on IP :: and Port 33000
10/9/2023, 9:11:28 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
pergolafabio commented 1 year ago

the only thing extra i see in that last loop is this line:

10/9/2023, 9:11:18 PM [error] Panel Socket Error : Error: read EHOSTUNREACH

Is that the one causing a restart comm ?

markxroberts commented 1 year ago

You're right. It's not the end of the command cycle that's leading to the restart. It's the error. I'm not quite sure what's provoking the error, though, so I don't think I can change the timeout interval by altering max commands. The only way to do this is probably by setting a timer in risco-mqtt-local, which I'll look at next weekend.

markxroberts commented 1 year ago

I've reworked this quite a bit. It should respond to short term disconnects by repeatedly trying to connect. Longer term disconnects that produce an error will lead to a longer delay before reconnecting. 2023.10.10. I've taken out the max_commands option.

pergolafabio commented 1 year ago

Yeah, I saw you working on it , I test asap! Can you publish the new addon? I don't see it yet

markxroberts commented 1 year ago

Sorry, yes, just pushed it.

pergolafabio commented 1 year ago

ok, updated, here are new logs, i also notice this now in the loop:

10/15/2023, 3:21:08 PM [info] Unknown error

At around 15:25 UTP was connected again

It took a while, but the addon crashed , when it was trying to connect

10/15/2023, 3:37:28 PM [info] TCP Socket Disconnected
10/15/2023, 3:37:28 PM [info] Automatic reconnection will be attempted in 10000 ms
10/15/2023, 3:37:29 PM [warn] sendCommand(ZLBL*1:8?): Socket is destroyed, ignoring command
10/15/2023, 3:37:29 PM [warn] sendCommand(PNLCNF): Socket is destroyed, ignoring command
/app/node_modules/@markxroberts/risco-lan-bridge/dist/RiscoComm.js:305
                    throw new Error(`Unsupported panel type : ${panelType}`);
                          ^
Error: Unsupported panel type : 
    at RiscoComm.<anonymous> (/app/node_modules/@markxroberts/risco-lan-bridge/dist/RiscoComm.js:305:27)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/tslib/tslib.js:114:62)

image

full lo risco.log g:

markxroberts commented 1 year ago

Thanks. New version should be available now .11. Hopefully addresses some of this!

pergolafabio commented 1 year ago

Indeed an improvement, no crash!! But i notice the "proxy connection sensor" goes to disconnected, when the reconnect was happening, no before anymore... Also it still takes a lot of time, untill it notices the disconnect, but thats actually not a problem for me

image

here is full log:

risco.log

pergolafabio commented 12 months ago

Wow, tried 2023.10.12, works MUCH better, the "listen for connection..." immediately came now, even before my UTP was plugged in

Did 2 test i a row, second test, was a longer period before pluggin in cable

image

and:

image

full logs: risco.log

markxroberts commented 12 months ago

Thanks for the update. This is excellent news. I've released 10.13. I fear this may not work as well, but I should be grateful for your feedback.

The log shows that we're doubling the number of 'listeners' after the reconnection, which may lead to problems, so I've tried to take this out.

I've also tried to put the reconnection in to risco-lan-bridge as this would be a better solution if it worked.

Please let me know.

pergolafabio commented 12 months ago

Hi, tested 10.13 , the "waiting for " came quite fast again, so still good But the "proxy connection sensor" this time didnt change, it stayed on state "connected"

risco.log

markxroberts commented 12 months ago

Thanks for feedback. Looks like we're getting closer to a workable solution. Hopefully connection sensor now working. I've also changed the availability in autodiscovery so that everything goes offline when you stop the add-on.

pergolafabio commented 12 months ago

Looks indeed very promising, I already had 2 days ago a real interrupt at night, and this was the first time it actually came back online, without restarting :-)

Will test new build tomorrow

pergolafabio commented 12 months ago

hmm, already updated, but something is nor right now, i see the errors below, alltough the panel is stll corrected and i see motion on my PIR sensors, also the proxy sensors is "disconnected" while its connected.... ?

Loading config from: /config/risco-mqtt.json
10/23/2023, 8:42:34 PM [info] autoConnect enabled, starting communication
10/23/2023, 8:42:34 PM [info] [RML] Connecting to mqtt server: mqtt://homeassistant:1883
10/23/2023, 8:42:35 PM [info] Listening on IP :: and Port 33000
10/23/2023, 8:42:35 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/23/2023, 8:42:35 PM [info] [RML] Connected on mqtt server: mqtt://homeassistant:1883
10/23/2023, 8:42:35 PM [info] [RML] Panel is not connected, waiting
10/23/2023, 8:42:48 PM [info] Incoming connection from panel received
10/23/2023, 8:42:49 PM [info] RiscoCloud Socket: ready
10/23/2023, 8:42:49 PM [info] Setting a timer for panel connection in 30000 ms
10/23/2023, 8:43:19 PM [info] Panel info: LightSys/RP432, FW 2.70
10/23/2023, 8:43:19 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/23/2023, 8:43:19 PM [info] Starting devices discovery
10/23/2023, 8:43:19 PM [info] Retrieving System Information
10/23/2023, 8:43:20 PM [info] Retrieving zones configuration
10/23/2023, 8:43:39 PM [info] Retrieving outputs configuration
10/23/2023, 8:43:40 PM [warn] Command[5] Receipt of an error code: Device Doesn't Exists
10/23/2023, 8:43:40 PM [warn] Got error while fetching output 5 data: N19
10/23/2023, 8:43:40 PM [info] Output 5 does not exists, stopping outputs discovery
10/23/2023, 8:43:40 PM [info] Retrieving partitions configuration
10/23/2023, 8:43:41 PM [info] [RML] Panel and MQTT communications are ready
10/23/2023, 8:43:41 PM [info] [RML] Publishing Home Assistant discovery info
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published proxy status sensor, HA name = Proxy connection status
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published System message sensor, HA name = System message
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published republish state button, HA name = Republish state payload
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published republish autodiscovery button, HA name = Republish autodiscovery
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published restart communications button, HA name = Restart communications
10/23/2023, 8:43:41 PM [info] [RML] Added alarm state mapping for partition Pergola Quintens.
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA Partition label = Pergola Quintens, HA name = Pergola Quintens on partition 1
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 01, HA name = Uitgang 01
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 02, HA name = Uitgang 02
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 03, HA name = Uitgang 03
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 04, HA name = Uitgang 04
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Alarm
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Bureau, HA name = Bureau Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Living, HA name = Living Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Inkom, HA name = Inkom Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Boven, HA name = Boven Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Keuken, HA name = Keuken Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Bureau, HA name = RM Bureau Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Zolder, HA name = RM Zolder Bypass
10/23/2023, 8:43:41 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Bypass
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to Home assistant commands topics
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/partition/1/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/1-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/2-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/3-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/4-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/5-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/6-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/7-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/8-bypass/set topic
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to panel partitions events
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to panel zones events
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to panel outputs events
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to panel system events
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to Home Assistant online status
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to system clock
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to socket disconnection message
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to panel communications message
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to socket error message
10/23/2023, 8:43:41 PM [info] [RML] Subscribing to communications error message
10/23/2023, 8:43:41 PM [info] [RML] Panel initialization and autodiscovery completed
10/23/2023, 8:43:41 PM [info] [RML] homeassistant/status was subscribed
10/23/2023, 8:44:57 PM [info] [RML Error received SocketError, Cloud socket timeout
10/23/2023, 8:44:57 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:44:57 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:44:57 PM [info] [RML] Error not processed.
10/23/2023, 8:44:57 PM [error] RiscoCloud Socket Timeout.
pergolafabio commented 12 months ago

ok, did a restart, saw some other warnigs in beginned, but seems ok now:, also proxy sensors is now in "connected" state:

Loading config from: /config/risco-mqtt.json
10/23/2023, 8:48:55 PM [info] autoConnect enabled, starting communication
10/23/2023, 8:48:55 PM [info] [RML] Connecting to mqtt server: mqtt://homeassistant:1883
10/23/2023, 8:48:55 PM [info] Listening on IP :: and Port 33000
10/23/2023, 8:48:55 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/23/2023, 8:48:55 PM [info] [RML] Connected on mqtt server: mqtt://homeassistant:1883
10/23/2023, 8:48:55 PM [info] [RML] Panel is not connected, waiting
10/23/2023, 8:49:08 PM [info] Incoming connection from panel received
10/23/2023, 8:49:09 PM [info] RiscoCloud Socket: ready
10/23/2023, 8:49:09 PM [info] Setting a timer for panel connection in 30000 ms
10/23/2023, 8:49:39 PM [info] Panel info: LightSys/RP432, FW 2.70
10/23/2023, 8:49:39 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/23/2023, 8:49:39 PM [info] Starting devices discovery
10/23/2023, 8:49:39 PM [info] Retrieving System Information
10/23/2023, 8:49:40 PM [info] Retrieving zones configuration
10/23/2023, 8:49:50 PM [warn] Command[19] 'ZSTT*9?' Timeout
10/23/2023, 8:50:04 PM [info] Retrieving outputs configuration
10/23/2023, 8:50:05 PM [warn] Command[5] Receipt of an error code: Device Doesn't Exists
10/23/2023, 8:50:05 PM [warn] Got error while fetching output 5 data: N19
10/23/2023, 8:50:05 PM [info] Output 5 does not exists, stopping outputs discovery
10/23/2023, 8:50:05 PM [info] Retrieving partitions configuration
10/23/2023, 8:50:06 PM [info] [RML] Panel and MQTT communications are ready
10/23/2023, 8:50:06 PM [info] [RML] Publishing Home Assistant discovery info
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published proxy status sensor, HA name = Proxy connection status
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published System message sensor, HA name = System message
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published republish state button, HA name = Republish state payload
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published republish autodiscovery button, HA name = Republish autodiscovery
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published restart communications button, HA name = Restart communications
10/23/2023, 8:50:06 PM [info] [RML] Added alarm state mapping for partition Pergola Quintens.
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA Partition label = Pergola Quintens, HA name = Pergola Quintens on partition 1
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 01, HA name = Uitgang 01
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 02, HA name = Uitgang 02
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 03, HA name = Uitgang 03
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 04, HA name = Uitgang 04
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Alarm
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Bureau, HA name = Bureau Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Living, HA name = Living Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Inkom, HA name = Inkom Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Boven, HA name = Boven Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Keuken, HA name = Keuken Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Bureau, HA name = RM Bureau Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Zolder, HA name = RM Zolder Bypass
10/23/2023, 8:50:06 PM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Bypass
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to Home assistant commands topics
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/partition/1/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/1-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/2-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/3-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/4-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/5-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/6-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/7-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/8-bypass/set topic
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to panel partitions events
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to panel zones events
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to panel outputs events
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to panel system events
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to Home Assistant online status
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to system clock
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to socket disconnection message
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to panel communications message
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to socket error message
10/23/2023, 8:50:06 PM [info] [RML] Subscribing to communications error message
10/23/2023, 8:50:06 PM [info] [RML] Panel initialization and autodiscovery completed
10/23/2023, 8:50:06 PM [info] [RML] homeassistant/status was subscribed
pergolafabio commented 12 months ago

gonna do a real disconnect now

pergolafabio commented 12 months ago

ok , here is log of a real disconnect, looks quite good?

image

10/23/2023, 8:50:06 PM [info] [RML] homeassistant/status was subscribed
10/23/2023, 8:53:32 PM [warn] Command[33] 'CLOCK' Timeout
10/23/2023, 8:53:37 PM [warn] Command[33] 'CLOCK' Timeout
10/23/2023, 8:53:42 PM [warn] Command[33] 'CLOCK' Timeout
10/23/2023, 8:53:47 PM [warn] Command[33] 'CLOCK' Timeout
10/23/2023, 8:53:47 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":33,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,54,72,91,96,29,246,109,183,169,232,228,3]}}
10/23/2023, 8:53:47 PM [info] [RML Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":33,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,54,72,91,96,29,246,109,183,169,232,228,3]}}}
10/23/2023, 8:53:47 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:53:47 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:54:02 PM [warn] Command[34] 'CLOCK' Timeout
10/23/2023, 8:54:07 PM [warn] Command[34] 'CLOCK' Timeout
10/23/2023, 8:54:12 PM [warn] Command[34] 'CLOCK' Timeout
10/23/2023, 8:54:17 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:54:17 PM [warn] Command[34] 'CLOCK' Timeout
10/23/2023, 8:54:17 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":34,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,49,72,91,96,29,246,109,196,169,150,153,3]}}
10/23/2023, 8:54:17 PM [info] [RML Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":34,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,49,72,91,96,29,246,109,196,169,150,153,3]}}}
10/23/2023, 8:54:17 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:54:17 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:54:32 PM [warn] Command[35] 'CLOCK' Timeout
10/23/2023, 8:54:37 PM [warn] Command[35] 'CLOCK' Timeout
10/23/2023, 8:54:42 PM [warn] Command[35] 'CLOCK' Timeout
10/23/2023, 8:54:47 PM [warn] Command[35] 'CLOCK' Timeout
10/23/2023, 8:54:47 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":35,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,48,72,91,96,29,246,109,183,169,149,153,3]}}
10/23/2023, 8:54:47 PM [info] [RML Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":35,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,48,72,91,96,29,246,109,183,169,149,153,3]}}}
10/23/2023, 8:54:47 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:54:47 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:02 PM [warn] Command[36] 'CLOCK' Timeout
10/23/2023, 8:55:07 PM [warn] Command[36] 'CLOCK' Timeout
10/23/2023, 8:55:12 PM [warn] Command[36] 'CLOCK' Timeout
10/23/2023, 8:55:17 PM [info] [RML Error received SocketError, Cloud socket timeout
10/23/2023, 8:55:17 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:55:17 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:17 PM [info] [RML] Error not processed.
10/23/2023, 8:55:17 PM [error] RiscoCloud Socket Timeout.
10/23/2023, 8:55:17 PM [warn] Command[36] 'CLOCK' Timeout
10/23/2023, 8:55:17 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":36,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,51,72,91,96,29,246,109,183,169,148,227,3]}}
10/23/2023, 8:55:17 PM [info] [RML Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":36,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,51,72,91,96,29,246,109,183,169,148,227,3]}}}
10/23/2023, 8:55:17 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:55:17 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:32 PM [warn] Command[37] 'CLOCK' Timeout
10/23/2023, 8:55:37 PM [warn] Command[37] 'CLOCK' Timeout
10/23/2023, 8:55:42 PM [warn] Command[37] 'CLOCK' Timeout
10/23/2023, 8:55:47 PM [warn] Command[37] 'CLOCK' Timeout
10/23/2023, 8:55:47 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":37,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,50,72,91,96,29,246,109,196,169,147,227,3]}}
10/23/2023, 8:55:47 PM [info] [RML Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":37,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,49,50,72,91,96,29,246,109,196,169,147,227,3]}}}
10/23/2023, 8:55:47 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:55:47 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:50 PM [info] [RML Error received SocketError, RiscoCloud socket closed
10/23/2023, 8:55:50 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:55:50 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:50 PM [info] [RML] Error not processed.
10/23/2023, 8:55:50 PM [error] RiscoCloud Socket: closed. Retrying within 10000 ms
10/23/2023, 8:55:55 PM [warn] Command[38] 'DCN' Timeout
10/23/2023, 8:55:55 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":38,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,17,49,61,79,84,97,73,132,77,199,220,3]}}
10/23/2023, 8:55:55 PM [warn] Error while sending DCN command
10/23/2023, 8:55:55 PM [info] TCP Socket Disconnected
10/23/2023, 8:55:55 PM [info] [RML Error received CommsError, Socket Disconnected
10/23/2023, 8:55:55 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:55:55 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:55:55 PM [info] [RML] TCP Socket disconnected
10/23/2023, 8:55:55 PM [info] [MQTT => Panel] Socket listeners removed
10/23/2023, 8:55:55 PM [info] Automatic reconnection will be attempted in 10000 ms
10/23/2023, 8:55:55 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:56:00 PM [info] RiscoCloud Socket: ready
10/23/2023, 8:56:05 PM [info] [RML Error received CommsError, New socket being connected
10/23/2023, 8:56:05 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/23/2023, 8:56:05 PM [info] [RML] Panel not communicating.  Manual reconnection can be initiated via HA button.  Intermittent connection retries may be attempted in response to errors.
10/23/2023, 8:56:05 PM [info] [RML] TCP Socket disconnected, new socket being connected.  Ensure old listeners removed.
10/23/2023, 8:56:05 PM [info] Listening on IP :: and Port 33000
10/23/2023, 8:56:05 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/23/2023, 8:56:16 PM [error] RiscoCloud Socket: closed
10/23/2023, 8:57:57 PM [info] Incoming connection from panel received
10/23/2023, 8:57:57 PM [info] RiscoCloud Socket: ready
10/23/2023, 8:57:57 PM [info] Setting a timer for panel connection in 30000 ms
10/23/2023, 8:58:28 PM [info] Panel info: LightSys/RP432, FW 2.70
10/23/2023, 8:58:28 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/23/2023, 8:58:28 PM [info] Devices discovery already done
10/23/2023, 8:58:28 PM [info] [RML] Panel and MQTT communications are ready
10/23/2023, 8:58:28 PM [info] [RML] Publishing Home Assistant discovery info
10/23/2023, 8:58:28 PM [info] [RML] Subscribing to socket disconnection message
10/23/2023, 8:58:28 PM [info] [RML] Subscribing to panel communications message
10/23/2023, 8:58:28 PM [info] [RML] Subscribing to socket error message
10/23/2023, 8:58:28 PM [info] [RML] Subscribing to communications error message
10/23/2023, 8:58:28 PM [info] [RML] Panel initialization and autodiscovery completed
markxroberts commented 12 months ago

Hopefully this may be addressed in latest version. Will be available in next few minutes. The only slight worry I have about current configuration is what happens when the panel has a lot of things to do and there's a very quick clock timeout. Will be worth testing what happens when you trigger a few sensors/arming and see if that causes reconnection.

pergolafabio commented 12 months ago

ok, updated to 10.15 , sensor still working, i will monitor it coming days

logs;


10/24/2023, 12:22:52 PM [info] [RML] Panel initialization and autodiscovery completed
10/24/2023, 12:22:52 PM [info] [RML] homeassistant/status was subscribed
10/24/2023, 12:23:37 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:42 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:47 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:52 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:52 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":17,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,50,72,91,96,29,246,109,176,219,228,224,3]}}
10/24/2023, 12:23:52 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":17,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,50,72,91,96,29,246,109,176,219,228,224,3]}}}
10/24/2023, 12:23:52 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:23:52 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:03 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 12:24:03 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:03 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:03 PM [info] [RML] Error not processed.
10/24/2023, 12:24:03 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 12:24:07 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:12 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:17 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:22 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:22 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:22 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":18,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,61,72,91,96,29,246,109,176,219,146,148,3]}}
10/24/2023, 12:24:22 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":18,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,61,72,91,96,29,246,109,176,219,146,148,3]}}}
10/24/2023, 12:24:22 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:22 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:35 PM [info] [RML] Error received SocketError, RiscoCloud socket closed
10/24/2023, 12:24:35 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:35 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:35 PM [info] [RML] Error not processed.
10/24/2023, 12:24:35 PM [error] RiscoCloud Socket: closed. Retrying within 10000 ms
10/24/2023, 12:24:37 PM [warn] Command[19] 'CLOCK' Timeout
10/24/2023, 12:24:37 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":19,"attempts":1,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,60,72,91,96,29,246,109,197,219,145,148,3]}}
10/24/2023, 12:24:37 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":19,"attempts":1,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,60,72,91,96,29,246,109,197,219,145,148,3]}}}
10/24/2023, 12:24:37 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:37 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:40 PM [warn] Command[20] 'DCN' Timeout
10/24/2023, 12:24:40 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":20,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,17,48,53,79,84,97,73,133,77,176,220,3]}}
10/24/2023, 12:24:40 PM [warn] Error while sending DCN command
10/24/2023, 12:24:40 PM [info] TCP Socket Disconnected
10/24/2023, 12:24:40 PM [info] [RML] Error received CommsError, Socket Disconnected
10/24/2023, 12:24:40 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:40 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:40 PM [info] [RML] TCP Socket disconnected
10/24/2023, 12:24:40 PM [info] [MQTT => Panel] Socket listeners removed
10/24/2023, 12:24:40 PM [info] Automatic reconnection will be attempted in 10000 ms
10/24/2023, 12:24:40 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:45 PM [info] RiscoCloud Socket: ready
10/24/2023, 12:24:50 PM [info] [RML] Error received CommsError, New socket being connected
10/24/2023, 12:24:50 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:50 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:50 PM [info] [RML] TCP Socket disconnected, new socket being connected.  Ensure old listeners removed.
10/24/2023, 12:24:50 PM [info] Listening on IP :: and Port 33000
10/24/2023, 12:24:50 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/24/2023, 12:25:01 PM [error] RiscoCloud Socket: closed
10/24/2023, 12:27:48 PM [info] Incoming connection from panel received
10/24/2023, 12:27:49 PM [info] RiscoCloud Socket: ready
10/24/2023, 12:27:49 PM [info] Setting a timer for panel connection in 30000 ms
10/24/2023, 12:28:19 PM [info] Panel info: LightSys/RP432, FW 2.70
10/24/2023, 12:28:19 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/24/2023, 12:28:19 PM [info] Devices discovery already done
10/24/2023, 12:28:19 PM [info] [RML] Panel and MQTT communications are ready
10/24/2023, 12:28:19 PM [info] [RML] Publishing Home Assistant discovery info
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to socket disconnection message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to panel communications message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to socket error message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to communications error message
10/24/2023, 12:28:19 PM [info] [RML] Panel initialization and autodiscovery completed
pergolafabio commented 12 months ago

running good, i just see those errors, but they are i think normal...

10/24/2023, 11:46:03 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 11:56:03 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 11:56:03 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 11:56:03 PM [info] [RML] Proxy server not communicating.
10/24/2023, 11:56:03 PM [info] [RML] Error not processed.
10/24/2023, 11:56:03 PM [error] RiscoCloud Socket Timeout.
10/25/2023, 12:32:03 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 12:32:03 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 12:32:03 AM [info] [RML] Proxy server not communicating.
10/25/2023, 12:32:03 AM [info] [RML] Error not processed.
10/25/2023, 12:32:03 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 12:56:03 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 12:56:03 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 12:56:03 AM [info] [RML] Proxy server not communicating.
10/25/2023, 12:56:03 AM [info] [RML] Error not processed.
10/25/2023, 12:56:03 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 1:13:15 AM [warn] Command[9] 'CLOCK' Timeout
10/25/2023, 3:56:54 AM [warn] Command[4] 'CLOCK' Timeout
10/25/2023, 4:02:02 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 4:02:02 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 4:02:02 AM [info] [RML] Proxy server not communicating.
10/25/2023, 4:02:02 AM [info] [RML] Error not processed.
10/25/2023, 4:02:02 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 4:06:03 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 4:06:03 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 4:06:03 AM [info] [RML] Proxy server not communicating.
10/25/2023, 4:06:03 AM [info] [RML] Error not processed.
10/25/2023, 4:06:03 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 5:22:02 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 5:22:02 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 5:22:02 AM [info] [RML] Proxy server not communicating.
10/25/2023, 5:22:02 AM [info] [RML] Error not processed.
10/25/2023, 5:22:02 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 5:38:02 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 5:38:02 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 5:38:02 AM [info] [RML] Proxy server not communicating.
10/25/2023, 5:38:02 AM [info] [RML] Error not processed.
10/25/2023, 5:38:02 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 5:39:00 AM [warn] Command[24] 'CLOCK' Timeout
10/25/2023, 7:04:02 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 7:04:02 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 7:04:02 AM [info] [RML] Proxy server not communicating.
10/25/2023, 7:04:02 AM [info] [RML] Error not processed.
10/25/2023, 7:04:02 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 7:28:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 7:28:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 7:28:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 7:28:43 AM [info] [RML] Error not processed.
10/25/2023, 7:28:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 7:32:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 7:32:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 7:32:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 7:32:43 AM [info] [RML] Error not processed.
10/25/2023, 7:32:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 7:36:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 7:36:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 7:36:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 7:36:43 AM [info] [RML] Error not processed.
10/25/2023, 7:36:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 7:51:40 AM [info] [MQTT => Panel] Received change state command disarmed on topic risco-alarm-panel/alarm/partition/1/set in partition 1
10/25/2023, 7:51:40 AM [info] [MQTT => Panel] disarmed command sent on partition 1
10/25/2023, 7:52:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 7:52:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 7:52:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 7:52:43 AM [info] [RML] Error not processed.
10/25/2023, 7:52:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 8:00:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 8:00:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 8:00:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 8:00:43 AM [info] [RML] Error not processed.
10/25/2023, 8:00:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 8:06:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 8:06:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 8:06:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 8:06:43 AM [info] [RML] Error not processed.
10/25/2023, 8:06:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 8:12:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 8:12:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 8:12:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 8:12:43 AM [info] [RML] Error not processed.
10/25/2023, 8:12:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 8:20:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 8:20:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 8:20:43 AM [info] [RML] Proxy server not communicating.
10/25/2023, 8:20:43 AM [info] [RML] Error not processed.
10/25/2023, 8:20:43 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 8:40:43 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 8:40:43 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
markxroberts commented 12 months ago

That's reassuring. Does the sensor change to offline when the timeouts happen? That would be the expected behaviour. If it does, does it matter? I'm glad we seem to have reached a workable solution.

pergolafabio commented 12 months ago

Ah indeed , its in disconnected state now it seems, didnt notice ... While all is working ?

image

pergolafabio commented 12 months ago

Here are logs between that timestamp where it went to disconnected, i also did a restart of HA between it:

10/24/2023, 12:22:52 PM [info] [RML] Subscribing to Home assistant commands topics
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/partition/1/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/1-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/2-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/3-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/4-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/5-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/6-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/7-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/8-bypass/set topic
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to panel partitions events
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to panel zones events
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to panel outputs events
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to panel system events
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to Home Assistant online status
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to system clock
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to socket disconnection message
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to panel communications message
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to socket error message
10/24/2023, 12:22:52 PM [info] [RML] Subscribing to communications error message
10/24/2023, 12:22:52 PM [info] [RML] Panel initialization and autodiscovery completed
10/24/2023, 12:22:52 PM [info] [RML] homeassistant/status was subscribed
10/24/2023, 12:23:37 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:42 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:47 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:52 PM [warn] Command[17] 'CLOCK' Timeout
10/24/2023, 12:23:52 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":17,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,50,72,91,96,29,246,109,176,219,228,224,3]}}
10/24/2023, 12:23:52 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":17,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,50,72,91,96,29,246,109,176,219,228,224,3]}}}
10/24/2023, 12:23:52 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:23:52 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:03 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 12:24:03 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:03 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:03 PM [info] [RML] Error not processed.
10/24/2023, 12:24:03 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 12:24:07 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:12 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:17 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:22 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:22 PM [warn] Command[18] 'CLOCK' Timeout
10/24/2023, 12:24:22 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":18,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,61,72,91,96,29,246,109,176,219,146,148,3]}}
10/24/2023, 12:24:22 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":18,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,61,72,91,96,29,246,109,176,219,146,148,3]}}}
10/24/2023, 12:24:22 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:22 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:35 PM [info] [RML] Error received SocketError, RiscoCloud socket closed
10/24/2023, 12:24:35 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:35 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:35 PM [info] [RML] Error not processed.
10/24/2023, 12:24:35 PM [error] RiscoCloud Socket: closed. Retrying within 10000 ms
10/24/2023, 12:24:37 PM [warn] Command[19] 'CLOCK' Timeout
10/24/2023, 12:24:37 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":19,"attempts":1,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,60,72,91,96,29,246,109,197,219,145,148,3]}}
10/24/2023, 12:24:37 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":19,"attempts":1,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,51,60,72,91,96,29,246,109,197,219,145,148,3]}}}
10/24/2023, 12:24:37 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:37 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:40 PM [warn] Command[20] 'DCN' Timeout
10/24/2023, 12:24:40 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":20,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,17,48,53,79,84,97,73,133,77,176,220,3]}}
10/24/2023, 12:24:40 PM [warn] Error while sending DCN command
10/24/2023, 12:24:40 PM [info] TCP Socket Disconnected
10/24/2023, 12:24:40 PM [info] [RML] Error received CommsError, Socket Disconnected
10/24/2023, 12:24:40 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:40 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:40 PM [info] [RML] TCP Socket disconnected
10/24/2023, 12:24:40 PM [info] [MQTT => Panel] Socket listeners removed
10/24/2023, 12:24:40 PM [info] Automatic reconnection will be attempted in 10000 ms
10/24/2023, 12:24:40 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:45 PM [info] RiscoCloud Socket: ready
10/24/2023, 12:24:50 PM [info] [RML] Error received CommsError, New socket being connected
10/24/2023, 12:24:50 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 12:24:50 PM [info] [RML] Proxy server not communicating.
10/24/2023, 12:24:50 PM [info] [RML] TCP Socket disconnected, new socket being connected.  Ensure old listeners removed.
10/24/2023, 12:24:50 PM [info] Listening on IP :: and Port 33000
10/24/2023, 12:24:50 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/24/2023, 12:25:01 PM [error] RiscoCloud Socket: closed
10/24/2023, 12:27:48 PM [info] Incoming connection from panel received
10/24/2023, 12:27:49 PM [info] RiscoCloud Socket: ready
10/24/2023, 12:27:49 PM [info] Setting a timer for panel connection in 30000 ms
10/24/2023, 12:28:19 PM [info] Panel info: LightSys/RP432, FW 2.70
10/24/2023, 12:28:19 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/24/2023, 12:28:19 PM [info] Devices discovery already done
10/24/2023, 12:28:19 PM [info] [RML] Panel and MQTT communications are ready
10/24/2023, 12:28:19 PM [info] [RML] Publishing Home Assistant discovery info
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to socket disconnection message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to panel communications message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to socket error message
10/24/2023, 12:28:19 PM [info] [RML] Subscribing to communications error message
10/24/2023, 12:28:19 PM [info] [RML] Panel initialization and autodiscovery completed
10/24/2023, 12:29:30 PM [info] [MQTT => Panel] Received change state command disarmed on topic risco-alarm-panel/alarm/partition/1/set in partition 1
10/24/2023, 12:29:30 PM [info] [MQTT => Panel] disarmed command sent on partition 1
10/24/2023, 12:29:39 PM [info] [MQTT => Panel] Received change state command armed_away on topic risco-alarm-panel/alarm/partition/1/set in partition 1
10/24/2023, 12:29:39 PM [info] [MQTT => Panel] armed_away command sent on partition 1
10/24/2023, 12:56:59 PM [info] [RML] Home Assistant has gone offline
10/24/2023, 12:57:38 PM [info] [RML] Home Assistant is online
10/24/2023, 12:57:38 PM [info] [RML] Delay 30 seconds before publishing initial states
10/24/2023, 12:58:08 PM [info] [RML] Publishing initial partitions, zones and outputs states to Home assistant
10/24/2023, 12:58:08 PM [info] [RML] Finished publishing initial partitions, zones and output states to Home assistant
10/24/2023, 12:58:33 PM [info] [RML] Home Assistant has gone offline
10/24/2023, 12:59:14 PM [info] [RML] Home Assistant is online
10/24/2023, 12:59:14 PM [info] [RML] Delay 30 seconds before publishing initial states
10/24/2023, 12:59:44 PM [info] [RML] Publishing initial partitions, zones and outputs states to Home assistant
10/24/2023, 12:59:44 PM [info] [RML] Finished publishing initial partitions, zones and output states to Home assistant
10/24/2023, 1:23:57 PM [warn] Command[44] 'CLOCK' Timeout
10/24/2023, 1:45:41 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 1:45:41 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 1:45:41 PM [info] [RML] Proxy server not communicating.
10/24/2023, 1:45:41 PM [info] [RML] Error not processed.
10/24/2023, 1:45:41 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 2:11:41 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 2:11:41 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 2:11:41 PM [info] [RML] Proxy server not communicating.
10/24/2023, 2:11:41 PM [info] [RML] Error not processed.
10/24/2023, 2:11:41 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 2:39:41 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 2:39:41 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 2:39:41 PM [info] [RML] Proxy server not communicating.
10/24/2023, 2:39:41 PM [info] [RML] Error not processed.
10/24/2023, 2:39:41 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 3:41:41 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 3:41:41 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 3:41:41 PM [info] [RML] Proxy server not communicating.
10/24/2023, 3:41:41 PM [info] [RML] Error not processed.
10/24/2023, 3:41:41 PM [error] RiscoCloud Socket Timeout.
10/24/2023, 4:59:41 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/24/2023, 4:59:41 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/24/2023, 4:59:41 PM [info] [RML] Proxy server not communicating.
10/24/2023, 4:59:41 PM [info] [RML] Error not processed.
pergolafabio commented 12 months ago

Gonna do a new restart of the Addon , and will check logs again when it goes to disconnected state ...

markxroberts commented 12 months ago

I think I hadn't accounted for restarting HA during a reconnection of the add-on (if I understand what happened correctly). In all versions released to date, the panel connection status is only published when the panel connects, so if it reconnects while HA is offline, HA may well not pick up on this when it restarts. I'm just making sure the next version works and then I'll release with the updated code.

pergolafabio commented 12 months ago

Hmm, dont think it was caused by restarting HA... I just did a fresh restart of the addon (back to "connected" ) , and seems the errors below make the sensor go back to "disconnected" state ....

10/25/2023, 9:45:19 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 9:45:19 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 9:45:19 AM [info] [RML] Proxy server not communicating.
10/25/2023, 9:45:19 AM [info] [RML] Error not processed.

image

Full log;

Loading config from: /config/risco-mqtt.json
10/25/2023, 9:14:58 AM [info] autoConnect enabled, starting communication
10/25/2023, 9:14:58 AM [info] [RML] Connecting to mqtt server: mqtt://homeassistant:1883
10/25/2023, 9:14:58 AM [info] Listening on IP :: and Port 33000
10/25/2023, 9:14:58 AM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/25/2023, 9:14:58 AM [info] [RML] Connected on mqtt server: mqtt://homeassistant:1883
10/25/2023, 9:14:58 AM [info] [RML] Panel is not connected, waiting
10/25/2023, 9:15:12 AM [info] Incoming connection from panel received
10/25/2023, 9:15:12 AM [info] RiscoCloud Socket: ready
10/25/2023, 9:15:12 AM [info] Setting a timer for panel connection in 30000 ms
10/25/2023, 9:15:43 AM [info] Panel info: LightSys/RP432, FW 2.70
10/25/2023, 9:15:43 AM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/25/2023, 9:15:43 AM [info] Starting devices discovery
10/25/2023, 9:15:43 AM [info] Retrieving System Information
10/25/2023, 9:15:43 AM [info] Retrieving zones configuration
10/25/2023, 9:15:56 AM [warn] Command[1] 'ZTYPE*14?' Timeout
10/25/2023, 9:16:07 AM [info] Retrieving outputs configuration
10/25/2023, 9:16:09 AM [warn] Command[5] Receipt of an error code: Device Doesn't Exists
10/25/2023, 9:16:09 AM [warn] Got error while fetching output 5 data: N19
10/25/2023, 9:16:09 AM [info] Output 5 does not exists, stopping outputs discovery
10/25/2023, 9:16:09 AM [info] Retrieving partitions configuration
10/25/2023, 9:16:10 AM [info] [RML] Panel and MQTT communications are ready
10/25/2023, 9:16:10 AM [info] [RML] Publishing Home Assistant discovery info
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published proxy status sensor, HA name = Proxy connection status
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published System message sensor, HA name = System message
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published republish state button, HA name = Republish state payload
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published republish autodiscovery button, HA name = Republish autodiscovery
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published restart communications button, HA name = Restart communications
10/25/2023, 9:16:10 AM [info] [RML] Added alarm state mapping for partition Pergola Quintens.
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published alarm_control_panel to HA Partition label = Pergola Quintens, HA name = Pergola Quintens on partition 1
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 01, HA name = Uitgang 01
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 02, HA name = Uitgang 02
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 03, HA name = Uitgang 03
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Output label = Uitgang 04, HA name = Uitgang 04
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Bureau, HA name = Bureau Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Living, HA name = Living Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Inkom, HA name = Inkom Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Boven, HA name = Boven Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = Keuken, HA name = Keuken Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Bureau, HA name = RM Bureau Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Zolder, HA name = RM Zolder Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published binary_sensor to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Alarm
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Bureau, HA name = Bureau Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Living, HA name = Living Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Inkom, HA name = Inkom Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Boven, HA name = Boven Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = Keuken, HA name = Keuken Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Bureau, HA name = RM Bureau Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Zolder, HA name = RM Zolder Bypass
10/25/2023, 9:16:10 AM [info] [Panel => MQTT][Discovery] Published switch to HA: Zone label = RM Wasplaats, HA name = RM Wasplaats Bypass
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to Home assistant commands topics
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/partition/1/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/1-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/2-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/3-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/4-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/5-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/6-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/7-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to risco-alarm-panel/alarm/zone/8-bypass/set topic
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to panel partitions events
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to panel zones events
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to panel outputs events
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to panel system events
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to Home Assistant online status
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to system clock
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to socket disconnection message
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to panel communications message
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to socket error message
10/25/2023, 9:16:10 AM [info] [RML] Subscribing to communications error message
10/25/2023, 9:16:10 AM [info] [RML] Panel initialization and autodiscovery completed
10/25/2023, 9:16:10 AM [info] [RML] homeassistant/status was subscribed
10/25/2023, 9:32:11 AM [warn] Command[10] 'CLOCK' Timeout
10/25/2023, 9:45:19 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 9:45:19 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 9:45:19 AM [info] [RML] Proxy server not communicating.
10/25/2023, 9:45:19 AM [info] [RML] Error not processed.
10/25/2023, 9:45:19 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 9:53:19 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 9:53:19 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 9:53:19 AM [info] [RML] Proxy server not communicating.
10/25/2023, 9:53:19 AM [info] [RML] Error not processed.
10/25/2023, 9:53:19 AM [error] RiscoCloud Socket Timeout.
10/25/2023, 9:59:19 AM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 9:59:19 AM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 9:59:19 AM [info] [RML] Proxy server not communicating.
10/25/2023, 9:59:19 AM [info] [RML] Error not processed.
10/25/2023, 9:59:19 AM [error] RiscoCloud Socket Timeout.
markxroberts commented 12 months ago

Yes, I wondered about that too, so receipt of the Clock signal will also switch the connection sensor back to being online. I suppose the question is should there a tolerance of this within the code, or should we reflect the brief occasional loss of connection and reflect that?

pergolafabio commented 12 months ago

Hmm, not sure what's the best option, is it possible I'd we have multiple clock timeouts in a row, then make it disconnected?

markxroberts commented 12 months ago

Yes, we could do that. This version should just fix the earlier problem. Let's see how that goes and then I'll add the logic for delaying the panel offline status if we still feel that is needed.

pergolafabio commented 12 months ago

Its better now, goes to disconnected for only a few sec:

image

10/25/2023, 12:13:27 PM [error] RiscoCloud Socket Timeout.
10/25/2023, 12:23:27 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 12:23:27 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 12:23:27 PM [info] [RML] Proxy server not communicating.
10/25/2023, 12:23:27 PM [info] [RML] Error not processed.
10/25/2023, 12:23:27 PM [error] RiscoCloud Socket Timeout.
10/25/2023, 12:37:27 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 12:37:27 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 12:37:27 PM [info] [RML] Proxy server not communicating.
10/25/2023, 12:37:27 PM [info] [RML] Error not processed.
10/25/2023, 12:37:27 PM [error] RiscoCloud Socket Timeout.
10/25/2023, 1:33:26 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 1:33:26 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:33:26 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:33:26 PM [info] [RML] Error not processed.
10/25/2023, 1:33:26 PM [error] RiscoCloud Socket Timeout.
pergolafabio commented 12 months ago

Did again a new UTP interrupt, looking good:

image

10/25/2023, 1:39:17 PM [warn] Command[6] 'CLOCK' Timeout
10/25/2023, 1:39:22 PM [warn] Command[6] 'CLOCK' Timeout
10/25/2023, 1:39:26 PM [info] [RML] Error received SocketError, Cloud socket timeout
10/25/2023, 1:39:26 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:39:26 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:39:26 PM [info] [RML] Error not processed.
10/25/2023, 1:39:26 PM [error] RiscoCloud Socket Timeout.
10/25/2023, 1:39:27 PM [warn] Command[6] 'CLOCK' Timeout
10/25/2023, 1:39:32 PM [warn] Command[6] 'CLOCK' Timeout
10/25/2023, 1:39:32 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":6,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,51,72,91,96,29,246,109,176,174,233,227,3]}}
10/25/2023, 1:39:32 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":6,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,51,72,91,96,29,246,109,176,174,233,227,3]}}}
10/25/2023, 1:39:32 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:39:32 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:39:47 PM [warn] Command[7] 'CLOCK' Timeout
10/25/2023, 1:39:52 PM [warn] Command[7] 'CLOCK' Timeout
10/25/2023, 1:39:57 PM [warn] Command[7] 'CLOCK' Timeout
10/25/2023, 1:39:59 PM [info] [RML] Error received SocketError, RiscoCloud socket closed
10/25/2023, 1:39:59 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:39:59 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:39:59 PM [info] [RML] Error not processed.
10/25/2023, 1:39:59 PM [error] RiscoCloud Socket: closed. Retrying within 10000 ms
10/25/2023, 1:40:02 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:40:02 PM [warn] Command[7] 'CLOCK' Timeout
10/25/2023, 1:40:02 PM [warn] Failed to send CLOCK command: RiscoCommandError: Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":7,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,50,72,91,96,29,246,109,197,174,232,227,3]}}
10/25/2023, 1:40:02 PM [info] [RML] Error received CommsError, {"name":"RiscoCommandError","cmd":{"panelId":1,"commandId":7,"attempts":4,"crcOk":false,"commandStr":"CLOCK","sentBuffer":{"type":"Buffer","data":[2,17,50,50,72,91,96,29,246,109,197,174,232,227,3]}}}
10/25/2023, 1:40:02 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:40:02 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:40:04 PM [warn] Command[8] 'DCN' Timeout
10/25/2023, 1:40:04 PM [warn] Risco command error: TIMEOUT. Command: {"panelId":1,"commandId":8,"attempts":1,"crcOk":false,"commandStr":"DCN","sentBuffer":{"type":"Buffer","data":[2,17,50,61,79,84,97,73,252,78,199,220,3]}}
10/25/2023, 1:40:04 PM [warn] Error while sending DCN command
10/25/2023, 1:40:04 PM [info] TCP Socket Disconnected
10/25/2023, 1:40:04 PM [info] [RML] Error received CommsError, Socket Disconnected
10/25/2023, 1:40:04 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:40:04 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:40:04 PM [info] [RML] TCP Socket disconnected
10/25/2023, 1:40:04 PM [info] [MQTT => Panel] Socket listeners removed
10/25/2023, 1:40:04 PM [info] Automatic reconnection will be attempted in 10000 ms
10/25/2023, 1:40:04 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:40:09 PM [info] RiscoCloud Socket: ready
10/25/2023, 1:40:14 PM [info] [RML] Error received CommsError, New socket being connected
10/25/2023, 1:40:14 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
10/25/2023, 1:40:14 PM [info] [RML] Proxy server not communicating.
10/25/2023, 1:40:14 PM [info] [RML] TCP Socket disconnected, new socket being connected.  Ensure old listeners removed.
10/25/2023, 1:40:14 PM [info] Listening on IP :: and Port 33000
10/25/2023, 1:40:14 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
10/25/2023, 1:40:25 PM [error] RiscoCloud Socket: closed
10/25/2023, 1:43:37 PM [info] Incoming connection from panel received
10/25/2023, 1:43:37 PM [info] RiscoCloud Socket: ready
10/25/2023, 1:43:37 PM [info] Setting a timer for panel connection in 30000 ms
10/25/2023, 1:44:08 PM [info] Panel info: LightSys/RP432, FW 2.70
10/25/2023, 1:44:08 PM [info] Panel options: 4 parts, 32 zones, 14 outputs, Pir Cam support: false
10/25/2023, 1:44:08 PM [info] Devices discovery already done
10/25/2023, 1:44:08 PM [info] [RML] Panel and MQTT communications are ready
10/25/2023, 1:44:08 PM [info] [RML] Publishing Home Assistant discovery info
10/25/2023, 1:44:08 PM [info] [RML] Subscribing to socket disconnection message
10/25/2023, 1:44:08 PM [info] [RML] Subscribing to panel communications message
10/25/2023, 1:44:08 PM [info] [RML] Subscribing to socket error message
10/25/2023, 1:44:08 PM [info] [RML] Subscribing to communications error message
10/25/2023, 1:44:08 PM [info] [RML] Panel initialization and autodiscovery completed
markxroberts commented 12 months ago

Great. It sounds like this might be a workable solution. See how it goes for the next day or two.

pergolafabio commented 11 months ago

Today, i had a real crash, it started looping but eventually the addon crashed, logs:

risco.log

markxroberts commented 11 months ago

It's hard to debug that as it looks as though the panel hadn't properly reset its connection but was declaring that the socket had reset. Do you know what caused the socket to disconnect in the first place? Did this show as a disconnection on the sensor?

pergolafabio commented 11 months ago

Hmm, not sure what happened, maybe a cloud issue, i dont know, thats the reason why asked to have somekind of reconnect logic :-)

I think it would reconnect eventually after some loops, but its stange it crashes, not an issue if i have watchdog enabled, but i dont know if you can solve the crash?

Below is the timestamp of the sensor:

image

markxroberts commented 11 months ago

We've not seen this sequence of errors before - the final error this time was EPIPE. There is a relatively limited list of options to address the errors: we can tell the socket to disconnect, or to reconnect. Generally, disconnecting triggers an automatic reconnect. This sequence is happening. The only other option is to kill the connection and prevent a reconnection. This won't solve the problem. You might be better enabling the Watchdog function to restart the addon in this rare case.

pergolafabio commented 11 months ago

Ok, will do that, I just disabled watchdog, otherwise I was not able to capture the logs... I enabled it again now :-)

bugzke commented 11 months ago

Hi @markxroberts ,

Recently switched to your fork of the add-on. I was using the official HA integration (local), but because I have a socket that allows only 1 connection, I was having issues with follow-me and the auto-sync of my panels clock not working while connected to HA.

That's when @pergolafabio hinted to try your version of the add-on in proxy mode. While that does seem to fix the issues I had, it is generating other problems. I frequently get disconnects on all my Risco entities (this never happend with local official integration). Compared my json with that of @pergolafabio but looks the same.

Any idea what might be causing this? image

Meanwhile in the add-on logs:

11/15/2023, 8:42:52 PM [info] [RML] Error received SocketError, Cloud socket timeout
11/15/2023, 8:42:52 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
11/15/2023, 8:42:52 PM [info] [RML] Proxy server not communicating.
11/15/2023, 8:42:52 PM [info] [RML] Error not processed.
11/15/2023, 8:42:52 PM [error] RiscoCloud Socket Timeout.
11/15/2023, 8:43:23 PM [info] [RML] Error received SocketError, RiscoCloud socket closed
11/15/2023, 8:43:23 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
11/15/2023, 8:43:23 PM [info] [RML] Proxy server not communicating.
11/15/2023, 8:43:23 PM [info] [RML] Error not processed.
11/15/2023, 8:43:23 PM [error] RiscoCloud Socket: closed. Retrying within 10000 ms
11/15/2023, 8:43:23 PM [info] TCP Socket Disconnected
11/15/2023, 8:43:23 PM [info] [RML] Error received CommsError, Socket Disconnected
11/15/2023, 8:43:23 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
11/15/2023, 8:43:23 PM [info] [RML] Proxy server not communicating.
11/15/2023, 8:43:23 PM [info] [RML] TCP Socket disconnected
11/15/2023, 8:43:23 PM [info] [MQTT => Panel] Socket listeners removed
11/15/2023, 8:43:23 PM [info] Automatic reconnection will be attempted in 10000 ms
11/15/2023, 8:43:23 PM [info] [RML] Proxy server not communicating.
11/15/2023, 8:43:33 PM [info] [RML] Error received CommsError, New socket being connected
11/15/2023, 8:43:33 PM [info] [Panel => MQTT] Panel not communicating properly.  Panel offline
11/15/2023, 8:43:33 PM [info] [RML] Proxy server not communicating.
11/15/2023, 8:43:33 PM [info] [RML] TCP Socket disconnected, new socket being connected.  Ensure old listeners removed.
11/15/2023, 8:43:33 PM [info] Listening on IP :: and Port 33000
11/15/2023, 8:43:33 PM [info] Waiting for panel incoming connection... This can take up to 1 or 2 minutes
11/15/2023, 8:43:33 PM [info] RiscoCloud Socket: ready
11/15/2023, 8:43:43 PM [info] Incoming connection from panel received
11/15/2023, 8:43:43 PM [info] RiscoCloud Socket: ready
11/15/2023, 8:43:43 PM [info] Setting a timer for panel connection in 30000 ms
11/15/2023, 8:43:49 PM [error] RiscoCloud Socket: closed
11/15/2023, 8:44:14 PM [info] Panel info: LightSys/RP432, FW 5.28
11/15/2023, 8:44:14 PM [info] Panel options: 4 parts, 50 zones, 32 outputs, Pir Cam support: false
11/15/2023, 8:44:14 PM [info] Devices discovery already done
11/15/2023, 8:44:14 PM [info] [RML] Panel and MQTT communications are ready
11/15/2023, 8:44:14 PM [info] [RML] Publishing Home Assistant discovery info
11/15/2023, 8:44:14 PM [info] [RML] Subscribing to socket disconnection message
11/15/2023, 8:44:14 PM [info] [RML] Subscribing to panel communications message
11/15/2023, 8:44:14 PM [info] [RML] Subscribing to socket error message
11/15/2023, 8:44:14 PM [info] [RML] Subscribing to communications error message
11/15/2023, 8:44:14 PM [info] [RML] Panel initialization and autodiscovery completed
markxroberts commented 11 months ago

That's tricky. Are there any errors in the logs prior to this? It will go offline when it doesn't receive a clock signal in a certain period. We can adapt that delay, but the sequence of errors shown above is a bit more puzzling.

bugzke commented 11 months ago

No errors before that.

I now notice a new log entry 11/15/2023, 9:35:38 PM [warn] Command[17] 'CLOCK' Timeout

But this doesn't seem to reflect to anything in the entities, all still connected without interruption.

The disconnects seem to occur randomly. Timings from today: