The startup settings file

The pydondefaults.ini file contains the settings with which pydongui.py or pydoncli.py is started. The program looks for this file in the directory from which it is started. So if you start from a folder with the path: /home/username/mycoolproject/, it will look for the file /home/username/mycoolproject/pydondefaults.ini. This means that if you have multiple projects using Sense/Stage MiniBees you can use a method of always starting the pydongui.py from the folder of the project you want to work on and have the defaults for that project as defaults in the configuration.

Normally you do not need to edit this file, as it is automatically generated by the software. However in rare cases you may want to look at it to solve issues.

Format of the file

The file is divided in different sections, each separated by a header indicated with square brackets, e.g. [osc] for all the settings that relate to the OSC interface. We will descibe the settings of each section one by one.

The OSC settings

    [osc]
    program = osc
    name = pydonhive
    ip = 0.0.0.0
    port = 57600
    host = 127.0.0.1
    hport = 57120
  • program - the communication mode. These can be osc, datanetwork, junxion or libmapper.
  • name - the name that is used within the datanetwork (so it only has a relevance in that mode).
  • ip - the IP-address on which the Hive listens. 0.0.0.0 means that it listens on all network interfaces.
  • port - the port on which the Hive listens. The default is 57600.
  • host - the IP-address to which the Hive sends messages. 127.0.0.1 means the localhost, i.e. the same computer as on which the Hive is running. If you want to send to a different computer you have to fill in its IP-address here.
  • hport - the port to which the Hive sends messages. This has to match the port on which you listen to messages with your software.

The serial settings

    [serial]
    baudrate = 57600
    serial = /dev/ttyUSB0
    apimode = True
  • baudrate - the speed of communication with the coordinator node. The default is 57600. This has to match the baudrate that is set in the XBee configuration.
  • serial - the path of the serial port to use.
  • apimode - whether or not to use the API-mode of the XBee. For the current version of the firmware, this needs to be set to True.

Settings for the hive

    [hive]
    logdata = False
    mboffset = 1
    minibees = 20
    config = /home/nescivi/newconfig_2017_Jan_19_18-03-55.xml
    ignore = False
    xbeeerror = False
    autostart = False
    createnewfiles = True
  • logdata - whether or not to log the incoming data
  • mboffset - This is the starting ID for the minibees. This only affects those minibees the automatic assignment of ID’s of minibees that are not configured in the configuration file.
  • minibees - The maximum number of minibees.
  • config - The configuration file to be used.
  • autostart - Whether to automatically start the communication to the coordinator node. If set to false, the GUI will start with the options window. If set to true, the hive will take the options as defined in the startup file and start the communication rightaway.
  • xbeeerror - In rare cases the coordinator XBee can get confused. With a coordinator board that resets the XBee when the usb port is opened, the program can recover from this automatically by closing and then reopening the USB port.
  • createnewfiles - Whether or not to automatic create a new configuration file if a MiniBee that is not yet defined in the current configuration file.
  • ignore - Ignore minibees that are not yet defined in the configuration file.

Logging and verbose output

    [verbosity]
    verbose = False
    logname = pydon.log
    loglevel = info
    quiet = False
    clean = False
    logdir = .
  • verbose - whether or not to output more verbose messages. This can be useful for debugging the communication with the MiniBees.
  • logname - the name of the logfile that is created. The logfile will contain all the output that the program generates.
  • loglevel - the level of data that is logged. This can be info, debug, or error.
  • quiet - whether or not to show the logging output while running.
  • clean - whether or not to delete the old logfile in the same folder before starting to log.
  • logdir - the directory in which to put the logfile. . means the current directory.

page created on: last changed on:
6 February 2017 28 March 2018