How can I make a discord/whatsapp bot?

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

Moderator: leecollings

Post Reply
feliw124
Posts: 10
Joined: Saturday 26 February 2022 20:42
Target OS: Windows
Domoticz version:
Contact:

How can I make a discord/whatsapp bot?

Post by feliw124 »

Hello everyone, I just finished coding a notification system for some temperature sensors with dzVents. I have been using the email option, but now want to use discord or whatsapp. I looked up some tutorial and the bigger part of the tutorials are for python(which I didnt choose because you could only do very limitted thing on it. My question now is, if a can communicate a python code with my dzvents code to send notifications?
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How can I make a discord/whatsapp bot?

Post by waltervl »

If you can run a command in a terminal that does your discard/Whatsapp notification you can have dzvents run that external command with .executeShellCommand()
https://www.domoticz.com/wiki/DzVents:_ ... tion_3.1.0

Edit: Perhaps easier to use the Notification Action field as explained in next message.
Last edited by waltervl on Tuesday 01 March 2022 9:17, edited 1 time in total.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 6002
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: How can I make a discord/whatsapp bot?

Post by waltervl »

For whatsapp these instructions are on the Wiki (but from 2016 so could be outdated). https://www.domoticz.com/wiki/Unofficia ... ll_example

Scripts can now also be activated in the Notification Action field https://www.domoticz.com/wiki/Managing_ ... ifications

And if the action can be triggered through a HTTP/HTTPS URL you can add the link in Custom HTTP/Action https://www.domoticz.com/wiki/Applicati ... ifications
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest