I have a project for my home: I would like to control my AC by voice through my Google Home.
It is my first project with Arduino, I have a bit of Arduino programming knowledge, but I don’t know at all what to start with. I have done a lot of research about how remotes and Arduino work, and I thought about the following scheme:
Google Home gets the voice command
Transfers it to IFTTT
IFTTT sends a web request (through WebHooks)
Arduino receives it
Arduino sends IR signal to AC
I don’t know how to manage steps 3 and 4… How to connect the Arduino to the Internet and set it up so that it receives Web requests?
Through my researches, I found some people used a MCU Node. Would that be better?
Also, less important but still necessary, how to know which IR pulse “language” my AC understands? and how to know what data word to send it?
Should I get an IR receiver, connect it to my computer, point my AC remote towards it and press on its buttons to see what information is sent? If yes, how?
Hi, I see this was posted a few months ago - I found it whilst searching what DIY options people have made for AC control. No obvious existing solutions that don't involve buying a product!
What you've written seems about what I'd do. There could be many ways to achieve steps 3 and 4 - Some quick Googling suggests that webhooks is the way to get custom triggers to occur. Means you need a webserver somewhere that'll answer requests - for example, the Arduino itself could answer web calls (if you've got wireless or ethernet version) and act directly (send IR signal etc).
You could use a Raspberry Pi as a web gateway (IFTTT calls webhook on a webserver running on it) that can then forward that to a locally running MQTT server - which your Arduino is connected to directly.
This could help:
Maybe a bit convoluted? MQTT is there soley as a way to instantly notify the Arduino device that a trigger has occured.
Google Home > IFTTT > Webhook on your webserver > MQTT > Arduino
As for the IR pulses - could probably research protocols used by the aircon brand you have. May involve using a library with AC codes programmed into it (if you're lucky), otherwise you may have to do physical control of an infra-red LED, which I have not done yet myself. Should be plenty of resources online for that.
I'm not exactly sure how that would work, but you can get Etherent, Wi-fi, or GSM shields, or there are versions of the Arduino with built-in networking.
5.Arduino sends IR signal to AC
If you're building everything from scratch you'd need an Arduino on both ends (transmitter & receiver).
IR isn't standard for home automation and I ALWAYS recommend that people choose one of the [u]standard home automation protocols[/u] and BUY the controlled switches/outlets, even if you want to build the master controller.
Something like [u]this dimmer switch[/u] fits into a standard wall-switch box, it doesn't require any re-wiring of the house,* it looks good, it works locally or remotely, and you couldn't build it for price of buying it.
And, you might consider a "hub" to bridge between Ethernet (or USB or other "standard" computer connection/network) and the Home Automation network. That way, you can stick with "standard computer & networking stuff" and you don't have to build the hardware or write the software for those "oddball home automation protocols". Or, there are systems that work directly on Wi-Fi but they are not very common.
...I have a combination X-10/Insteon system. I didn't build any of it myself (although I did build a couple of things that plug-into it) and I only have a master timer/controller and a few remote-controllers around the house, plus one motion detector, with no Internet or other outside control. The timer/controller connects to the computer for programming timed events, then it runs stand-alone. But, I could add Internet, Wi-Fi, or Bluetooth, etc., by buying some additional hardware. And, if I want to add a remote-controlled switch/dimmer or outlet to the system, I just have to order and install it.
Most of the switches (but not all) require both hot & neutral, and some house wiring only has (switched) hot in the switch-box.