🇧🇷 Versão em português
4Drivers

4Drivers WhatsAI

The homeowner controls the house through WhatsApp, with text or voice messages, in everyday language: "turn off the living room", "set the bedroom AC to 23 degrees", "play the jazz radio in the home theater", "turn off the pool pump in 2 hours", "is any door open?".

The examples below are in English. The agent understands Portuguese, English, Spanish and other languages.

Requirements

Setup

  1. Add the driver to the project (one per project).
  2. Paste the Token provided by 4Drivers in the Token property.
  3. Check that Connection Status shows Connected as … (the name of the house).
  4. If you have a license, fill in Driver License. Without one the driver runs for 5 days.
  5. Choose which device types the homeowner can use by WhatsApp (Devices section). For example, leave Relays disabled if gates and pumps should not be controlled by WhatsApp.
  6. Review the safety confirmations (Safety section).
  7. Send 4Drivers the phone numbers of the people allowed to use the service.
  8. Test it: send "which lights are on?" on WhatsApp.

After adding, removing or renaming devices, rooms, scenes or favorites in the project, run the action Refresh Device List. The driver also reads the project again every time the controller restarts.

What the homeowner can ask

There are no fixed phrases. The examples below show the kind of request that works. The homeowner can send a voice message instead of text, and can combine several requests in one message ("turn off the living room and close the bedroom blind").

TypeExamples
Lights"turn on the living room cove", "turn off the kitchen", "set the lamp to 30%", "turn off all the lights"
Lighting scenes"activate the dinner scene", "activate good night", "Exterior Off" (exact scene name)
Macros"run leaving home", "run the arrival macro"
Blinds and curtains"close the living room blinds", "open the suite curtain halfway"
Air conditioning"turn on the office AC at 22", "set the suite AC to cool, low fan", "turn off all the ACs"
Relays (gate, pump, irrigation)"open the gate" (asks for confirmation), "turn on the pool pump"
Music and video"play Spotify on the porch", "put the jazz radio on in the gourmet area", "turn on CNN on the living room TV", "play the Dinner playlist" (if it is a favorite)
Volume and playback"turn up the living room volume", "volume 30 in the home theater", "pause", "next song", "unmute"
Turn off a room"turn off the home theater" (media only), "turn everything off in the master bedroom" (lights, AC and media)
Current state"are the home theater lights on?", "how is the bedroom AC?", "is any door open?", "what is playing in the living room?"
For later"turn off the bedroom AC in 1 hour", "turn off the porch in 20 minutes"

Homeowner: turn off the living room and close the blind

WhatsAI: Turned off Cove, Pendant (Living Room); Closed Blind (Living Room).

Homeowner: 🎤 "set the suite AC to 23 degrees"

WhatsAI: Done, the Suite AC is on cool at 23°.

Playlists and songs inside streaming services (Deezer, Spotify, etc.) are only available by WhatsApp if the homeowner saves them as favorites in Control4. Radio stations, favorites and channels shown in the Navigator are available automatically.

Rooms and "turn everything off"

The homeowner saysWhat happens
"turn off the lights in the living room"Turns off every light in the Living Room.
"turn off the living room", "turn off the home theater"Turns off only the room media (audio/TV), as Control4 and Alexa do.
"turn everything off in the master bedroom"Turns off the lights, the AC(s) and the media of that room.
"turn off all the lights", "turn off all the lights in the house"Runs the scene set in All Lights Off Scene; if it is blank, turns off every light in the house.
"turn off the whole house", "turn everything off in my house"Turns off the whole house. This only happens when the homeowner clearly says it is the whole house.
"turn everything off" (no room)The agent asks whether it is a room or the whole house.

Words in a room name can come in a different order ("bedroom master" = Master Bedroom), and common Portuguese abbreviations are understood ("qt casal" = Quarto Casal).

When the requested name is exactly the name of a scene, macro or room (for example the scene "Exterior Off"), the agent uses that item without trying to interpret the sentence.

Questions about current state

The agent asks the controller at the moment of the question and answers with what Control4 reports: light on and level, AC on/mode/temperature, blind open or closed, what is playing and the volume, and sensors.

Homeowner: how are the sensors?

WhatsAI: The Kitchen Door is closed, there is no motion on the sensors, and the Bedroom reads 20.6° with 66% humidity.

Commands for later

