Skip to content

#26 allow connecting through http server#28

Merged
bparks13 merged 5 commits into
open-ephys-plugins:mainfrom
imec-int:#26-allow-connecting-through-http-server
Dec 15, 2025
Merged

#26 allow connecting through http server#28
bparks13 merged 5 commits into
open-ephys-plugins:mainfrom
imec-int:#26-allow-connecting-through-http-server

Conversation

@tzijnge

@tzijnge tzijnge commented Dec 10, 2025

Copy link
Copy Markdown
Contributor
  • 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

@bparks13 bparks13 left a comment

Copy link
Copy Markdown
Member

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.

Comment thread Source/EphysSocket.cpp Outdated
Comment thread Source/EphysSocket.cpp Outdated
Comment thread Source/EphysSocket.cpp Outdated
Comment thread Source/EphysSocket.cpp Outdated
@bparks13 bparks13 linked an issue Dec 12, 2025 that may be closed by this pull request
@bparks13

Copy link
Copy Markdown
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

tzijnge commented Dec 15, 2025

Copy link
Copy Markdown
Contributor Author

@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

@bparks13 bparks13 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

tzijnge commented Dec 17, 2025

Copy link
Copy Markdown
Contributor Author

@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