update ubuntu example

This commit is contained in:
Kai Kriegel 2023-01-19 00:27:39 +00:00
parent f0127d2111
commit 2c7bbcf0b2
1 changed files with 16 additions and 12 deletions

View File

@ -53,7 +53,7 @@ Diflouroborane uses mosquitto MQTT broker to communicate with the Shellies. Star
10. Configuring mosquitto broker
for some reason, starting with version 2.x mosquitto does not allow external communication via the broker per default. This needs to be changed via a config file:
11. Stop mosquitto
`sudo service mosquitto stop`
`sudo systemctl stop mosquitto`
12. Change into the "etc/mosquitto/" directory (lots of `cd ..` then `cd etc/mosquitto`)
13. Edit the configuration fil:
`sudo nano mosquitto.conf`
@ -62,31 +62,35 @@ add:
`allow_anonymous true`
Save (Strg-O) and close (Strg-X)
14. Enable mosquitto to start at each start of the system
`sudo systemctl enable mosquitto`
`sudo systemctl enable --now mosquitto`
15. Restart the system.
The BFFH-server can be found at the /target/release folder. Prior to starting the system you need to copy the files from `bffh/examples` to `bffh/target/release/examples` This ist best done by using the GUI filemanager.
To get at least minimum functionality the bffh.dhall should be modified. The lines:
`-- , init_connections = [] : List { machine : Text, initiator : Text }`
` , init_connections = [{ machine = "Testmachine", initiator = "Initiator" }]`
` , initiators = --{=}`
` { Initiator = { module = "Dummy", params = { uid = "Testuser" } } }`
```
-- , init_connections = [] : List { machine : Text, initiator : Text }
, init_connections = [{ machine = "Testmachine", initiator = "Initiator" }]
, initiators = --{=}
{ Initiator = { module = "Dummy", params = { uid = "Testuser" } } }
```
should be modified to:
`, init_connections = [] : List { machine : Text, initiator : Text }`
` --, init_connections = [{ machine = "Testmachine", initiator = "Initiator" }]`
` , initiators = {=}`
` --{ Initiator = { module = "Dummy", params = { uid = "Testuser" } } }`
```
, init_connections = [] : List { machine : Text, initiator : Text }
--, init_connections = [{ machine = "Testmachine", initiator = "Initiator" }]
, initiators = {=}
--{ Initiator = { module = "Dummy", params = { uid = "Testuser" } } }
```
To start the server change into the directory by using `cd target/release` and using:
`./diflouroborane -c examples/bffh.dhall --load examples`
`./bffhd -c examples/bffh.dhall --load examples/users.toml`
an then:
`./diflouroborane -c examples/bffh.dhall`
`./bffhd -c examples/bffh.dhall`
**BUT** prior to starting bffh, you should first configure the bffh.dhall file (see the "Use FabAcess" section).