Telegrambot shell scripts

Moderator: leecollings

Post Reply
carlostkd
Posts: 3
Joined: Sunday 06 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Telegrambot shell scripts

Post by carlostkd »

Hi to all, someone can point me how can i code a telegrambot for running shell scripts on rpi?
Tkanks in advanced
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Telegrambot shell scripts

Post by Egregius »

Are you sure you want that?
In my opinion there's no security in a bot.
A bot is excellent for notifications, not for actions.

I would consider a webpage with authentication and protection for execution of a script.
carlostkd
Posts: 3
Joined: Sunday 06 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegrambot shell scripts

Post by carlostkd »

Hi thanks for the answer, but i mean preconfigured shell scripts by myself with defined commands, and only that scripts can be runned.
Thanks
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Telegrambot shell scripts

Post by jvdz »

Egregius wrote:Are you sure you want that?
In my opinion there's no security in a bot.
A bot is excellent for notifications, not for actions.
Why do you state there is no security in DTGBOT?
It has the ability to whitelist only selected senders ID's, so should be pretty safe.

Jos
Last edited by jvdz on Sunday 06 December 2015 13:18, edited 2 times in total.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Telegrambot shell scripts

Post by jvdz »

carlostkd wrote:Hi thanks for the answer, but i mean preconfigured shell scripts by myself with defined commands, and only that scripts can be runned.
Why not simply do JSON call to operate Domoticz in a script?
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
carlostkd
Posts: 3
Joined: Sunday 06 December 2015 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegrambot shell scripts

Post by carlostkd »

jvdz wrote:
carlostkd wrote:Hi thanks for the answer, but i mean preconfigured shell scripts by myself with defined commands, and only that scripts can be runned.
Why not simply do JSON call to operate Domoticz in a script?
Jos

because my programming skills are very basic, if thou can give me the code for the execution of scripts i will be grateful.
Thanks in advanced
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Telegrambot shell scripts

Post by jvdz »

It is all explained in the JSON WiKi: https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Telegrambot shell scripts

Post by Egregius »

jvdz wrote: Why do you state there is no security in DTGBOT?
It has the ability to whitelist only selected senders ID's, so should be pretty safe.
TS mentioned telegram bot, didn't think of DTGBOT, sorry for the misunderstanding then.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest