Skip to content

Commit

Permalink
added websocket docu
Browse files Browse the repository at this point in the history
  • Loading branch information
zweckj committed Apr 27, 2023
1 parent b7468f2 commit b9584ee
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,15 @@ The local API initiates a websocket connection to
```
http://{IP}:8081/api/v1/streaming
```
The packets which are received on that WebSocket are documented in [websockets](docs/websockets.md)
The packets which are received on that WebSocket are documented in [websockets](docs/websockets.md)

If WebSockets are enabled the shot timer becomes available to use, however as long as the library is running in WebSocket mode, the App will no longer be able to connect.

To use WebSockets start the integration with
```python
lm = await LMCloud.create_with_local_api(creds, <IP>, port=8081, use_websockets=True)

while True:
print(lm._lm_local_api.active_brew) # is a brew running at the moment
print(lm._lm_local_api.active_brew_duration) # the current shot timer returned by the machine
```

0 comments on commit b9584ee

Please sign in to comment.