Voice controlled home automation system, with easy to use examples and libraries. All just using any android device and a Linkit Smart 7688 Duo, which uses a command library that get sent back to the android, so no need to make a new app I already did that for you...
This is a prebuilt application to easily allow you to modify and experimentWith the appliances in your home, all running on a microprocessor (Linkit Smart 7688 Duo)
The android client is all premade and as soon as you press the microphone and say a command, the app will grab that command and send it to the Linkit SMART 7688 Duo to the Ip and Port specified.
As soon as the command has been said, it will immediately send it, and wait for a response, which will be parsed into multiple commands such as Image, Flash, Maps and Speak Here is an example of turning a light on.
This is from top to bottom of how the Linkit Smart 7688 Duo sends/recv from the Android client, if you want to just start using the example code skip this part.
Linkit Smart 7688 Duo Server:
You only need to worry about the commands library for this process to work, to see that look at the how to use it section below
If all is well then here is the final output for turning the lights on example
UDOO -> RFID
If using ultrasonic for placement of items
UDOO -> ULTRA
SMART -> RELAY
ONE -> ANT
NEO ->TEMP -> BARO
Before we can move on with the setup of the server and devices, there are a couple of pre-things we need to do/know.
Make sure you have the above steps completed and the wiring before moving on, If the Udoo - Rfid or Ultrasonic scripts don't work make sure you're running the python script on the linux side...
Here are all the steps needed to get all sensors workig
1. Install the zip
2. Unpack it on desktop
3. Navigate to 'Android_App'
4. Plug in android device
5. Copy apk to phone using explorer
6. Open phones file explorer
7. Navigate to where apk was placed
8. Click on apk and it'll install like all other apps
9. Make sure WinSCP and puTTy are installed
10. Open WinSCP
11. Get the Ip of SMART by connecting through station mode or by router admin
12. Connect to SMART using that IP (Default login = root, Pass = what you used before)
13. (Left side of winSCP) Navigate to 'Server'
14. Copy 'Linkit_Smart_Server.py' to the SMART's /root folder
15. puTTY open up SMART ssh connection
16. cd into '/root'
17. run command 'python Server.py'
18. DON'T close the window
19. On computer navigate to 'Sensors' (Not using WinSCP)
20. Under each folder where there is a arduino sketch, modify it for your networkThe Ip's, SSID and PASSWORD values then flash to each device
21. If on Udoo quad/dual copy modified arduino sketch over on flash drive
22. Flash the Due on the Udoo with the new sketch
23. One file in Sensors -> Neo is a python file called Home_Auto_Neo
24. Copy on flash drive to Neo and run the python script as root NOT sudo example below
echo udooer | sudo -S su -c 'Auto_Home_Neo.py'
25. Open up the app and try the example commands
Did you see above how I highlighted each of the words. Well that's because the Commands() methods allow you to have the option of key selecting certain words out of a entire phrase. So no matter how you arrange the words as long as the keywords are located it will trigger. If both are there you just set your priority (if statement) higher up. So for the example here is the code for the mammoth.
.....Android sends data, data gets inserted into from_client if command.Find(from_client, "where", "is", "mammoth"): toClient = command.Flash("here!") + command.Speak("I'm a flipping mammoth") + \ command.Image("http://vkontakte.ru/images/gifts/256/44.jpg") print toClient .... toClient gets send to the phone
if command.Find(from_sensor, "POP", "END:POP"): pop = SensorCut(from_sensor, "::POP::", "::END:POP::") print "pop val: "+str(pop)
Make sure you look at the examples provided in the code for the Linkit Smart 7688 Duo!
Have any questions or would like to contribute. Just contact me at email@example.com
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!