server/README.md

20 lines
1 KiB
Markdown
Raw Normal View History

2021-08-18 16:44:24 +00:00
# server
2021-08-19 09:40:36 +00:00
The backend server of MlmAccess
# Workflows
## Pairing
A new actor can pair like this:
1. Connect to the broker using `pair-actor` as username and the pair secret as password
2. Subscribe to `mlmAccess/pair/response/actor`
3. Publish its desired ID to `mlmAccess/pair/request/actor`
4. The backend will publish the password for the actor to `mlmAccess/pair/response/actor` in case of success
5. In case of an error, the backend will publish an empty string to `mlmAccess/pair/response/actor`
6. The actor may now connect using `actor-{id}` as username and the password it got in 4
## Actor normal operation
During normal operation (after pairing) the actor has to follow this workflow:
1. The actor subscribes to `mlmAccess/actor/{id}/action`
2. The actor publishes its status to `mlmAccess/actor/{id}/status`
3. The backend will publish a requested state change to `mlmAccess/actor/{id}/action`
4. The actor will publish its state to `mlmAccess/actor/{id}/status` to let the backend know that the action was executed successfully