pi@WeilersbachPi:~ $ cat /etc/sakis3g.conf
SIM_PIN="5474"
APN="internet.t-d1.de"
pi@WeilersbachPi:~ $ sudo lsusb
Bus 001 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@WeilersbachPi:~ $ sudo ./sakis3g connect
E1750 connected to Telekom.de (26201).
Install Telegram
https://maker.pro/raspberry-pi/tutorial/how-to-use-telegram-instant-messaging-on-raspberry-pi
Also need:
sudo apt-get install libjansson-dev
sudo apt-get install libevent-dev
sudo apt-get install libssl1.0-dev
Für die Installation aber besser so:
sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
cd ~/services/
git clone --recursive https://github.com/vysheng/tg.git && cd tg
cd tgl
git remote set-url origin https://github.com/a-x-/tgl.git
git fetch && git checkout patch-1
cd ..
./configure && make
ln -s ~/services/tg/bin/telegram-cli ~/bin
sudo mkdir -p /etc/telegram-cli
sudo cp tg-server.pub /etc/telegram-cli/server.pub
telegram-cli -W
Result:
pi@WeilersbachPi:~/tg/bin $ ./telegram-cli -W
Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
Telegram-cli uses libtgl version 2.1.0
Telegram-cli includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
I: config dir=[/home/pi/.telegram-cli]
phone number: 00491717481240
code ('CALL' for phone code): 19515
User starauschek updated flags
User starauschek online (was online [2019/05/05 13:50:47])
User starauschek updated flags
>
Script to take images regularly and send to Telegram Account
pi@WeilersbachPi:~ $ cat takePhoto.bash
#!/bin/bash
DATE=$(date +%Y-%m-%d_%H%M)
IPADDR=$(echo `ifconfig wlan0 2>/dev/null|awk '/inet / {print $2}'`)
FOTO="/home/pi/fotos/foto.jpg"
#raspistill -vf -hf -q 25 -o /home/pi/photos/$DATE.jpg
raspistill -vf -hf -q 25 -o /home/pi/fotos/foto.jpg
~/tg/bin/telegram-cli -W -e "msg starauschek $DATE $IPADDR"
~/tg/bin/telegram-cli -W -e "send_photo starauschek $FOTO"
Kommentare
Kommentar veröffentlichen