Page 1 of 1

dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 0:31
by megamarco83
Hi, is it possible to create a dzvent that using notification HTTP (set as telegram bot) can show the status of a light, or switch on/off a light?

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 1:45
by waaren
megamarco83 wrote: Tuesday 04 June 2019 0:31 Hi, is it possible to create a dzvent that using notification HTTP (set as telegram bot) can show the status of a light, or switch on/off a light?
To show the status of a light is no problem. But I would not know how telegram could steer a domoticz light. Maybe I don't understand ?

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 8:10
by freijn
THis one works PERFECT !!
https://github.com/squandor/dynamicTele ... 3t2C1Aex3Q

- Query all devices on their status, if you forgot the correct name you can type "light" or "living" and it will generate a list with all
devices containing that string.
- Set all devices like lights or switches.

Great alternative if you do not like to open ports to your domoticz. ( given you "trust" Telegram for the security outbound)

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 9:52
by megamarco83
waaren wrote: Tuesday 04 June 2019 1:45
megamarco83 wrote: Tuesday 04 June 2019 0:31 Hi, is it possible to create a dzvent that using notification HTTP (set as telegram bot) can show the status of a light, or switch on/off a light?
To show the status of a light is no problem. But I would not know how telegram could steer a domoticz light. Maybe I don't understand ?
hey ciao, happy to see you :-)
i hope all doing well.
mmm, my idea was that sending a command to a telegram bot, it could send to domoticz using a json, or it could send a command using dzvents.
how you can see the status of a light using telegram? in the same way we can not switch a light? or set a blind to a decided percentage?
thanks

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 10:00
by megamarco83
freijn wrote: Tuesday 04 June 2019 8:10 THis one works PERFECT !!
https://github.com/squandor/dynamicTele ... 3t2C1Aex3Q

- Query all devices on their status, if you forgot the correct name you can type "light" or "living" and it will generate a list with all
devices containing that string.
- Set all devices like lights or switches.

Great alternative if you do not like to open ports to your domoticz. ( given you "trust" Telegram for the security outbound)
interesting, thanks.
i need to understan better how to set it. i need to create a specific bot in telegram?

p.s.
i try to intsall on my RPI2 with raspian jessie, but not succeed.

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install telepot ConfigParser
reading packet....done
creating dependence
reading info...done
E: impossibile find telepot
E: Impossibile find ConfigParser

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 13:05
by freijn
https://pypi.org/project/telepot/

use : pip install telepot

just tried and it is available

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 17:06
by megamarco83

Code: Select all

pi@raspberrypi:~ $ pip install telepot
-bash: pip: command not found
pi@raspberrypi:~ $
is not working on RPI2 with raspbian stretch

Re: dzvent to dialog with telegram

Posted: Tuesday 04 June 2019 19:19
by waaren
megamarco83 wrote: Tuesday 04 June 2019 17:06

Code: Select all

pi@raspberrypi:~ $ pip install telepot
-bash: pip: command not found
pi@raspberrypi:~ $
is not working on RPI2 with raspbian stretch
apt install python3-pip
apt install python-pip