2016-04-25 18:52:01 +00:00
|
|
|
[DoorPi]
|
|
|
|
base_path = /usr/local/etc/DoorPi
|
|
|
|
snapshot_path = /home/doorpi/records
|
|
|
|
number_of_snapshots = 10
|
|
|
|
eventlog = /home/doorpi/log/eventlog.db
|
|
|
|
is_alive_led = blinking_led
|
|
|
|
last_snapshot =
|
|
|
|
|
|
|
|
[DoorPiWeb]
|
|
|
|
indexfile = index.html
|
|
|
|
loginfile = login.html
|
|
|
|
online_fallback = http://motom001.github.io/DoorPiWeb
|
|
|
|
port = 80
|
|
|
|
public = AREA_public
|
|
|
|
www = /home/doorpi/records
|
|
|
|
|
|
|
|
[AREA_public]
|
|
|
|
.*
|
|
|
|
|
|
|
|
[AREA_config]
|
|
|
|
/control/config_value_get
|
|
|
|
/control/config_value_set
|
|
|
|
/control/config_value_delete
|
|
|
|
/control/config_save
|
|
|
|
/control/config_get_configfile
|
|
|
|
|
|
|
|
[AREA_dashboard]
|
|
|
|
/dashboard/pages/.*html
|
|
|
|
|
|
|
|
[AREA_status]
|
|
|
|
/status
|
|
|
|
/mirror
|
|
|
|
|
|
|
|
[AREA_control]
|
|
|
|
.*
|
|
|
|
|
|
|
|
[User]
|
|
|
|
admin = admin
|
|
|
|
visitor = visitor
|
|
|
|
|
|
|
|
[Group]
|
|
|
|
administrators = admin
|
|
|
|
guests = visitor
|
|
|
|
|
|
|
|
[WritePermission]
|
|
|
|
administrators = dashboard,status,config
|
|
|
|
|
|
|
|
[ReadPermission]
|
|
|
|
guests = dashboard
|
|
|
|
|
|
|
|
[AdminNumbers]
|
|
|
|
**621 = active
|
|
|
|
|
2016-05-04 18:24:12 +00:00
|
|
|
[DTMF]
|
|
|
|
"#" = out:door,1,0,3
|
|
|
|
|
|
|
|
####################### Events #######################
|
2016-04-25 18:52:01 +00:00
|
|
|
[EVENT_OnStartup]
|
|
|
|
10 = sleep:1
|
2016-05-05 17:50:33 +00:00
|
|
|
20 = url_call:http://192.168.0.90:8083/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T call startup
|
2016-04-25 18:52:01 +00:00
|
|
|
|
|
|
|
[EVENT_BeforeSipPhoneMakeCall]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = url_call:http://192.168.0.90:8083/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T call start
|
2016-04-27 19:51:55 +00:00
|
|
|
20 = take_snapshot
|
|
|
|
|
|
|
|
[EVENT_OnCallStateDisconnect]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = url_call:http://192.168.0.90:8083/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T call end
|
2016-04-27 19:51:55 +00:00
|
|
|
|
|
|
|
[EVENT_OnCallStateDismissed]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = url_call:http://192.168.0.90:8083/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T call dismissed
|
2016-04-27 19:51:55 +00:00
|
|
|
|
|
|
|
[EVENT_OnCallStateReject]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = url_call:http://192.168.0.90:8083/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T call rejected
|
|
|
|
|
|
|
|
[EVENT_OnTimeMinuteEvery5]
|
|
|
|
10=statuswatchdog:/tmp/doorpi.watchdog
|
2016-04-25 18:52:01 +00:00
|
|
|
|
2016-05-04 18:24:12 +00:00
|
|
|
####################### SIP phone #######################
|
2016-04-25 18:52:01 +00:00
|
|
|
[SIP-Phone]
|
|
|
|
identity = DoorPi
|
|
|
|
local_port = 5060
|
|
|
|
firewallpolicy = PolicyNoFirewall
|
|
|
|
#
|
|
|
|
sipphonetyp = linphone
|
2016-05-05 17:50:33 +00:00
|
|
|
sipserver_password = xxxxxxxxxxxxxxxxxxx
|
2016-04-25 18:52:01 +00:00
|
|
|
sipserver_realm = fritz.box
|
|
|
|
sipserver_server = 192.168.0.254
|
|
|
|
sipserver_username = 620
|
|
|
|
stun_server =
|
|
|
|
#
|
2016-05-04 18:24:12 +00:00
|
|
|
max_call_time = 300
|
|
|
|
call_timeout = 60
|
2016-04-25 18:52:01 +00:00
|
|
|
ua.max_calls = 2
|
|
|
|
#
|
|
|
|
capture_device = ALSA: USB PnP Sound Device
|
|
|
|
playback_device = ALSA: USB PnP Sound Device
|
|
|
|
audio_codecs = PCMA,PCMU
|
|
|
|
record_while_dialing = False
|
|
|
|
records = /home/doorpi/records/%Y-%m-%d_%H-%M-%S.wav
|
|
|
|
#
|
|
|
|
dialtone = /home/doorpi/sounds/ShortDialTone.wav
|
|
|
|
dialtone_renew_every_start = False
|
|
|
|
dialtone_volume = 35
|
|
|
|
echo_cancellation_enabled = False
|
|
|
|
#
|
|
|
|
video_codecs = VP8
|
|
|
|
video_device = StaticImage: Static picture
|
|
|
|
video_display_enabled = False
|
|
|
|
video_size = vga
|
|
|
|
|
2016-05-05 17:50:33 +00:00
|
|
|
####################### Keyboards ##############################
|
2016-04-25 18:52:01 +00:00
|
|
|
[keyboards]
|
|
|
|
onboardpins = piface
|
|
|
|
webservice = filesystem
|
|
|
|
|
2016-05-04 18:24:12 +00:00
|
|
|
####################### Virtual keyboard #######################
|
2016-04-25 18:52:01 +00:00
|
|
|
[webservice_keyboard]
|
|
|
|
base_path_input = /home/doorpi/keyboard/inputs/
|
|
|
|
base_path_output = /home/doorpi/keyboard/outputs/
|
|
|
|
|
|
|
|
[webservice_InputPins]
|
2016-04-27 19:51:55 +00:00
|
|
|
door = out:door,1,0,3
|
2016-05-05 17:50:33 +00:00
|
|
|
snapshot = sleep:0
|
|
|
|
streamon = sleep:0
|
|
|
|
streamoff = sleep:0
|
2016-04-27 19:51:55 +00:00
|
|
|
lighton = out:light,1
|
|
|
|
lightonfortimer = out:light,1,0,60
|
|
|
|
lightoff = out:light,0
|
|
|
|
dashlighton = out:dashlight,1
|
|
|
|
dashlightoff = out:dashlight,0
|
2016-05-04 18:24:12 +00:00
|
|
|
gettarget = sleep:0
|
2016-04-27 19:51:55 +00:00
|
|
|
purge = sleep:0
|
|
|
|
clear = sleep:0
|
|
|
|
button1 = sleep:0
|
|
|
|
button2 = sleep:0
|
2016-04-25 18:52:01 +00:00
|
|
|
|
2016-05-05 17:50:33 +00:00
|
|
|
#-- communicate to FHEM that a snapshot has been taken
|
|
|
|
[EVENT_OnKeyPressed_webservice.snapshot]
|
|
|
|
10 = take_snapshot
|
|
|
|
20 = url_call:http://192.168.0.90:8085/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T door snapshot
|
|
|
|
|
|
|
|
#-- start video stream
|
|
|
|
[EVENT_OnKeyPressed_webservice.streamon]
|
|
|
|
10 = os_execute:/etc/init.d/mjpg-streamer start
|
|
|
|
|
|
|
|
#-- stop video stream
|
|
|
|
[EVENT_OnKeyPressed_webservice.snapshot]
|
|
|
|
10 = os_execute:/etc/init.d/mjpg-streamer stop
|
|
|
|
|
2016-05-04 18:24:12 +00:00
|
|
|
#-- obtain the target call number from FHEM
|
|
|
|
[EVENT_OnKeyPressed_webservice.gettarget]
|
|
|
|
10 = os_execute:echo '{ReadingsVal("A.Haus.T","call_target",722622)}' | socat -t50 - TCP:192.168.0.90:7072 > /home/doorpi/calltarget
|
|
|
|
|
2016-05-03 18:56:58 +00:00
|
|
|
#-- purge all files older than current PID file
|
2016-04-25 18:52:01 +00:00
|
|
|
[EVENT_OnKeyPressed_webservice.purge]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = os_execute:find /home/doorpi/records/ -type f ! -newer var/run/doorpi.pid -delete
|
2016-04-25 18:52:01 +00:00
|
|
|
|
2016-05-03 18:56:58 +00:00
|
|
|
#-- clear all files (NOT YET OK)
|
2016-04-25 18:52:01 +00:00
|
|
|
[EVENT_OnKeyPressed_webservice.clear]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = os_execute:/home/doorpi/purge.sh clear > /home/doorpi/yyy
|
2016-04-25 18:52:01 +00:00
|
|
|
|
2016-04-27 19:51:55 +00:00
|
|
|
[EVENT_OnKeyPressed_webservice.button1]
|
2016-05-04 18:24:12 +00:00
|
|
|
10 = call:722622
|
2016-04-27 19:51:55 +00:00
|
|
|
|
2016-04-25 18:52:01 +00:00
|
|
|
[EVENT_OnKeyPressed_webservice.button2]
|
2016-05-04 18:24:12 +00:00
|
|
|
10 = file_call_value:/home/doorpi/calltarget
|
2016-04-25 18:52:01 +00:00
|
|
|
|
2016-05-04 18:24:12 +00:00
|
|
|
|
|
|
|
####################### Real keyboard #######################
|
2016-04-25 18:52:01 +00:00
|
|
|
[onboardpins_keyboard]
|
|
|
|
pull_up_down = PUD_UP
|
|
|
|
|
|
|
|
[onboardpins_OutputPins]
|
|
|
|
0 = door
|
|
|
|
1 = light
|
2016-04-27 19:51:55 +00:00
|
|
|
2 = dashlight
|
|
|
|
3 = blinking_led
|
2016-04-25 18:52:01 +00:00
|
|
|
|
|
|
|
[onboardpins_InputPins]
|
2016-05-04 18:24:12 +00:00
|
|
|
0 = call:722622
|
2016-04-25 18:52:01 +00:00
|
|
|
1 = call:**621
|
2016-05-04 18:24:12 +00:00
|
|
|
2 = file_call_value:/home/doorpi/calltarget
|
2016-04-25 18:52:01 +00:00
|
|
|
3 = take_snapshot
|
|
|
|
6 = sleep:0
|
|
|
|
7 = sleep:0
|
|
|
|
|
2016-05-03 18:56:58 +00:00
|
|
|
#-- OK pin from Arduino
|
2016-04-25 18:52:01 +00:00
|
|
|
[EVENT_OnKeyPressed_onboardpins.6]
|
2016-05-03 18:56:58 +00:00
|
|
|
10 = os_execute:aplay -D plughw:1,0 /home/doorpi/sounds/067_willkommen.wav
|
|
|
|
20 = url_call:http://192.168.0.90:8085/fhem?XHR=1&cmd.GalaxyTab=set GalaxyTab ttsSay Ein Bewohner betritt das Haus
|
|
|
|
30 = url_call:http://192.168.0.90:8085/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T door opened
|
|
|
|
40 = out:door,1,0,3
|
|
|
|
|
|
|
|
#-- NOK pin from Arduino
|
|
|
|
[EVENT_OnKeyPressed_onboardpins.7]
|
|
|
|
10 = take_snapshot
|
|
|
|
20 = url_call:http://192.168.0.90:8085/fhem?XHR=1&cmd.GalaxyTab=set GalaxyTab ttsSay Unerlaubter Zutrittsversuch
|
|
|
|
30 = url_call:http://192.168.0.90:8085/fhem?XHR=1&cmd.A.Haus.T=set A.Haus.T door wrong_id
|
2016-04-25 18:52:01 +00:00
|
|
|
|
|
|
|
|