From 23f4d4ced9d5bd1a80ee3bbe59345e6324e91ce8 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Thu, 19 Aug 2021 11:40:36 +0200 Subject: [PATCH] Add some info to readme --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c0275d4..b2c9b70 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # server -The backend server of MlmAccess \ No newline at end of file +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 \ No newline at end of file