From 6beb4af5ea0fc13702d2bc4be8b03cae623c9c7a Mon Sep 17 00:00:00 2001 From: Joris Date: Thu, 23 Dec 2021 12:52:10 +0000 Subject: [PATCH] Update Get it Running - Step by Step.md --- source/usage/Get it Running - Step by Step.md | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/source/usage/Get it Running - Step by Step.md b/source/usage/Get it Running - Step by Step.md index 8062fc7..0feb8e5 100644 --- a/source/usage/Get it Running - Step by Step.md +++ b/source/usage/Get it Running - Step by Step.md @@ -27,7 +27,9 @@ on the console of the system where the BFFH-Server is running. Use the adress li Start the server. If you are using the docker, this is done by using
`docker-compose up -d`.
If you compiled the server on your system this is done by entering
-`./diflouroborane -c examples/bffh.dhall --load examples` and then `./diflouroborane -c examples/bffh.dhall`.
+`./diflouroborane -c examples/bffh.dhall --load examples`
+and then
+`./diflouroborane -c examples/bffh.dhall`.
You will see some debug information, with probably some warnings. Open the App. You will be asked to connect to a Host. Tap "DEMO HOST ADRESS" and change the IP to the IP of your Server, do not change the port number (everything after the IP. This should look like `192.168.1.15:59661`). @@ -68,10 +70,12 @@ To understand the underlaying concept of actors and machines, please see the "co **Tip** Prior to modifying the configuration files the proper working of the MQTT broker should be tested. To test the broker it is the best to use a second (linux) computer with a different IP adress. To test if the broker allows access from an external IP address open a MQTT subscriber on the second computer by typing
`mosquitto_sub -h 192.168.1.15 -t /test/topic` (change the IP adress to the adress of your server).
-Use `mosquitto_pub -h localhost -t /test/topic -m "Hallo from BFFH-Server!"` to send a message to the other computer. If the message appears, everything is ok. When not, this should be first solved, as a connection to the shellies will not be possible this way.
+Use
+`mosquitto_pub -h localhost -t /test/topic -m "Hallo from BFFH-Server!"`
+to send a message to the other computer. If the message appears, everything is ok. When not, this should be first solved, as a connection to the shellies will not be possible this way.
If you are interested in communication between the shellies and the BFFH-Server you can use
-`mosquitto_sub -h 192.168.1.15 -t shellies/#` (change the IP adress to your needs).
-You will see some values popping op from time to time. +`mosquitto_sub -h 192.168.1.15 -t shellies/#`
+(change the IP adress to your needs). You will see some values popping op from time to time. **Configure Diflouroborane** Open the file "bffh.dhall" in the GUI Editor (just by double-clicking it) or use `nano bffh.dhall` in your console.
@@ -86,7 +90,8 @@ The ID of the Shelly should match the ID of your Shelly. Here you can enter as m Now you have to link a "machine" to an "actor".
Go to the line starting with `{actors_connections =` and after the following `[` you add
-`{ machine = "Identifyer-of-your-Machine", actor = "shelly1-E8DB84A1CFF4" }` using your own Name-of-your-Machine and the Shelly-ID of the related actor. +`{ machine = "Identifyer-of-your-Machine", actor = "shelly1-E8DB84A1CFF4" }`
+using your own Name-of-your-Machine and the Shelly-ID of the related actor. Now you have to set the "access-permissions" to your "machine".
Go to the line starting with `, machines =`. and after the `{` you can add a machine:
@@ -112,3 +117,14 @@ and restart start Diflouroborane: `./diflouroborane -c examples/bffh.dhall` Open the App, an you should see the newly created machine in the list. By tapping "USE" you will activate the machine (Shelly will click, the MQTT-listener should promp an "on"), by tapping "GIVEBACK" you will deactivat the machine. + +**Creating a QR-Code for your machine** +A QR code allows users to directly enter the UI of the machine, where the machine can be used or given back. The QR code should contain the following content:
+`urn:fabaccess:resource:{MachineID}`
+e.g.
+`urn:fabaccess:resource:Identifyer-of-your-Machine`
+ +QR-Codes can be generated on various pages in the internet (e.g. https://www.qrcode-generator.de), the "Type" of the QR code should be "Text". The generated code can be directly scanned by the FabAccess App in the machine overview. + + +