Designing my first custom PCB with Fritzing!

 

This is rockin my yacht right now.

http://fab.fritzing.org/

Much better than Eagle.

 

I’m creating a twitter gateway to will run an electric bird on a hat in response to certain hashtags. More soon.

 

 

HTTP Request logging for an Electric Imp device

 

Recently, I poked around looking for a straightforward way to get the values out of the Electric Imp planner into Splunk. The number of ways to get data into Splunk were dizzying, so for a first run, I’ll set up something simple: setting up a POST request to weeb.com and writing the data to a simple text file.

You’ll need:

- a host where you can create a php file with write permissions

- decide where the text file should live. It’s also a good time to decide on maintenance for the text file. A cron job will email me every morning with the size of the file and will send a reminder to remove it on a certain date.

Pretty easy, huh?

First, create the file. Note name and URL for the file, and make sure the write permissions make sense for the target file.

no-hackee-please

 

Ex: http://www.weeb.com/no-hackee.php

 

Set up the configuration on the electric imp planner.

 

planner_http_request

 

(The status return of 200 will only appear after successful setup)

 

Enter the URL for the PHP script. Click the toggle icon for the configuration menu. The toggle icon looks like three vertical lines with little switches sticking out. It’s on the upper right hand corner of the node icon.

no-hackee

Annnnd you should see the happy input coming into your script soon here!

success

Yeah!

Splunk can then be set up to ingest this file. I should write this up in its own post, since Splunk is powerful but not nearly as well documented as I would like for the new user.

Electric Imp – TempBug tutorial from Tom Buttner

eeimpnum2

My first project using the electric imp!

Tom Buttner created an excellent tutorial as an instructable earlier this year: http://www.instructables.com/id/TempBug-internet-connected-thermometer/

I went through his steps, and the soldering/testing was very simple. I ran into my first roadblock while getting BlinkUp to work, which was a bummer. I checked the circuits. Everything looked good… I simply could not get BlinkUp working over the wifi connection at home. One beer later, I ended up using WPS and got that to work (Time Machine/MPA/next available WPS attempt). ┬áNext, I couldn’t see the imp refresh with the thermistor code, so I poked around in the docs, (I’m always too impatient to read the docs but in this case, RTFM) et voila, there is a known bug with just having one set of firmware code saved. After adding a second one (just a simple two line Hello World), it refreshed! Added the Show Input node, and I had a data! Well, streaming to the servers at Electric Imp, so I then added the Cosm node. Cosm is now Xively, and their tagline is “The world’s first IoT Public Cloud.” I have to admit, they’re pretty slick. And free!

Planner shot:

EEIMPNUM2_planner

Note: Cosm is now Xively, and a datastream is now a Channel in the new UI.

I set up a channel/datastream and you can see the data here:

https://xively.com/feeds/1550307801

So purty. I fiddled with the code and got the readings to come in with less latency:

purty_data

It’s beer o’clock again!