For an index to all my stories click this text
It is unfortunately for us mere mortals not possible to send messages direct for our ESP8266, ESP32 or other microcontrollers to Whatsapp. You need a Whatsapp business account for that.
Unfortunately it is also not possible to send messages from your home automation system to Whatsapp. Domoticz (my home automation system) can activate notifications for a lot of services, but not for Whatsapp.
Fortunately there is a workaround.
Whatabot.
Whatabot is an intermediate service between microcontrollers and Whatsapp.
It works like this: You send a message to Whatabot and Whatabot sends the message to Whatsapp.
So obviously the whatabot developer has a Whatsapp Business account.
I had an email exchange with the developer and het stated that you can send 200 to 300 messages for free. After that you need to buy additional messages. The fees are (in my view) very reasonable.
You can find the Whatabot website here: https://whatabot.net/
Setting up Whatabot.
I described this already in my last weeks story about sending messages from your microcontroller to Whatsapp. You can re-read that story here:
https://lucstechblog.blogspot.com/2026/09/send-messages-to-whatsapp-with-pico-w.html
If you are only interested in sending messages from Domoticz read on.
This first part about setting up Whatabot is a copy from my story on sending messages from your microcontroller to Whatsapp. So skip this section if you already have a Whatabot account.
First thing you need to do is to add Whatabot to your contacts in your phone. So make a new contact, name it Whatabot and add the phone number:
+54 9 1123998026
Nex step is to open Whatsapp and search for Whatabot in the contacts list. Then send a message to the Whatabot saying: I allow whatabot to send me messages.
To make life a bit easier I did this on the web version of Whatsapp that can run on your PC. You can find Whatsapp web here:
https://web.whatsapp.com/
Immediately you will get an answer that shows that the Whatabot API is activated for your mobile number and an example that shows how to use the API.
Test if this API works.
Just copy the example and paste it into your browsers address bar. That's where the red arrow points in the picture below. This is easy to do if you use the Whatsapp web version instead of working on your tiny phone screen.
Almost immediately you will get a message back with the information shown above.
This tells you that the message will be send shortly to your Whatsapp account
And indeed a few seconds later the message "Hello from Whatabot" appears as a notification on the main screen of my phone.

And there it is in Whatsapp.
Now we know for sure that Whatabot is connected to our phone and the API works. On to the next step.
From Domoticz to Whatsapp
I have a lot of switches which I can control in my Domoticz system. Switches build with ESP8266, ClickOn-Clickoff switches and Philips Hue lamps.
For this example I will use the lamp from my mancave to send a message to Whatsapp. The operation is for most switches the same so you should have no problem adapting it to your own setup.
As my system is in Dutch I will translate the buttons at the bottom for you.
Log - shows the log of the use of the switch
Aanpassen - this is for adapting the settings for this switch
Timers - Automate switching ON and OFF
Notifications - Sending notifications to Telegram etc.
What we need is the second button called "Aanpassen". So click that button.

The above screen will open and you can alter the settings for this particular button.
We need to change the settings for the fields where the red arrow points to.
These fields are blank now and we need to fill them in.
The top field is "Aan actie" and here we can fill in the action that needs to be taken when the lamp is set ON. The second field is the "Uit actie" and there we need to fill in what must happen when the lamp is set off.
We only need to fill in the apprpriate HTTP code.
And that is the HTTPS code you received as the API call from Whatabot.
So let's see how the Whatsapp API call in general is:
https://api.whatabot.net/whatsapp/sendMessage?apikey=YOUR-API-KEY&text=Hello%20from%20Whatabot&phone=YOUR-PHONE-NUMBER"
We have to modify this API call for our own needs. Best way to do this is by copying this line into a text editor like notepad.
Replace YOUR-API-KEY with the API key you got from Whatabot and replace Your_Phone-Number with your mobile number.
Last step is to alter the text.
When using this API call with a microcontroller, the microcontroller can not send spaces over the web. Therefore in the sample text the spaces are replaced by %20.
In Domotics that is not necesarry. You can just put spaces in the text.
We need to compose two API calls. One which is send when the lamp is set ON and the other which will be send when the led is set OFF. Like this:
https://api.whatabot.net/whatsapp/sendMessage?apikey=YOUR-API-KEY&text=The mancave lamp goes ON&phone=YOUR-PHONE-NUMBER"
https://api.whatabot.net/whatsapp/sendMessage?apikey=YOUR-API-KEY&text=The mancave lamp goes OFF&phone=YOUR-PHONE-NUMBER"
Really dull texts but I am sure you can come up with something more sparkling.
And (again) of course do not forget to fill in your api-key and phone number in both lines.
Copy the lines and paste them in the empty fields in Domoticz.

That is all !!!!
Do not forget to save the settings (Opslaan) !!
The result:
Press the lamp on and then press it off.
This resulted in my phone waking up and showing these notifications.
And this is how the messages look in Whatsapp.
Concluding.
When you got hold of the API key sending messages with Domoticz to Whatsapp is really easy.
You can adapt this to all your Domoticz switches and sensors.
In a previous story I used an ESP to Ping my and my girlfriends phone. Using the Ping switch in Domoticz you can check if someone of your family enters or leaves your home (beware of privacy issues).
If you have a PIR setup in Domoticz you can get notifications in Whatsapp when someone enters a room in your house.
There are a million possibilities with this and I am sure you can come up with some pretty neat ideas.
Till next time
have fun
Luc Volders















