telegram bot update
This commit is contained in:
parent
1dd31a32ec
commit
e9e2913346
@ -6,5 +6,6 @@ dependencies:
|
|||||||
- numpy
|
- numpy
|
||||||
- scipy
|
- scipy
|
||||||
- matplotlib
|
- matplotlib
|
||||||
|
- requests
|
||||||
- pip:
|
- pip:
|
||||||
- sounddevice
|
- sounddevice
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
## connect via SSH
|
## connect via SSH
|
||||||
|
|
||||||
|
## PythonKlingelAnlage
|
||||||
|
|
||||||
# Useful commands
|
# Useful commands
|
||||||
- see connected usb devices
|
- see connected usb devices
|
||||||
@ -31,3 +32,4 @@ pcm.mic {
|
|||||||
230000 array length
|
230000 array length
|
||||||
|
|
||||||
|
|
||||||
|
## Telegram Bot
|
||||||
|
59
requirements.txt
Normal file
59
requirements.txt
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# This file may be used to create an environment using:
|
||||||
|
# $ conda create --name <env> --file <this file>
|
||||||
|
# platform: win-64
|
||||||
|
blas=1.0=mkl
|
||||||
|
brotlipy=0.7.0=py36h2bbff1b_1003
|
||||||
|
ca-certificates=2020.12.8=haa95532_0
|
||||||
|
certifi=2020.12.5=py36haa95532_0
|
||||||
|
cffi=1.14.4=py36hcd4344a_0
|
||||||
|
chardet=3.0.4=py36haa95532_1003
|
||||||
|
cryptography=3.3.1=py36hcd4344a_0
|
||||||
|
cycler=0.10.0=py36haa95532_0
|
||||||
|
freetype=2.10.4=hd328e21_0
|
||||||
|
icc_rt=2019.0.0=h0cc432a_1
|
||||||
|
icu=58.2=ha925a31_3
|
||||||
|
idna=2.10=py_0
|
||||||
|
intel-openmp=2020.2=254
|
||||||
|
jpeg=9b=hb83a4c4_2
|
||||||
|
kiwisolver=1.3.0=py36hd77b12b_0
|
||||||
|
libpng=1.6.37=h2a8f88b_0
|
||||||
|
libtiff=4.1.0=h56a325e_1
|
||||||
|
lz4-c=1.9.2=hf4a77e7_3
|
||||||
|
matplotlib=3.3.2=0
|
||||||
|
matplotlib-base=3.3.2=py36hba9282a_0
|
||||||
|
mkl=2020.2=256
|
||||||
|
mkl-service=2.3.0=py36h196d8e1_0
|
||||||
|
mkl_fft=1.2.0=py36h45dec08_0
|
||||||
|
mkl_random=1.1.1=py36h47e9c7a_0
|
||||||
|
numpy=1.19.2=py36hadc3359_0
|
||||||
|
numpy-base=1.19.2=py36ha3acd2a_0
|
||||||
|
olefile=0.46=py36_0
|
||||||
|
openssl=1.1.1i=h2bbff1b_0
|
||||||
|
pillow=8.0.1=py36h4fa10fc_0
|
||||||
|
pip=20.3.1=py36haa95532_0
|
||||||
|
pycparser=2.20=py_2
|
||||||
|
pyopenssl=20.0.0=pyhd3eb1b0_1
|
||||||
|
pyparsing=2.4.7=py_0
|
||||||
|
pyqt=5.9.2=py36h6538335_2
|
||||||
|
pysocks=1.7.1=py36haa95532_0
|
||||||
|
python=3.6.12=h5500b2f_2
|
||||||
|
python-dateutil=2.8.1=py_0
|
||||||
|
qt=5.9.7=vc14h73c81de_0
|
||||||
|
requests=2.25.0=pyhd3eb1b0_0
|
||||||
|
scipy=1.5.2=py36h9439919_0
|
||||||
|
setuptools=51.0.0=py36haa95532_2
|
||||||
|
sip=4.19.8=py36h6538335_0
|
||||||
|
six=1.15.0=py36haa95532_0
|
||||||
|
sounddevice=0.4.1=pypi_0
|
||||||
|
sqlite=3.33.0=h2a8f88b_0
|
||||||
|
tk=8.6.10=he774522_0
|
||||||
|
tornado=6.1=py36h2bbff1b_0
|
||||||
|
urllib3=1.25.11=py_0
|
||||||
|
vc=14.2=h21ff451_1
|
||||||
|
vs2015_runtime=14.27.29016=h5e58377_2
|
||||||
|
wheel=0.36.1=pyhd3eb1b0_0
|
||||||
|
win_inet_pton=1.1.0=py36haa95532_0
|
||||||
|
wincertstore=0.2=py36h7fe50ca_0
|
||||||
|
xz=5.2.5=h62dcd97_0
|
||||||
|
zlib=1.2.11=h62dcd97_4
|
||||||
|
zstd=1.4.5=h04227a9_0
|
@ -6,13 +6,14 @@ TELEGRAM_TOKEN_ID = '1150602533:AAGSmPC0nGDYwiLQkkIlDheMzwR4TGv--sU' # token-id
|
|||||||
TELEGRAM_CHAT_ID = '291512617' # chat-id
|
TELEGRAM_CHAT_ID = '291512617' # chat-id
|
||||||
# ----------------
|
# ----------------
|
||||||
|
|
||||||
|
# using https://github.com/gvalvano/telegram-notification
|
||||||
def send_notifaction(timestamp):
|
def send_notifaction(timestamp):
|
||||||
# - - - - - - - - - -
|
# - - - - - - - - - -
|
||||||
# Telegram notification:
|
# Telegram notification:
|
||||||
msg = "Es hat geklingelt um {}".format(timestamp)
|
formatted_timestamp = timestamp.strftime("%d.%m.%Y, %H:%M:%S")
|
||||||
|
msg = "<b>Es hat geklingelt </b> \nTimestamp: {}".format(formatted_timestamp)
|
||||||
telegram_notifier.basic_notifier(logger_name='training_notifier',
|
telegram_notifier.basic_notifier(logger_name='training_notifier',
|
||||||
token_id=TELEGRAM_TOKEN_ID,
|
token_id=TELEGRAM_TOKEN_ID,
|
||||||
chat_id=TELEGRAM_CHAT_ID,
|
chat_id=TELEGRAM_CHAT_ID,
|
||||||
message=msg,
|
message=msg,
|
||||||
level=logging.INFO)
|
level=logging.INFO)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user