Shelly & TCP listener

Krzysztof Szczepański 2 years ago in Devices / Basic updated 10 months ago 1

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

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

In Shelly FW version 20221027-091427/v1.12.1-ga9117d3 the problem has been fixed. :)