I have a stove which is controlled by an app. I can turn on and off using the app. How to integrate Alexa on the app so that I can control the stove with Alexa?
If you just want to buy it for direct use case and not build yourself you can found nice smart plug that connect to your stove. Your stove is always on but the plug will switch off or on via Alexa.
Here is one ready to use smart plug : https://www.amazon.com/gp/help/customer/display.html?nodeId=GJL9P9S22S2HBUDF
If you want to build it yourself (more fun), you can buy some smart plug controlled by RF 433MHZ or Bluetooth, etc.
Then you connect an arduino and the smart plug with a small transmitter.
Last step is too connect the arduino over internet (MQTT broker for example) and you pass data (on/off) from Alexa -> Broker -> Arduino -> SmartPlug / Stove
I did the same for a ordinary lamp : https://medium.com/#arradimohamed/voice-controlled-smart-home-with-amazon-alexa-skill-and-ios-app-3a8622bf2b55
Related
I try to build my custom IoT device that will be controlled via Google Home device, and serve people with disabilities.
The device itself is Tiva C Launchpad, that I program from scratch, meaning I will have a full control on it.
In my vision, the user wil say something like: "Ok Google, press play button", and as a result, the Google Home device will send a direct command of press_play_button to the IoT device, preferably via the local network.
I found the Google Action SDK, alongside with the Local SDK extention, but if I understood correctly, I have to be in the app mode first ("OK Google, play {app_name}") before pronouncing the action I want, which is inconvenient.
Is there any way to achieve my requirement?
If not, I may give up on the local network control, and use sort of a webhook to send HTTP request to my smart device, and in that case I wonder if MQTT will be more suitable.
Thanks.
The Local SDK is an extension to the Smart Home API. If your device matches up with the device types and traits that the Smart Home API supports then you can use that to control your device.
It has support for media players so things like play/stop should be possible.
I have build generic Smart Home control using MQTT to reach the device, but you have to provide a HTTP endpoint for the Google System to interface with. This take a little thought as you have to map MQTT asynchronous approach to HTTP's synchronous nature.
I've searched google and only found the MultipeerConnectivity framework in iOS but I don't know how I could make it work for my specific case.
The flow of what I want to do is like this:
Enable personal hotspot in iOS
Connect to hotspot from a raspberry pie
Once client is connected, send a message string from the iOS app.
Assuming that the raspberry pie connection is already sorted out (We're using a static SSID and Password for the hotspot)
The questions that come up are:
Which framework should I use (assuming there is one already)?
do I need to explicitly advertise the iOS device from the app?
How do I get notified when the raspberry connects to the phone?
How do I send a message to the connected client?
Although I never developed anything for Pi, I developed net service browsing for iOS devices, so can give an answer.
When you connect to iPhone hotspot, it's a usual WiFi connection, so here you can use Bonjour protocol (mDNS) to discover devices one another.
Run Avahi mDNS service on Pi, and discover it on iPhone.
Here is how to run Avahi on Pi.
Here is how to discover mDNS net service on iPhone.
After net service is discovered with NSNetServiceBrowser, you'll have IP address and port of your Pi available on your iPhone, so you can connect to it.
If you are trying to setup a IoT system, it may be useful to look into various cloud offerings to facilitate messaging between devices. Personally I have used AWS IoT core services in the past, and it is relatively easy to setup messaging between devices.
I am not sure what your exact use case is for this setup, but using a cloud based service to setup messaging between devices will remove the requirement to connect directly between devices via hotspot (the pi still needs some internet connection), and could make it easier to enable multiple devices and app clients in the system.
After reading Alexa Skills Kit docs, i have some doubts. What is meant by Alexa-enabled device here?(My custom home automation device support Alexa api or how to change my hardware to support Alexa api?).
This Alexa-enabled device will communicate with Smart Home Skill API and then AWS Lambda Skill adapter communicate with real device.
I am able to create Alexa skills (may be custom skills or Smart Home Skill). How to communicate with this skills from my ios app?
Any device with a microphone, a speaker and a network connection can interact with Alexa.
The developer portal is https://developer.amazon.com/alexa-voice-service
A good code base to start with a raspberry pi is https://github.com/alexa/alexa-avs-sample-app
Alexa Voice Service is currently only available in US. We are working hard at making it available for our customers in UK and DE.
I believe it's any device with Alexa Voice Services, which right now would mainly be the Echo and Echo Dot: https://developer.amazon.com/alexa-voice-service/what-is-avs
But in the US you can theoretically Alexa-enable any capable device with a microphone and speaker. It's launching later in the UK and Germany.
There are several Amazon products that qualify as Alexa-enabled. Some of them are the Echo, the Echo Dot, the Fire Tablet, in its latest versions at least, but might be available in older versions through software update, not sure. The Fire TV and the Amazon Tap are also Alexa-enabled.
To your point, only Amazon products are Alexa-enabled. I must say that there is a way to run some sort of SDK, perhaps with Alexa Voice service, and enable a Raspberry Pi or any other capable hardware to act as an Alexa-enabled device.
Of course, that doesn't include the iPhone. To interact with Alexa from your phone, you'd have to create an intermediary backend, be that in a Lambda function or in your own server.
Can a website help a user communicate with nearby devices via bluetooth/WLAN without downloading software?
User requests that something be done on their device (which could be, for example a wirelessly connected printer or a bluetooth keyboard).
The site, which contains a repository of relevant actions, sends specific instructions for that device to the user's own machine.
Those instructions are then relayed to the correct device (with the user's permission) via the user's device's WLAN or existing bluetooth connection.
Part 3 is what I'm not sure of - is there a mechanism by which a website can contribute to a wireless/bluetooth connection held locally?
It is not possible. User browser can't interact with hardware for wireless networking.
You should force user to install some custom software to do this.
You would have to submit the "commands" first, then have the device make requests to the website server, i.e., check for any pending "commands" for the device, and then process them locally. A website is not "thing" that can directly interface with a hardware device.
For iOS application, IOT(Internet of thing) is a new things.and we can connect our device with other hardwares.
My question is , is there any way by which i can connect our existing devices like (Air Conditioner,Other ele. component) IOT only?
Here is one of the best example for connecting and controlling such devices like A.C., TV, etc with your iOS device.
It's Open Source so you can explore more.
IRKit:
http://getirkit.com/en/
(opensource infrared remote controller).
IRKit is a WiFi enabled Open Source Infrared Remote Controller device.
Home electronics with an infrared remote, like air conditioners, TVs, lights can be controlled using iPhone and iPad via IRKit.
IRKit works with IRKit's official app and you can easily create iOS apps to send IR signals to control home electronics using IRKit iOS-SDK .
You can create apps for example that does:
Use location, turns on air conditioner when you arrive near your home.
Press one button to turn off all your home electronics when you leave home.
Connect with Facebook, and automatically change your TV's channel to which your friend is watching.
Hope It will help.
If your component have any types of connectivity which is suitable for iOS devices the you can do this, like:
If your Air Conditioner has bluetooth connectivity and it can handle command like turn on/off or controlling temperature, then you can do it with any kind of device that can communicate with the electrical components.
I used to turn off my computer via internet. There was a process running in my computer that hits an URL, receive JSON data and if it gets shutdown flag yes, it turn itself off. I can set that flag from my mobile. The lacking was I could not turn on.
Edit:
Yes you can, but you have to do a lot of hardware related work. like: Bluetooth Relay Controller. Here is a video.