Software apps and online services
The core of this project is the ci20 board. Ci20 basically, incorporates an Ingenic JZ4780 SoC which includes a 1.2GHz dual core MIPS32 processor and Imagination PowerVR SGX540 GPU. Ci20 comes pre-installed with Debian 7, however, we have a choice to upgrade to Debian 8 or even Android 5.1.
We would be, basically controlling the GPIO pins, via an Andorid app " Makeitflow" for controlling the various power devices in our home.
The core - CI20
STEP -1 : Starting up Ci20
- The CI20 is 'ready to go out of the box'. The on-board NAND flash comes pre-programmed with a Debian7 installation. We just need to power up (5V, 2 amps adapter ) and attach a monitor (in my case its my TV with HDMI cable)
- The detailed instructions and other queries are very well held up in the following link "CI20_Beginners_Guide"
- There is choice to choose different operating system, like Debian 8 or Android 5.1, for this we can choose to reflash the nand or boot from the memory card. The detailed instruction for loading new OS is in the following link " CI20_Distros".
I have choosen Debian 8 for controlling my home appliances, while i have kept android 5.1 for pure entertaintment purpose.
Step -2 : A short Break with loading of Android 5.1 (lollipop)
So before, we move on to actual automated control with Debian 8, i would like to mention about the verstality with pure entertainment bought about with Android OS.
I would say yes, Android OS 5.1 performance on CI20, takes you much ahead, in terms of ease of entertainment viz-a-viz, net surfing, playing you tube or games.
One can install apps or games (currently very few apps are supported by MIPS architecture) via the amazon app store (google play store is not directly supported).
So in short Android os can offer following advantages
Net Surfing experince is great,
Various profductive apps can be used, like the inbuit timer clock etc
You tube plays flawlessly and yes Audio over HDMI is great!
Step - 3 : Installing "MakeitFlow app" on android device & corresponding account login from CI20 board.
To install "Makeitflow" app on any android device , please refer to link "makeitflow" for download.
After download is complete choose a login name and password, this is required to sign in from CI20 device as well as on web/android device.
Now power up your CI20 board with either Debian 7 or 8, than go to Terminal emulator and login as root user and type flowstarterapp, press enter. Follwing shall now be shown on the screen
$ root@ci20:/# flowstarterapp Reading Configuration from path: ~/.config/flowstarterapp Flow Ci20 Starter App v2.1.0 startup - Configuration mode: ** Activity Log has no entries ** Flow CI20 Starterapp v2.1.0 startup - Configuration mode Configure starter app to continue. Available commands are: userlogin - Associate the current device with Flow User and Register the device - Requires flow user credentials. signup - creates a new user account and assocaites the current device with the newly created user account. help - to see more options null
Now enter your login credentials as above.
$ userlogin $ Enter username: $ Enter password null
After login CI20 presence would be availble on internet.
Now login from your android device, with the same user name and password. After successful login we can see the follwoing screen
There is a list of commands, which can be sent from "makeitflow" app to CI20, The same is included in the attachment section
Step-4 : Controlling GPIO's through "makeitflow" app
CI20 GPIO's pin diagram is as below
There are seven GPIO ports which can be used with flowcommands i.e GPIO1-GPIO7.
To control any GPIO, enter following on your android device with makeitflow app running as in above step
SET GPIO $ $ $
Pin number ranges from 1-7
Direction: 0-in 1-out
Value : 0-low 1-high
For example to set GPIO1 as output with high value, the command shall like,
SET GPIO $1$1$1
Step -5 Remote power control with CI20
Here, I have controlled my TV power on/off fuction remotely through CI20 GPIO port.
The first step is to power up ci20, make sure ci20 is connected to web (either through wireless or ethernet connection)
Now start the flowstarter app on ci20 as in above step by logging as root user.
Start the makeitflow app on your android device.
I have used a single channel 5V Relay for controlling my TV power functions, now connect "+ve" and "gnd" of Relay to CI20 "+5V" and "gnd" respectively.
Now connect the signal input of Relay to either of GPIO1-7.
Now with following commands we can simply turn on/off our TV from anywhere in the world
SET GPIO$1$1$1 - ON SET GPIO$1$1$0 - OFF