Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to "re-use" commands data for/over multiple interfaces #139

Open
mStirner opened this issue May 5, 2022 · 1 comment
Open

Comments

@mStirner
Copy link
Member

mStirner commented May 5, 2022

For example: my samsung TV can be controlled over a serial connection or via WebSocket over ethernet.
To not define every command (string) twice or "clone" the command object, a neat way would be to define the commands once, and handle them respectively based on the type: SERIAL / ETHERNET.

The way over WebSocket is to "wrap" it in a json message with other properties/parameters.
Over Serial, just send the payload to the device.

How to handle both?
In fact for the WebSocket/Ethernet type a plugin/custom handler is needed.

But to store the commands for both interfaces and declare them only once a solution is needed/appreciated .

@mStirner mStirner added this to the v4.0.0 release milestone Oct 29, 2022
@mStirner
Copy link
Member Author

Commands have a property .interface. How about to change this from string to/and or array store multiple interfaces?

Could there be a problem with the command handler?
The interface is passed as argument to it, so no(?|!)

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

No branches or pull requests

1 participant