0

Shelly & TCP listener

Krzysztof Szczepański 6 months ago in Devices / Basic 0

I have a little problem integrating Shelly through the tcp server

Shelly integration is in your libraries https://www.comfortclick.com/BOS/Library/Devices/115

Everything works fine except the listener.

The listener is configured as a tcp server, accepts connections but does not respond and does not close the session which causes Shelly to hang.

Shelly expects any response from the host or session closure.

I did the tests using https://docs.microsoft.com/pl-pl/dotnet/api/system.net.sockets.tcplistener?view=net-6.0

If the listener answers the call from Shelly or closes the session, everything works fine.

Conversely, when the host accepts the call and nothing returns or closes the session, Shelly stops sending calls to the host and suspends Shelly until a reset. Shelly appears to be waiting for any information from the host, without it being able to complete the routine.

In the code from the MS website from lines 45 to 63 there is a procedure that sends back to the client what the client sent, while on line 64 the connection is closed.

Removing these lines causes the problem and probably simulates comfortclicka operation.

Is there any call that will get a reply from comfortclick's website eg http://192.168.1.10/comfortclickreply?par=1?

Alternatively, you could add a checkbox as an option - "Send this message as confirmation:", "message" ?

checked on bOS v4.9.8 and Shelly 1 with fw 20220209-092750 / v1.11.8-g8c7bb8d