Whatsapp messaging through Teach mode

Hi all,

Happy to share my setup sending my R1 WhatsApp messages.

Prerequisites:

  • R1 with access to Tech mode (obviously)
  • Formcrafts account (free*)
  • Backend service, Local or cloud. For Cloud based I’d recommend Make.com

Let’s break it in to different sections to keep it organized.

UI / Fronded

Go to Formcrafts and create an account. Their free plan has a maximum of 100 responses per month. I don’t see me using more than that for now, but time will tell.

The advantage of using Formcrafts as a UI is that you do not have to setup complex logins. Also, as the UI is fairly simple, Teach mode will have less trouble understanding.

Create a simple form here. I’ve created two capture fields. One dropdown and one text field.

The dropdown field is populated with a couple of my most used contacts.

  • The Label field contains the name of the contact, Teach mode will use this part to find the contact I am referring to.

  • The Value field contains the number, make sure you include the country code.

When happy, click on the Workflows tab and configure a webhook. Here you will paste the webhook URL from your backend server.

Backend

  1. Local.

I’ve setup the whole backend on my Homey Pro. But as I imagen that this will not be applicable for the majority I will share a cloud option as well

IF there are Homey users, let me know and I will update this section.

  1. Cloud
    Create a Make.com account. Their free plan lets you have 2 active scenarios and 1000 monthly operations, plenty for this build.

Your trigger module will be a webhook, this module will give you the URL you need in Formcrafts.
The second module will be a service that connects to your WhatsApp account. There are plenty, some free some paid. Use one you’re comfortable with.


Configuring the WhatsApp module could look something like this:

Make sure you run a couple of tests from Formcrafts to Make. See how the data is entering and behaving.

Teach mode [R1 side]

Start a new lesson with your Formcrafts URL.

Here I’ve got the following:

Name: Send WhatsApp message
Description: Send a WhatsApp message to [Contact Name] saying [Message Content]

In the log, I added that all messages must be in Dutch.

Thats it! Let me know it you have any questions!

5 Likes

I tried teaching the lesson and using web.whatsapp, but for some reason it won’t stay logged in. The replay tests worked, but when I tried to trigger it from the r1, it failed because of the login. (@simon)

Did you have the same problem while trying to send a whatsapp message? or what made you think of this method/workaround? @Siriap

1 Like

Yes exactly that!

Login works fine at first glance, and I was able to let teach mode send a message.

But as many with me, it does not save the QR the login properly and keeps on prompting the login page.

Therefore the workaround with Formcrafts :slight_smile:

2 Likes

Today was the first day with R1’s newly thought lesson out and about.

And I encountered something strange.

The lesson works flawless when connected to WiFi but on Cellular it gives me an error.

Other functions are working fine over LTE.

@simon is this a known thing?

----- Update 27th Nov.------
I had one succesful execution of the lesson today on LTE.

Will do some more tests tomorrow.

1 Like