Skip to content

Conversation

@tzijnge
Copy link
Contributor

@tzijnge tzijnge commented Dec 10, 2025

  • Added commands to connect and disconnect the socket. Also a command to query the connection state.
  • Unlike other commands, connection state can be modified when the socket is connected, or else it would be impossible to disconnect
  • example:
def connect_socket(self) -> bool:
    es_id = self._get_ephys_socket_id()

    response = self._put(
        f"/api/processors/{es_id}/config",
        payload={"text": "ES CONNECT"},
    )

    return response["info"] == "CONNECTED"

Timon Zijnge added 3 commits December 8, 2025 20:50
* Added additional string parameter 'connection_state'. Allow modifying it through the HTTP config interface to connect/disconnect the socket
* Cleanup and a small clarification
@bparks13 bparks13 self-requested a review December 12, 2025 15:21
Copy link
Member

@bparks13 bparks13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start, thank you for submitting it! I have a few comments, and some suggestions, please take a look at them and change those sections.

@bparks13 bparks13 linked an issue Dec 12, 2025 that may be closed by this pull request
@bparks13
Copy link
Member

@tzijnge One more thing, please go to the OpenEphysLib.cpp file, and update the library version to 1.1.0:

info->libVersion = "1.1.0";

Timon Zijnge added 2 commits December 15, 2025 10:37
* Addressing review comments. Removed parameter to simplify code and process of connecting and disconnecting remotely
* Update library version
@tzijnge
Copy link
Contributor Author

tzijnge commented Dec 15, 2025

@tzijnge One more thing, please go to the OpenEphysLib.cpp file, and update the library version to 1.1.0:

info->libVersion = "1.1.0";

Done

Copy link
Member

@bparks13 bparks13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I tested this and was able to connect/disconnect/query the connection status successfully. Thanks for the help with this.

@bparks13 bparks13 merged commit 35f7a3c into open-ephys-plugins:main Dec 15, 2025
9 checks passed
@bparks13
Copy link
Member

@tzijnge I have merged this to the main branch. It is not deployed to the plugin manager yet, I will wait to do that until we have updated the documentation. Let me know if you would like to take a shot at doing that, or I would be happy to take care of it.

@tzijnge
Copy link
Contributor Author

tzijnge commented Dec 17, 2025

@bparks13 I have also updated the documentation and created a PR. Thanks for the collaboration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow connecting through the HTTP server

2 participants