You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
The text was updated successfully, but these errors were encountered:
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 .
The text was updated successfully, but these errors were encountered: