Hallo, erstmal vielen Dank für die super Seite und das Forum.
Ich möchte gerne bei einem Keydown (Klingeltaster an Pin 40) eine URL aufrufen.
Die URL sendet eine Nachicht "dingdong" an meinen Telegram Bot...
Die URL (Id geändert) funktioniert wenn ich diese über den Browser aufrufe. Nun möchte ich dies wie gesagt bei einem Keydown aufrufen.
hier die Config:
Code
[AREA_installer]
.* =
[DTMF]
"#" = out:Tueroffner,1,0,3
[DoorPi]
base_path = /usr/local/etc/DoorPi
eventlog = !BASEPATH!/conf/eventlog.db
is_alive_led =
last_snapshot =
number_of_snapshots = 50
snapshot_path = /home/pi/camera
snapshot_size = 1920x1944
[DoorPiWeb]
indexfile = index.html
ip =
loginfile = login.html
online_fallback = http://motom001.github.io/DoorPiWeb
port = 80
public = AREA_public
www = !BASEPATH!/../DoorPiWeb
[EVENT_OnStartup]
10 = sleep:1
20 = mailto:000000@00000de,DoorPi gestartet,DoorPi ist da!,true
[Group]
administrator = door
[SIP-Phone]
firewallpolicy = PolicyNoFirewall
audio_codecs = PCMA,PCMU
call_timeout = 15
capture_device = ALSA: default device
dialtone = !BASEPATH!/media/ShortDialTone.wav
dialtone_renew_every_start = False
dialtone_volume = 35
echo_cancellation_enabled = False
identity = Door1
local_port = 5060
max_call_time = 120
playback_device = ALSA: default device
record_while_dialing = False
records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav
sipphonetyp = linphone
sipserver_password = 0000
sipserver_realm =
sipserver_server = fritz.box
sipserver_username = 627
stun_server =
ua.max_calls = 2
video_codecs = H264,VP8
video_device = StaticImage: Static picture
video_display_enabled = False
video_size = 1080p
[SMTP]
from = 000000@000000.de
need_login = true
password = 00000
port = 587
server = mail.gmx.net
signature = test
use_ssl = false
use_tls = true
username = 0000000@000000.de
[User]
door = pi
[WritePermission]
administrator = installer
[keyboards]
onboardpins = gpio
[onboardpins_InputPins]
40 = 40
[EVENT_OnKeyPressed_onboardpins.40]
10 = url_call:https://api.telegram.org/bot0000000000:000000000000/sendMessage?chat_id=0000000000$
20 = mailto:0000000@000000000.de,DoorPI,DingDong,true
[onboardpins_OutputPins]
38 = Tueroffner
[onboardpins_keyboard]
bouncetime = 2000
mode = BOARD
polarity = 0
pressed_on_keydown = True
pull_up_down = PUD_OFF
Alles anzeigen
hier der Log-Auszug:
Code
"event_name": [
"OnKeyPressed_onboardpins.40"
],
"event_source": [
"doorpi.keyboard.from_gpio"
]
}
2016-10-31 22:37:57,788 [DEBUG] [doorpi.action.handler] [JWS86V] fire for event OnKeyPressed_onboardpins.40 this actions [<doorpi.action.SingleActions.url_call.UrlCallAction instance at 0x7498c800>, <doorpi.action.SingleActions.mailto.MailtoAction instance at 0x7498c670>]
2016-10-31 22:37:57,790 [TRACE] [doorpi.action.handler] [JWS86V] try to fire action UrlCallAction with args () and kwargs {'url': 'https://api.telegram.org/bot00000000000:0000000000000000000/sendMessage?chat_id=0000000000&text=DingDong'}
2016-10-31 22:37:57,793 [TRACE] [doorpi.action.base] run UrlCallAction with args () and kwargs {'url': 'https://api.telegram.org/bot00000000:00000000000000/sendMessage?chat_id=000000000&text=DingDong'}
2016-10-31 22:37:57,795 [TRACE] [doorpi.action.handler] [JWS86V] try to fire action MailtoAction with args () and kwargs {'smtp_text': 'DingDong', 'smtp_subject': 'DoorPI', 'smtp_snapshot': 'true', 'smtp_to': 'deutsch.martin@gmx.de'}
2016-10-31 22:37:57,797 [TRACE] [doorpi.action.base] run MailtoAction with args () and kwargs {'smtp_text': 'DingDong', 'smtp_subject': 'DoorPI', 'smtp_snapshot': 'true', 'smtp_to': '000000000@0000000.de'}
2016-10-31 22:37:57,799 [TRACE] [doorpi.conf.config_object] get_string for key server in section SMTP (default: smtp.gmail.com) returns mail.gmx.net
2016-10-31 22:37:57,801 [TRACE] [doorpi.conf.config_object] get_integer for key port in section SMTP (default: 465) returns 587
2016-10-31 22:37:57,803 [TRACE] [doorpi.conf.config_object] get_string for key username in section SMTP (default: ) returns 0000@000000.de
2016-10-31 22:37:57,805 [TRACE] [doorpi.conf.config_object] get_string for key password in section SMTP (default: ) returns *******
2016-10-31 22:37:57,807 [TRACE] [doorpi.conf.config_object] get_string for key from in section SMTP (default: ) returns 00000@0000000.de
2016-10-31 22:37:57,809 [TRACE] [doorpi.conf.config_object] get_boolean for key use_tls in section SMTP (default: False) returns True
2016-10-31 22:37:57,811 [TRACE] [doorpi.conf.config_object] get_boolean for key use_ssl in section SMTP (default: True) returns False
2016-10-31 22:37:57,813 [TRACE] [doorpi.conf.config_object] get_boolean for key need_login in section SMTP (default: True) returns True
2016-10-31 22:37:57,814 [TRACE] [doorpi.conf.config_object] get_string for key signature in section SMTP (default: !EPILOG!) returns test
2016-10-31 22:37:57,819 [DEBUG] [doorpi.conf.config_object] parse string "test" to "test"
2016-10-31 22:37:58,254 [TRACE] [doorpi.conf.config_object] get_string for key snapshot_path in section DoorPi (default: /tmp) returns /home/pi/camera
2016-10-31 22:37:58,257 [DEBUG] [doorpi.conf.config_object] parse string "/home/pi/camera" to "/home/pi/camera"
2016-10-31 22:38:03,261 [TRACE] [doorpi.action.handler] [JWS86V] finished fire_event for event_name OnKeyPressed_onboardpins.40
2016-10-31 22:38:03,264 [DEBUG] [doorpi.status.webserver_lib.request_handler_static_functions] [188.104.217.34] ('GET /control/trigger_event?event_name=OnKeyPressed_onboardpins.40&event_source=doorpi.keyboard.from_gpio HTTP/1.1', '200', '-')
Alles anzeigen
was mache ich falsch?
Email wird korrekt gesendet ... nur die Url nicht aufgerufen.
Ich wäre sehr dankbar wenn mir jemand helfen könnte.
Gruß