dzvent to dialog with telegram

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
megamarco83
Posts: 109
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

dzvent to dialog with telegram

Post 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?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzvent to dialog with telegram

Post 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 ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: dzvent to dialog with telegram

Post 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)
megamarco83
Posts: 109
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzvent to dialog with telegram

Post 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
megamarco83
Posts: 109
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzvent to dialog with telegram

Post 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
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: dzvent to dialog with telegram

Post by freijn »

https://pypi.org/project/telepot/

use : pip install telepot

just tried and it is available
megamarco83
Posts: 109
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzvent to dialog with telegram

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: dzvent to dialog with telegram

Post 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
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest