TJForc / risco-lan-bridge

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

RiscoCloud Socket Destroyed. #13

Closed pergolafabio closed 2 years ago

pergolafabio commented 2 years ago

Hey, started and testing to use the proxy method, i started the project 4 times, but 2 times it failed, with error below what could be the issue?

on my router i created a rule: iptables -t nat -I PREROUTING -s 192.168.0.50 -d www.riscocloud.com -p tcp --dport 33000 -j DNAT --to-destination 192.168.0.17:33000

so that works

but i see in log:

Local GMT Timezone is : +01:00
Start Connection to Panel
TCP Socket is not already created, Create It
Pseudo Buffer Created for Panel Id(0001): 
## removed some buffer data here ... not sure if its private?
TCP Socket must be created now
Listening on IP :: and Port 33000
Panel Socket and RiscoCloud Socket Connected.
## removed some buffer data here ... not sure if its private?
Socket Closed.
TCP Socket Disconnected
RiscoCloud Socket Destroyed.
Start Connection to Panel
TCP Socket is already created, Connect It
Listening on IP :: and Port 33000
Sending Command : RMT=1014
Command CRC Value : F9EC
Socket Destroyed while using it.

if i do a restart of your bridge, it starts working again... maybe we need to failsafe it? in case it gets the error, some restarting ?

pergolafabio commented 2 years ago

hey @TJForc , tried again today, was setting up my panel with a static IP i had the project running, i saw it connecting , but again error below ... I left it for a few minutes, maybe you already implemted some restart... but it didnt restarted the docker, 1 min later the panel was connecting again, and all good then

not sure why its not connecting first time, but can you arrange some restart of the service once this error occurs? otherwise with a power interrupt or something, i could have issues that my panel is not connected anymore

thnx


Socket Closed.
TCP Socket Disconnected
RiscoCloud Socket Destroyed.
Start Connection to Panel
TCP Socket is already created, Connect It
Listening on IP :: and Port 33000
Sending Command : RMT=1014
Command CRC Value : F9EC
Socket Destroyed while using it.
pergolafabio commented 2 years ago

i also have the buffer full debug log, didnt copy paste it, not sure if there is sensitive data in it

pergolafabio commented 2 years ago

@vanackej

sorry to tag you here, but this issue is indeed happening in the add-on, is there maybe a way to make the add-on restart when this issue occures? its verry freaquent... it happens every 1 of the times i restart the project thnx in advance

pergolafabio commented 2 years ago

gonna, close,

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