settings.yaml 1.61 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SERVER:
    # full URL that accepts POST method for sending data to the server
    # it should end with a valid board ID number (see documentation)
    # 
    API_POST_URL: http://localhost/emm/api/post/rawsensordata/2

LOGGER:
    # time between readings attempts (cycles of the logger execution)
    # 
    READING_INTERVAL: {seconds: 10, minutes: 0, hours: 0, days: 0}

    # format of the datetime column (see Python docs on datetime module)
    # 
    DATETIME_FORMAT: '%Y%m%d%H%M%S'

# list of sensors to be read (the order reflect columns of DATALOG_CSV file)
# to ignore one, comment it out by putting # in the beginning of the line
#
SENSORS:
    - {nickname: DHT22_TEMP,      data_format: float}
    - {nickname: DHT22_AH,        data_format: float}
    - {nickname: BMP085_PRESSURE, data_format: int}
    - {nickname: LDR,             data_format: float}

ARDUINO:
    # comma-separated list of USB ports that may have the Arduino plugged in 
    # Arduino Uno usually mounts on /dev/ttyACMx; the others go on /dev/USBx
    #
    SERIAL_PORT: /dev/ttyACM0, /dev/ttyACM1

    # Arduino serial communication protocol (same as in meteorolog.ino)
    #
    BAUD_RATE: 9600      # 115200 seems unstable with Uno + PySerial    

FILES:
    # file which will hold all data locally (regardless of the web server)
    #
    DATALOG_CSV: data/datalog.csv

    # CSV delimiter to be used on the file DATA_LOG_FILENAME
    # Sugestions: ',' or ';' or '\t' for tab (do not use the period '.')
    #
    DATALOG_CSV_SEP: '\t'

    # temp file that hold data when server is off and will be sent when on
    #
    SERVER_OUTGOING_JSON: data/outgoing.json