Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
linbus:multicontroller_websockets [2021/03/05 10:29] superuser |
linbus:multicontroller_websockets [2021/04/07 06:46] (current) superuser |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| The interaction with server is done trough web sockets | The interaction with server is done trough web sockets | ||
| + | |||
| + | To connect use this URL: | ||
| + | |||
| + | <code> | ||
| + | ws://127.0.0.1:4444/linbus | ||
| + | </code> | ||
| ===== Current height ===== | ===== Current height ===== | ||
| Line 13: | Line 19: | ||
| ===== Movement commands ===== | ===== Movement commands ===== | ||
| - | |||
| - | To connect use this URL: | ||
| - | |||
| - | <code> | ||
| - | ws://127.0.0.1:4444/linbus | ||
| - | </code> | ||
| Send next commands to perform actions | Send next commands to perform actions | ||
| Line 37: | Line 37: | ||
| </code> | </code> | ||
| + | ===== Position commands ===== | ||
| + | To connect use this URL: | ||
| + | <code> | ||
| + | ws://127.0.0.1:4444/position | ||
| + | </code> | ||
| + | |||
| + | Send desired position(in cm) in this format: | ||
| + | |||
| + | <code> | ||
| + | {"name":"test1", "position":100} | ||
| + | </code> | ||
| + | |||
| + | ===== Settings commands === | ||
| + | |||
| + | To connect use this URL: | ||
| + | |||
| + | <code> | ||
| + | ws://127.0.0.1:4444/settings | ||
| + | </code> | ||
| + | |||
| + | Get settings: | ||
| + | <code> | ||
| + | {"name":"test1", "action":"get"} | ||
| + | </code> | ||
| + | |||
| + | Set settings: | ||
| + | <code> | ||
| + | {"name":"test1", "action":"set", "min":0, "max":40, "displayName":"Motor1"} | ||
| + | </code> | ||
| + | |||
| + | ===== Memory commands ===== | ||
| + | To connect use this URL: | ||
| + | |||
| + | <code> | ||
| + | ws://127.0.0.1:4444/memory | ||
| + | </code> | ||
| + | |||
| + | Get stored positions: | ||
| + | <code> | ||
| + | {"name":"test1", "action":"get"} | ||
| + | </code> | ||
| + | |||
| + | Set stored positions: | ||
| + | <code> | ||
| + | {"name":"test1", "action":"set", "positions":[100]} | ||
| + | </code> | ||