APP_CONF_SCHEMA multiple files?

gadams999gadams999 Atlanta, GA

Hi,

Is there a way to reference multiple files via APP_CONF_SCHEMA? I'd like to be able to put all non-secure details in src/conf_schema.yaml and then wifi.sta.ssid and wifi.sta.pass in a file ignored by git.

Comments

  • rojerrojer Dublin, Ireland
    edited April 17

    conf schema is actually built from multiple files, you can specify several and it should work just fine.
    however, you should not be specifying wifi settings there - put them into one of the confX.json files, X being a number from 1 to 9, and put this file into the filesystem directory (most of our examples set filesystem dir to fs).
    see here for config system overview.
    in short, this snippet in mos.yml:

    filesystem:
      - fs
    

    will incorporate files from the fs subdirectory into the filesystem image in the firmware.
    you can put a file called conf5.json there, with something like this:

    {
      "wifi": {
        "ap": { "enable": false },
        "sta": {
          "enable": true,
          "ssid": "MyWifi",
          "pass": "XXX"
        }
      }
    }
    
  • gadams999gadams999 Atlanta, GA

    Perfect, just what I needed for an explanation. Getting up to speed on mgos, slowly but surely.

Sign In or Register to comment.