"Turn off the bedroom AC in 2 hours" is stored in the controller and runs even if the homeowner is no longer chatting. When it runs, the homeowner gets a notice. Pending commands appear in the Pending Timers property and can be cancelled with the Cancel Pending Timers action.

For safety, a scheduled command that comes due while the controller is off is not executed when it comes back.

Confirmations and safety

For sensitive devices the agent asks for confirmation before acting:

Homeowner: open the gate

WhatsAI: Confirm? Open Front Gate — reply YES.

Homeowner: yes

WhatsAI: Done, I triggered the Front Gate.

Language

With Response Language = Auto, the agent answers in the language the homeowner wrote in (Portuguese, English, Spanish…). Choose a language to always answer in it, even if the homeowner writes in another one.

Guest: apaga a sala

WhatsAI: Apaguei Sanca, Pendente (Sala).

Usage limits

4Drivers can set a limit of requests per day, week or month for the house or for the account, and a daily limit per phone. The homeowner gets a WhatsApp notice when usage reaches 80%, 90% and 95% of the limit. When the limit is reached, they get a message saying when it resets, and further requests are ignored until then.

Naming best practices

The agent understands the project through the names in Control4. Clear names make answers more accurate:

Properties

PropertyDescription
Driver License4Drivers license key for this project. Without a key the driver runs in trial mode for 5 days.
License StatusTrial Mode (with the remaining time), Licensed, Trial Expired, Blocked or License running in another project. Without a valid license, commands and questions are refused and the homeowner is told to contact the installer.
TokenProject key provided by 4Drivers.
Connection StatusConnection state with the server.
Agent EnabledNo temporarily blocks every WhatsApp command for this project.
Response LanguageLanguage of the replies. Auto answers in the homeowner's language.
All Lights Off SceneName of the lighting scene or macro used when the homeowner asks to turn off all the lights of the house (e.g. All Off). Blank: the agent turns off each light.
Devices FoundHow many devices of each type were found in the project.
Lights, Lighting Scenes, Macros, Blinds, Thermostats, Relays, Room Media, Room ControlEnabled: the homeowner can control this type and ask about its state. Disabled: the type is not offered and requests about it are refused. Room Media = choosing sources, radios, favorites and channels; Room Control = volume, mute, pause/next and turning off the room media.
SensorsDoor, window, garage, motion, leak and temperature sensors, including alarm zones and sensors from other manufacturers. Query only. When the sensor is generic, its type comes from its name in the project. Disabled hides sensors from the agent.
Hidden SourcesAudio/video sources that must not be offered, separated by commas (names or IDs).
Confirm RelaysYes (recommended): relays only operate after the homeowner answers YES.
Confirm MacrosSame confirmation for macros.
Always Confirm (names)Device names that always require confirmation, separated by commas.
Delay Between Actions (ms)Interval between commands when one message controls several devices.
Temperature ScaleScale used for AC setpoints (Celsius or Fahrenheit).
Pending TimersCommands scheduled for later.
Driver VersionInstalled driver version.
MessageLast command executed and other notices.
Debug ModePrint shows details in the Lua output window, for support.

Actions

ActionDescription
Refresh Device ListReads the project again and updates the list offered to the agent.
ReconnectCloses and reopens the connection to the server.
Cancel Pending TimersCancels every command scheduled for later.

Programming

Examples:

Troubleshooting

SituationWhat to do
Connection Status: Waiting for tokenFill in the Token property.
Invalid token - check the Token propertyCopy the Token again exactly as provided. The driver retries every 2 minutes; use Reconnect to retry now.
Blocked by the serverContact 4Drivers. Once the service is re-enabled, the driver reconnects by itself within 1 minute, or immediately with Reconnect.
Could not connect / No answer from serverCheck the controller's internet access and DNS. The driver keeps retrying automatically.
Replaced by another connectionThe same Token is in use in another project. Each project needs its own Token.
The homeowner receives "this number is not authorized"Ask 4Drivers to register the number.
The homeowner receives "the system license for this house is not active"Check License Status and the key in Driver License.
The agent says a device does not existRun Refresh Device List, check that the type is Enabled and that the room is not hidden.
A sensor is missing or shows the wrong typeCheck Sensors = Enabled and put the type in the sensor name (e.g. Service Door, Motion Hall). Then run Refresh Device List.
A playlist or song is not foundSave the playlist as a favorite in Control4 and run Refresh Device List.
"Turn off all the lights" does not use the right sceneType the exact scene or macro name in All Lights Off Scene.

Version history

VersionChanges
1050Initial release.