My IoT is configured using TOML files specified as command-line arguments:

my-iot my-iot.toml


# my-iot.toml

http_port = 8080

# `heartbeat` is a user-defined service ID.
type = "Clock"
interval_millis = 2000

type = "Buienradar"
station_id = 6240

Securing Secrets

It’s a common pattern to split configuration into non-secret and secret parts, where non-secret part is stored under a version control.

my-iot allows specifying multiple settings files, it means that you can put your secrets in a separate file excluded by .gitignore. Services provide separate configuration section to allow moving it out of public part.

For example:

# my-iot.toml:
type = "Telegram"

type = "Solar"
room_title = "Amsterdam"

# secrets.toml:
token = "..."

latitude = 52.3667
longitude = 4.8945

Then you run My IoT as my-iot my-iot.toml secrets.toml.