Introduction: Smart Home Part 1: Easy Cloud Enabled Temperature Logger.

Picture of Smart Home Part 1: Easy Cloud Enabled Temperature Logger.

I was always tempted to have a "smart home". Thanks to Instructables and Intel who sent me the kit consisting of Intel Edison with Arduino Board and Grove starter kit I finally have a chance to pursue this dream. This is the first step on my road to build my dream smart home solution. This is also my very first instructable. Prepare for more.

This build took me one evening of work and I know only basics of programming. IoT with Intel Edison is SO EASY!

Step 1: Assemble Edison!

First you have to attach your Edison to Arduino dev board. Guide it through mounting screws and press gently press it in place where you see white label.

Second - get base board from the Grove Starter Kit and put it in place on dev board.

At last - take one cable and temperature sensor from the Grove Starter Kit and connect it together to analog I/O, in my case A0.

Step 2: Prepare Intel IoT Analytics Dashboard.

Go HERE and sign up!

Process is pretty self explanatory - if you have any trouble you can follow 10DotMatrix's guide which is GREAT and I see no point to double his content here.

Once you sign up, we can start playing with the software :-)

Step 3: Set Up Edison.

Picture of Set Up Edison.

Now I will guide you through setting up your Edison on Windows.

1. Download the FTDI driver and install it(run as administrator)

2. Download Edison drivers and install them.

3. Get 2 micro usb cables and connect them to Edison Arduino dev board and
your laptop. Make sure switch next to micro usb socket is switched toward it.

4. Download Putty - terminal emulator

5. Go to Device Manager in Windows and look under "Ports (COM and LPT)" which com number is assigned to your Intel Edison board (you will see i.e. USB Serial Port (COM7)).

6. Run Putty, and select serial, type COM7 in serial line and set speed to 115200. You will use it frequently so type in some name in "Saved Sessions" and hit save. Then you can hit open and you should see terminal window.

7. Hit enter few times - you should see command prompt asking you for user name. If it is not your first time with edison you can log in and skip next steps.

8. ...however if it is your first run - type in root as username and you should be in.

9. I strongly recommend you to update your Edison now using this guide.

10. After you updated Edison and logged back in - type in few commands.

Type in: "configure_edison" and hit enter, this should run a wizard which will guide you through.

Step 4: Configure IOT

  1. Assuming you still are in Intel Edison command prompt - type in "iotkit-admin device-id" and hit enter.
  2. Mark device id and copy it.
  3. Go to your IoT Analytics to My Devices panel and press "Add new device"
  4. Paste device id into fields ID and Gateway, give it some cool name and save.
  5. Now go to My Account panel, generate new activation code and make it visible.
  6. Go back to Edison command prompt and type in "iotkit-admin activate YOURACTIVATIONCODE"(substitute your code of course.
  7. Activate iotkit agent by entering the command:

    systemctl start iotkit-agent

  8. Display catalog by entering: iotkit-admin catalog
  9. You can see there already "temperature" position, you have to register it by entering: iotkit-admin register temperature temperature.v1.0
  10. test if registration works by pushing some values to your cloud dashboard, type in:
    iotkit-admin observation 12
    iotkit-admin observation 13
    iotkit-admin observation 14
  11. Now you should be able to see your observation in My charts panel when you select your device and catalog.

Step 5: Let's Get It Programmed!

In this step we will download and run intel arduino IDE and write some code to start this baby running.

  1. Download Arduino Software from this location.
  2. Extract and run it, no installation required.
  3. Go to tools->board and select edison
  4. Check in device manager which com port is assigned to "Intel Edison Virtual Com port", in my case it was COM8, you should select proper com port in arduino ide, go tools->Serial port.
  5. You are ready to code :-D

Here is my code, try to understand which line does what - it is best way to learn.

I hope this has been informative - any problem - let me know in comments.

Comments

ullemiller (author)2015-06-15

thank you for this basic tutorial

vasuc (author)2015-04-02

Hi There! Thanks for posting these instructions they have been super helpful!

I was able to use "iotkit-admin observation" in order to test communications between my device and the IoT Dashboard, but I can't get the Arduino code to push data to my charts. Any idea what might be going wrong? The code compiles just fine by the way..

Thanks again for the post!

qb4hkm (author)vasuc2015-04-02

Try in running this command in console:

systemctl start iotkit-agent

vasuc (author)qb4hkm2015-04-02

As it turns out I needed to run this command first:

systemctl enable iotkit-agent

Thanks!

qb4hkm (author)vasuc2015-05-10

Great! Enjoy!

akapahi (author)2015-04-12

Hey! I got stuck at sending observations. I got the following error when i try to run iotkit-admin observation 12

root@TUedison:~# iotkit-admin observation 12

/usr/lib/node_modules/iotkit-agent/bin/admin.js:52

if(process.argv[4][0] === '-') {

^

TypeError: Cannot read property '0' of undefined

at Object.<anonymous> (/usr/lib/node_modules/iotkit-agent/bin/admin.js:52:23)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Module.require (module.js:364:17)

at require (module.js:380:17)

at Object.<anonymous> (/usr/lib/node_modules/iotkit-agent/iotkit-admin.js:30:13)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

What coulb be the problem and how do i solve it?

MsSweetSatisfaction (author)2015-02-02

Oh wow this is very clever, I definitely like the idea of a Smart home although the technology does intimidate me. Awesome job showing your process! Welcome to instructables!

Thanks for your comment, wonder if anyone tried to use it :-)

Now I am working to send data in opposite direction(control led and relay using iot dashboard) which appears not to be so easy :-/

About This Instructable

5,335views

41favorites

License:

More by qb4hkm:Smart home part 2: Driving relay through the cloud.Smart home part 1: Easy cloud enabled temperature logger.
Add instructable to: