P
P
Peter Krupnev2019-06-11 21:22:06
linux
Peter Krupnev, 2019-06-11 21:22:06

How to control Raspberry via Telegram?

There is Raspberry with Raspbian Stretch. I would like to set up simple control via Telegram:
watch uptime, statistics, execute shell commands.
I looked at Github and just on Google, there are scripts (Python, Go), but not very convenient, everything will have to be rewritten for yourself.
Maybe someone has already done something similar? It would be interesting to try.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Toxic-cloud, 2019-06-11
@Toxic-cloud

I have no idea how to do it, but if you know the cart api, then do this:

import os
if message == "home": #вместо мессдж сообщение из телеги
    os.system("cd $HOME")#команда для терминала
else: #стандарт
    telegram.send("HeBepHo")

Well, in short,
os.system("terminal command")
I can't help anymore

R
Redgar, 2019-08-29
@Redgar

Try to create a bot and give the necessary information from the RPi on commands. There will also be validation of commands.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question