settings.yaml 2.14 KB
Newer Older
1
2
SERVER:
    # full URL that accepts POST method for sending data to the server
Nelso Jost's avatar
Nelso Jost committed
3
    # WARNING: replace the end 'BID' with a valid board ID number
4
    # 
5
    API_POST_URL: 'http://localhost:5000/api/post/rawsensordata/2'
6
7

LOGGER:
8
9
10
11
12
13
14
15
16
17
    # list of sensors to be read (ordering reflect columns of DATALOG file)
    # to ignore one, comment it out by putting # in the beginning of the line   
    #
    SENSORS:
        - RTC_DS1307
        - DHT22_TEMP
        - DHT22_AH
        - BMP085_PRESSURE
        - LDR

18
19
    # time between readings attempts (cycles of the logger execution)
    # 
20
    INTERVAL: {days: 0, hours: 0, minutes: 0, seconds: 3}
21

22
23
24
25
26
27
28
    # set false to use the system time or the RTC sensor name to use instead
    #
    USE_RTC_DATETIME: RTC_DS1307

    # expected format of the time stamp returned by the RTC reading
    #
    RTC_DATETIME_FORMAT: '%Y-%m-%d %H:%M:%S'
29
30
31
32
33


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
34
    #    
35
36
37
    SERIAL_PORT: /dev/ttyACM0, /dev/ttyACM1

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

Nelso Jost's avatar
Nelso Jost committed
42
    # time (in seconds) to wait before send a new serial read request
43
    #    
44
    RESPONSE_DELAY: 3
45

46
47
DATALOG:
    # directory to store datalog.csv data as backup
48
    #
49
    FILENAME: data/datalog.csv
50
51
52

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

56
    # format of the datetime column (see Python docs on datetime module)
57
    #
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    DATETIME_FORMAT: '%Y%m%d%H%M%S'

# ============================================================================
# list of all the sensors available for this board, and their specs
# WARNING: should be synced with the server (edit only if you know)
#
SENSORS_AVAILABLE:

    RTC_DS1307:
        data_format: datetime
    
    DHT22_TEMP:
        data_format: float

    DHT22_AH:
        data_format: float

    BMP085_PRESSURE:
        data_format: int
    
    LDR:
        data_format: float