SW_ConfigInitial - fablab-wue/piTelex GitHub Wiki

Initial setup

Instead of fiddling with the full blown telex.json from the distribution which contains nearly all possible combinations and variants and therefore might be confusing for the first time user, you can use a more convenient method described below.

  1. Strongly recommended: save the original telex.json for future use, e.g.:

      cp telex.json telex.json.orig
    

    The file contains a bunch of templates for different device configurations together with short explanations. It should be kept for information reasons.

  2. produce a stripped down config file that is tailored to your needs. For a standard current loop TW39 setup with i-Telex connectivity on port 2342 this could be achieved by something like

     ./telex.py --config "myconfig.json" --RPiTW39 --iTelex 2342 --log "pitelex.log" --id "134567 dummy d"  --save 
    

    This calls telex.py with all values from myconfig.json, adds or overwrites them with the specified features from the command line, and writes the resulting configuration back to the configuration file. To start from scratch, just give piTelex in -c | --config a nonexistent or empty file.

    For a list of command line arguments see Command Line Arguments

    At startup, piTelex tries to read its configuration file (either the default one or the one given by -c |--config). If no configuration file can be found, piTelex throws a warning message and starts with built in defaults. The values from this first step make up the initial configuration. Given command line arguments then add features and possibly overwrite values from the first step; in case of devices, the added/replaced device block will contain default values for all block specific options. Specifying the command line argument -s | --save lets piTelex finally write out the resulting configuration back to the file (default or given in -c).

  3. After that,telex.json resp. myconfig.json contains your 'bare metal' config. You may now edit the file to reflect non-standard conditions (e.g. different GPIO-lines). For this fine tuning all options from section Configuration file can be used.

  4. Also check and adapt the default pathnames in telex.json resp. myconfig.json to your environment.

With a fine tuned configuration file the cmdline args can be omitted in the future when calling telex.py - unless you want to temporarily add or change a feature.

[!Important] Remember to pass the correct filename of your new configuration file to 'telex.py' (e.g. ./telex.py -c myconfig.json) if you did not overwrite the default file telex.json in step 2 :-)