Setting up the HMI
To setup the HMI, do the following:
First create an application configuration file. For this tutorial, we name the file
app.toml. From your working directory, create a file namedapp.tomlUse your favorite text editor program, open
app.tomland paste in the following configuration:
[hmi]
app_name = "OpenFMB HMI"        # name of the application
environment = "dev"             # dev or prod refering to nats.dev_uri or nats.prod_uri accordingly
log-level = "Debug"             # Off, Error, Info, Debug, Trace
# server_host = "0.0.0.0"       # For docker run, this should be "0.0.0.0", for local debugging, 
                                # this needs to match the host computer's ip address
# server_port = 80              # default is 443 for https and 80 for http
# comment out these two ssl related items if TLS is needed
# ssl_cert = "/server/certs/server/server-cert.pem"
# ssl_key = "/server/certs/server/server-key.pem"
[nats]
prod_uri = "10.0.0.1:4222"      # NATS broker connection URL.  IF environment = "prod", this URL shall be used
dev_uri = "192.168.86.1:4222"   # NATS broker connection URL.  IF environment = "dev", this URL shall be used
# authentication_type = "creds" # comment out to enable NATS credential authentication type
# creds = "meter.creds"         # comment out to specify NATS credentials file
- There is a quick switch between 
prodanddevenvironment. Specifyprod_uriordev_uriaccording to what is set forenvironment - If 
hmi.environmentis set toprod, update thenats.prod_urito the NATS connection URL that you want to connect to. Otherwise, update thenats.dev_uri. sever_hostshould be set to0.0.0.0to bind to all network interfaces. If you want to bind to a specific network interface, setserver-hostto the IP address associated with that interface.