SocketIO Websocket Mode

 

Hello there.


Do you have a bit more precise documentation about what exactly the socketio mode for websocket does?

I really can't imagine how I should even implement a handshake for authentication, as there's just no useful documentation for aximmetry and socketio does a lot of additional wrapping.

Also it would be very useful to have something like a debugLog or anything when making http or websocket requests (or maybe there is a way I don't know yet) for tracing issues.

Is there anyone experienced with this topic, that could help?

Thank you.

   aschulz

 
Profile Image
EricWest
  -  

Pushing this topic to the top again...:-)

Closer information on how exactly this module works with socketIO would be splendid!

Cheers & all the best.

Eric.


 
Profile Image
Eifert@Aximmetry
  -  

Hi,

Please note that Socket.IO does not operate in Binary mode; it only supports the WebSocket protocol of Socket.IO.

When defining the Data, it should be formatted as follows: 42["eventname", mydata]

Where the mydata part can be in JSON format. For example: 42["message", {"something": "Text", "otherthing": 4.35}].

Note, that you can easily convert Aximmetry's collection format to JSON with the Collection To JSON module and then parse it into the 42["eventname",     ]  text with the Text Concat Multi module:

In the upcoming Aximmetry version (2024.2.0), you will no longer need to specify the packet type with 42. Instead, you will need to format it as: ["eventname", mydata].

In the return packet, Aximmetry only processes type "42" packets at the Received pin, automatically omitting the 42.

Additionally, there is currently an issue in the Socket.IO implementation that is causing frequent disconnects, which will be addressed in the next Aximmetry release (2024.2.0). Until then, you may mitigate this issue by setting higher pingInterval and pingTimeout values on your Socket.IO server as follows:  const io = require('socket.io')(http, {'pingInterval': 100000, 'pingTimeout': 100000});

Warmest regards,

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

The new Aximmetry version 2024.2.0 BETA has been released. https://aximmetry.com/learn/software-version-history/#%E2%96%BA-Latest:%202024.2.0

This new version fixed the above issues of Socket.IO, you no longer need to have 42 at the start of the Data.
Also, the Socket.IO part of the documentation was updated: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/setting-up-inputs-outputs-for-virtual-production/external-controllers/using-websocket-and-http-in-aximmetry/#input-pins

Warmest regards,

 
Profile Image
aschulz
  -  

Thanks for your example and additional information about the upcoming version of aximmetry!

;