bitfocus / companion-module-grassvalley-amp

MIT License
0 stars 1 forks source link

Disconnections not handled properly #4

Closed onfire4g05 closed 3 years ago

onfire4g05 commented 4 years ago

When a device disconnects (in our case, weekly reboots), there are a couple issues:

My thoughts are there's something wrong in reconnecting. I'll be working on a fix, I just wanted to document what the problem was.

A work around we have right now is to reconnect to the device before sending a command. Obviously that's a hacky solution, but is a work around.

onfire4g05 commented 4 years ago

From the manual:

  • Controlling device will detect a timeout condition if it receives no reply within 100msec of sending a command.
  • Response timing from controller shall not be greater than 10msec for immediate commands.

Obviously that'd be unacceptable if you sent a "play" command and determined it was disconnected. I think what I'm going to do is add status variables that has the device status and then set a connection timeout a bit higher than those. Like 2 seconds, timeout 5 seconds. While not perfect, this should make things quite a bit more stable on connection failures.