jensrossbach / node-red-contrib-sony-audio

Node-RED nodes for accessing Sony Audio Control API
MIT License
2 stars 0 forks source link

Improved connection handling #43

Closed jensrossbach closed 2 years ago

jensrossbach commented 2 years ago

Connection handling has been improved:

  1. Reconnect command of controller node now first disconnects from remote peer in case a connection seems to be still established and then starts a reconnection.
  2. While being connected to the device, a ping message is sent to the websocket in a regular interval. If the ping message is not acknowledged within five seconds, the connection will be closed and the recovery mechanism starts.

Additionally the controller node now shows a green status after triggering reconnection. This is not an actual indication that the reconnection succeeded, rather it only indicates a reaction of the controller node on the trigger.