summaryrefslogtreecommitdiffstats
path: root/python/config
diff options
context:
space:
mode:
Diffstat (limited to 'python/config')
-rw-r--r--python/config136
1 files changed, 136 insertions, 0 deletions
diff --git a/python/config b/python/config
new file mode 100644
index 0000000..77b99ec
--- /dev/null
+++ b/python/config
@@ -0,0 +1,136 @@
1[GPIO]
2# Initialize following GPIOs with given function and optional value
3# This is used during WebIOPi start process
4#21 = IN
5#23 = OUT 0
6#24 = OUT 0
7#25 = OUT 1
8
9#------------------------------------------------------------------------#
10
11[~GPIO]
12# Reset following GPIOs with given function and optional value
13# This is used at the end of WebIOPi stop process
14#21 = IN
15#23 = IN
16#24 = IN
17#25 = OUT 0
18
19#------------------------------------------------------------------------#
20
21[SCRIPTS]
22# Load custom scripts syntax :
23# name = sourcefile
24# each sourcefile may have setup, loop and destroy functions and macros
25#myscript = /home/pi/webiopi/examples/scripts/macros/script.py
26
27#------------------------------------------------------------------------#
28
29[HTTP]
30# HTTP Server configuration
31enabled = true
32port = 8000
33
34# File containing sha256(base64("user:password"))
35# Use webiopi-passwd command to generate it
36passwd-file = /etc/webiopi/passwd
37
38# Use doc-root to change default HTML and resource files location
39#doc-root = /home/pi/webiopi/examples/scripts/macros
40
41# Use welcome-file to change the default "Welcome" file
42#welcome-file = index.html
43
44#------------------------------------------------------------------------#
45
46[COAP]
47# CoAP Server configuration
48enabled = true
49port = 5683
50# Enable CoAP multicast
51multicast = true
52
53#------------------------------------------------------------------------#
54
55[DEVICES]
56# Device configuration syntax:
57# name = device [args...]
58# name : used in the URL mapping
59# device : device name
60# args : (optional) see device driver doc
61# If enabled, devices configured here are mapped on REST API /device/name
62# Devices are also accessible in custom scripts using deviceInstance(name)
63# See device driver doc for methods and URI scheme available
64
65# Raspberry native UART on GPIO, uncomment to enable
66# Don't forget to remove console on ttyAMA0 in /boot/cmdline.txt
67# And also disable getty on ttyAMA0 in /etc/inittab
68#serial0 = Serial device:ttyAMA0 baudrate:9600
69
70# USB serial adapters
71#usb0 = Serial device:ttyUSB0 baudrate:9600
72#usb1 = Serial device:ttyACM0 baudrate:9600
73
74#temp0 = TMP102
75#temp1 = TMP102 slave:0x49
76#temp2 = DS18B20
77#temp3 = DS18B20 slave:28-0000049bc218
78
79#bmp = BMP085
80
81#gpio0 = PCF8574
82#gpio1 = PCF8574 slave:0x21
83
84#light0 = TSL2561T
85#light1 = TSL2561T slave:0b0101001
86
87#gpio0 = MCP23017
88#gpio1 = MCP23017 slave:0x21
89#gpio2 = MCP23017 slave:0x22
90
91#pwm0 = PCA9685
92#pwm1 = PCA9685 slave:0x41
93
94#adc = MCP3008
95#dac = MCP4922 chip:1
96
97#------------------------------------------------------------------------#
98
99[REST]
100# By default, REST API allows to GET/POST on all GPIOs
101# Use gpio-export to limit GPIO available through REST API
102#gpio-export = 21, 23, 24, 25
103
104# Uncomment to forbid changing GPIO values
105#gpio-post-value = false
106
107# Uncomment to forbid changing GPIO functions
108#gpio-post-function = false
109
110# Uncomment to disable automatic device mapping
111#device-mapping = false
112
113#------------------------------------------------------------------------#
114
115[ROUTES]
116# Custom REST API route syntax :
117# source = destination
118# source : URL to route
119# destination : Resulting URL
120# Adding routes allows to simplify access with Human comprehensive URLs
121
122# In the next example with have the bedroom light connected to GPIO 25
123# and a temperature sensor named temp2, defined in [DEVICES] section
124# - GET /bedroom/light => GET /GPIO/25/value, returns the light state
125# - POST /bedroom/light/0 => POST /GPIO/25/value/0, turn off the light
126# - POST /bedroom/light/1 => POST /GPIO/25/value/1, turn on the light
127# - GET /bedroom/temperature => GET /devices/temp2/temperature/c, returns the temperature in celsius
128#/bedroom/light = /GPIO/25/value
129#/bedroom/temperature = /devices/temp2/temperature/c
130
131#/livingroom/light = /devices/expander0/0
132#/livingroom/brightness = /devices/adc/0/float
133#/livingroom/temperature = /devices/temp0/temperature/c
134
135#/weather/temperature = /devices/bmp/temperature/c
136#/weather/pressure = /devices/bmp/pressure/hpa