Jump to content
pine

TI Exosite Portal data visualization with F5529LP, TMP006 and TP-Link WR703N

Recommended Posts

From the recent email received from TI announcing their new Connected LaunchPad line, I noticed the free partner service offered to Exosite.

 

It is really cool to have the services of this kind, easy to configure for such a sophisticated communication platform.

 

My only problem is I don't have one of those new shinny Connected LP.. actually TI won't sell those to where I live. But that doesn't stop my drive to test out this new exciting cloud!

 

Firstly, an F5529LP with TI TMP006 temperature booster pack was selected as the test rig. This was a small project from last month that also with a 1602 LCD.

 

post-286-0-39001900-1394641514_thumb.jpg

 

The coding is done in Energia. Although the LCD shows a lot of info, including sensor temperature and die temperature, together with their min / max, the data output from serial is currently limited to the sensor temperature only.

 

The F5529+TMP006+LCD package is connected to a TP-Link WR703N wireless router with OpenWRT. Every 4 seconds the LP send the sensor temperature through serial to the OpenWRT. This router is installed with ser2net package and a lua program is running to capture that value, and then send to Exosite. (Yes that is a Haagen Dazs behind the LP.. to make sure temperature below 0C worked as well as no shortage of dessert tonight..)

 

post-286-0-86511200-1394641352_thumb.jpg

 

The whole Exosite experience is pretty nice. It only takes less than half hour from opening a new account to have the site ready to receive data, that already include reading the documentation on how to send data with their simple HTTP protocol. 

 

For the 703N router, apart from the package ser2net, a small lua program that required the lua socket package (easily installed in the standard way - opkg install luasocket), included below is used to capture the output from ser2net, do some legwork, and finally send data to Exosite:

local host, port = "127.0.0.1", 2002
local socket = require("socket")
local tcp = assert(socket.tcp())

tcp:connect(host, port);

while true do
    local s, status, partial = tcp:receive()
    print(s or partial)
    if status == "closed" then break end

    local socket = require("socket")
    local host = "m2.exosite.com"
    local sock = assert(socket.connect(host, 80))

    sock:send("POST /api:v1/stack/alias HTTP/1.1\r\n")
    sock:send("Host: m2.exosite.com\r\n")
    sock:send("Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n")
    sock:send("X-Exosite-CIK: secret-exosite-token-here\r\n")
    sock:send("Content-Length: 8\r\n\r\n")
    sock:send("s=")
    sock:send(s)
    sock:send("\r\n\r\n\r\n")
    repeat
        local chunk, status, partial = sock:receive(64)
        print(chunk or partial)
    until status ~= "closed"
    sock:close()
end

tcp:close()

It is quite an enjoyable experience to have little things connected to the Internet  ^_^

 

post-286-0-85259000-1394643036_thumb.jpg

 

In summary:

 

TMP006 -(I2C)-> LP5529 -(serial)-> 703N/ser2net -(socket)-> 703N/lua -(http)-> Exosite

Share this post


Link to post
Share on other sites

 

That Energia library by @@awhitehead required a CC3000 BP (which I wish I had one  :wink: ), so to fill the missing link in my setup, a TP-Link WR703N router is used and the LP talks to the router via serial interface. No wireless library used on the LP, the only line needed is Serial.println().

 

By the way, your serial GUI data program at http://forum.43oh.com/topic/5101-serial-data-gui/#entry45501 is really neat! I shall try it soon.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...