You can also check out my home P-Wave detector software and hardware howto on building your own detector. If you get it working, shoot me a message and perhaps we could set up a network. I can also probably help you out. The hardware is all off-the-shelf. Heck, you can find it on amazon.
You have probably heard all about the Japan Earthquake Early Warning System system. If not, the prior link has a great article on the subject. Unfortunately, the United States has nothing like this. It might be coming soon, but in the meantime, we are all flying blind here.
After the Japanese earthquake, I begin to look around for some equipment to do the same. I first turned to a company called Seismic Warning Systems, who has yet to return any of my inquires to purchase hardware. So, I had to set my sights a little lower for the commonly available Quake Alarm. After connecting it to an Arduino, writing a python script, and scanning for the first sign of a P-Wave, and filtering out local vibrations, I am proud to say that we have not seen one false positive! We have not had an earthquake to test with, but after simulating a P-Wave by slowly oscillating an exterior wall, I am quite certain that it will work just fine.
Originally, the system used an iPhone app to push notifications at the moment a quake was detected. It turns out, the Apple notification system has very, very low latency, ranging from 0 to 2 seconds (Up to 2 seconds if the device display is off in standby mode). I wrote a nice little app to provide notifications, but this proved to be not ideal. First, I would have to deal with the AppStore approval and maintenance of an application, and second, I would be leaving out a chunk of users.
The system I have put online uses traditional SMS notifications through an SMS aggregator I use. The delay is usually very low, so its a close second to iPhone alerts. I have had a few folks on this system testing it, and I think I am ready to open this up for anyone else interested.
If you want quake early warnings, visit this link to sign up.
Note that this thing isn’t going to go off with one of those little quakes, but you may see notifications on 5.0 and larger. You know, the ones you might want a little warning before hand.
Since I only have one sensor (anyone else want to put one up?), I cannot provide estimated arrival time, intensity, and likelyhood of advance notice. If the quake happens close to you, but far from my sensor, you may not see any advanced warning.
UPDATE Oct 17, 2011: Software and hardware guide now on GitHub! https://github.com/spaceneedle/P-Wave-Detector
After the Japan earthquake, there were (unsubstantiated) fears of radioactive clouds engulfing the west coast. Since I did have a SparkFun USB Geiger Counter laying about, I figured it would be a fun project to set up a monitoring station and post results to a web page with graphs. The Geiger counter is sitting on the table, indoors, facing the exterior corner of the house, perpendicular to the ground, with the Puget Sound about 1000 feet in that direction. There couldn’t be a worse location.
But some really, really boring data collection ensued. *yawn* 9 counts per minute, 7 counts per minute, 5 counts per minute. I’m glad to know the Ikea table wasn’t radioactive, but it was very boring to watch. Lacking any radioactive sources to play with, I just ended up leaving it on the desk collecting data continuously since March 25th 2011. Over the next few months, it was completely flat. No up trending. Nothing.
Fast forward to the end of September, I was investigating what I thought was an unusual cpm event between 30-50 CPM on late August, when I did this ‘grep’ command:
$ grep "] 40" radlog.txt
[Mon Jul 4 07:45:24 2011.1309790724.28] 400
[Mon Aug 1 15:46:59 2011.1312238819.67] 40
[Fri Aug 26 18:18:09 2011.1314407889.55] 40
Oh crap!? What the heck? 400 counts per minute? The warning threshold in Colorado on Radiation Network is 100 CPM, and mine is near sea level indoors in suburban Seattle!
Here is a dump of the log file:
[Mon Jul 4 06:53:32 2011.1309787612.03] 6
[Mon Jul 4 06:54:33 2011.1309787673.27] 14
[Mon Jul 4 06:55:34 2011.1309787734.47] 16
[Mon Jul 4 06:56:35 2011.1309787795.05] 7
[Mon Jul 4 06:57:36 2011.1309787856.5] 13
[Mon Jul 4 06:58:37 2011.1309787917.82] 12
[Mon Jul 4 06:59:38 2011.1309787978.8] 8
[Mon Jul 4 07:00:39 2011.1309788039.19] 7
[Mon Jul 4 07:01:40 2011.1309788100.16] 11
[Mon Jul 4 07:02:41 2011.1309788161.26] 11
[Mon Jul 4 07:03:42 2011.1309788222.31] 17
[Mon Jul 4 07:04:43 2011.1309788283.22] 13
[Mon Jul 4 07:05:44 2011.1309788344.34] 11
[Mon Jul 4 07:06:45 2011.1309788405.6] 17
[Mon Jul 4 07:07:46 2011.1309788466.7] 11
[Mon Jul 4 07:08:47 2011.1309788527.86] 13
[Mon Jul 4 07:09:48 2011.1309788589.0] 13
[Mon Jul 4 07:10:50 2011.1309788650.27] 9
[Mon Jul 4 07:11:51 2011.1309788711.27] 10
[Mon Jul 4 07:12:52 2011.1309788772.98] 17
[Mon Jul 4 07:13:53 2011.1309788833.7] 14
[Mon Jul 4 07:14:54 2011.1309788894.11] 14
[Mon Jul 4 07:15:55 2011.1309788955.3] 19
[Mon Jul 4 07:16:56 2011.1309789016.31] 16
[Mon Jul 4 07:17:57 2011.1309789077.85] 10
[Mon Jul 4 07:18:58 2011.1309789138.29] 10
[Mon Jul 4 07:19:59 2011.1309789199.2] 19
[Mon Jul 4 07:21:00 2011.1309789260.91] 15
[Mon Jul 4 07:22:01 2011.1309789321.99] 20
[Mon Jul 4 07:23:02 2011.1309789382.3] 21
[Mon Jul 4 07:24:03 2011.1309789443.33] 35
[Mon Jul 4 07:25:04 2011.1309789504.1] 27
[Mon Jul 4 07:26:05 2011.1309789565.37] 33
[Mon Jul 4 07:27:06 2011.1309789626.8] 23
[Mon Jul 4 07:28:07 2011.1309789687.42] 36
[Mon Jul 4 07:29:08 2011.1309789748.3] 45
[Mon Jul 4 07:30:09 2011.1309789809.0] 238
[Mon Jul 4 07:31:10 2011.1309789870.97] 212
[Mon Jul 4 07:32:11 2011.1309789931.35] 75
[Mon Jul 4 07:33:12 2011.1309789992.2] 81
[Mon Jul 4 07:34:13 2011.1309790053.93] 207
[Mon Jul 4 07:35:14 2011.1309790114.54] 205
[Mon Jul 4 07:36:15 2011.1309790175.05] 119
[Mon Jul 4 07:37:16 2011.1309790236.44] 229
[Mon Jul 4 07:38:17 2011.1309790297.45] 229
[Mon Jul 4 07:39:18 2011.1309790358.02] 322
[Mon Jul 4 07:40:19 2011.1309790419.33] 203
[Mon Jul 4 07:41:20 2011.1309790480.06] 92
[Mon Jul 4 07:42:21 2011.1309790541.24] 114
[Mon Jul 4 07:43:22 2011.1309790602.27] 258
[Mon Jul 4 07:44:23 2011.1309790663.04] 298
[Mon Jul 4 07:45:24 2011.1309790724.28] 400
[Mon Jul 4 07:46:25 2011.1309790785.02] 49
[Mon Jul 4 07:47:26 2011.1309790846.14] 229
[Mon Jul 4 07:48:27 2011.1309790907.77] 457
[Mon Jul 4 07:49:28 2011.1309790968.03] 192
[Mon Jul 4 07:50:29 2011.1309791029.48] 211
[Mon Jul 4 07:51:30 2011.1309791090.57] 384
[Mon Jul 4 07:52:31 2011.1309791151.94] 100
[Mon Jul 4 07:53:32 2011.1309791212.64] 175
[Mon Jul 4 07:54:33 2011.1309791273.01] 269
[Mon Jul 4 07:55:34 2011.1309791334.19] 150
[Mon Jul 4 07:56:35 2011.1309791395.37] 101
[Mon Jul 4 07:57:36 2011.1309791456.16] 118
[Mon Jul 4 07:58:37 2011.1309791517.03] 385
[Mon Jul 4 07:59:38 2011.1309791578.68] 705
[Mon Jul 4 08:00:39 2011.1309791639.44] 496
[Mon Jul 4 08:01:40 2011.1309791700.8] 89
[Mon Jul 4 08:02:41 2011.1309791761.26] 84
[Mon Jul 4 08:03:42 2011.1309791822.78] 20
[Mon Jul 4 08:04:43 2011.1309791883.46] 16
[Mon Jul 4 08:05:44 2011.1309791944.6] 13
[Mon Jul 4 08:06:45 2011.1309792005.46] 14
[Mon Jul 4 08:07:46 2011.1309792066.03] 16
[Mon Jul 4 08:08:47 2011.1309792127.57] 13
[Mon Jul 4 08:09:48 2011.1309792188.87] 26
[Mon Jul 4 08:10:49 2011.1309792249.96] 31
[Mon Jul 4 08:11:50 2011.1309792310.28] 33
[Mon Jul 4 08:12:51 2011.1309792371.12] 12
[Mon Jul 4 08:13:52 2011.1309792432.0] 25
[Mon Jul 4 08:14:53 2011.1309792493.3] 7
[Mon Jul 4 08:15:54 2011.1309792554.22] 16
[Mon Jul 4 08:16:55 2011.1309792615.91] 15
[Mon Jul 4 08:17:56 2011.1309792676.99] 19
[Mon Jul 4 08:18:57 2011.1309792737.47] 10
[Mon Jul 4 08:19:58 2011.1309792798.71] 7
[Mon Jul 4 08:20:59 2011.1309792859.04] 17
[Mon Jul 4 08:22:00 2011.1309792920.0] 13
[Mon Jul 4 08:23:01 2011.1309792981.52] 17
[Mon Jul 4 08:24:02 2011.1309793042.13] 16
[Mon Jul 4 08:25:03 2011.1309793103.18] 9
[Mon Jul 4 08:26:04 2011.1309793164.73] 21
[Mon Jul 4 08:27:05 2011.1309793225.54] 22
[Mon Jul 4 08:28:06 2011.1309793286.1] 10
[Mon Jul 4 08:29:07 2011.1309793347.07] 14
[Mon Jul 4 08:30:08 2011.1309793408.19] 9
[Mon Jul 4 08:31:09 2011.1309793469.99] 14
[Mon Jul 4 08:32:10 2011.1309793530.59] 14
[Mon Jul 4 08:33:11 2011.1309793591.35] 14
[Mon Jul 4 08:34:12 2011.1309793652.16] 13
[Mon Jul 4 08:35:13 2011.1309793713.18] 25
[Mon Jul 4 08:36:14 2011.1309793774.96] 31
[Mon Jul 4 08:37:15 2011.1309793835.77] 26
[Mon Jul 4 08:38:16 2011.1309793896.35] 14
[Mon Jul 4 08:39:17 2011.1309793957.17] 15
[Mon Jul 4 08:40:18 2011.1309794018.79] 9
[Mon Jul 4 08:41:19 2011.1309794079.26] 11
[Mon Jul 4 08:42:20 2011.1309794140.97] 19
[Mon Jul 4 08:43:21 2011.1309794201.17] 17
[Mon Jul 4 08:44:22 2011.1309794262.18] 48
[Mon Jul 4 08:45:23 2011.1309794323.23] 43
[Mon Jul 4 08:46:24 2011.1309794384.21] 28
[Mon Jul 4 08:47:25 2011.1309794445.2] 26
[Mon Jul 4 08:48:26 2011.1309794506.02] 19
[Mon Jul 4 08:49:27 2011.1309794567.07] 18
[Mon Jul 4 08:50:28 2011.1309794628.0] 24
[Mon Jul 4 08:51:29 2011.1309794689.08] 137
[Mon Jul 4 08:52:30 2011.1309794750.0] 93
[Mon Jul 4 08:53:31 2011.1309794811.71] 261
[Mon Jul 4 08:54:32 2011.1309794872.74] 210
[Mon Jul 4 08:55:33 2011.1309794933.04] 67
[Mon Jul 4 08:56:34 2011.1309794994.88] 106
[Mon Jul 4 08:57:35 2011.1309795055.44] 86
[Mon Jul 4 08:58:36 2011.1309795116.47] 48
[Mon Jul 4 08:59:37 2011.1309795177.51] 60
[Mon Jul 4 09:00:38 2011.1309795239.0] 14
[Mon Jul 4 09:01:39 2011.1309795299.71] 7
[Mon Jul 4 09:02:40 2011.1309795360.44] 13
[Mon Jul 4 09:03:41 2011.1309795421.72] 11
[Mon Jul 4 09:04:42 2011.1309795482.01] 13
[Mon Jul 4 09:05:43 2011.1309795543.8] 10
[Mon Jul 4 09:06:44 2011.1309795604.08] 16
[Mon Jul 4 09:07:45 2011.1309795665.94] 11
[Mon Jul 4 09:08:46 2011.1309795726.54] 11
Click here for my giant 2328×1280 graph.
That’s right! We hit a 705 CPM here, indoors, near sea level, with no circulating outdoor air, while everyone was sleeping, which is almost 100 times the normal level in my house. It was a beautiful day, no rain. All times are in PDT. Did I catch some cosmic burst from space? A radioactive bug? Some uranium dust? Sensor error? Can anyone guess what happened here?
Nissan LEAF CARWINGS tells any RSS feed provider your current position, speed, direction, destination, etc.June 12th, 2011
The Nissan LEAF all-electric car is full of technological firsts. One of which is a GSM cellular connection to the internet for providing voluntary telemetry information to Nissan, new charging stations, competitive driver rankings, and even RSS feeds. This is called Nissan CARWINGS.
However, before you start plugging in your favorite RSS feed sources, there is something you need to be aware of.
After creating some of my own third party RSS feeds, I noticed something very peculiar in the HTTP GET in my apache logs (note that I blanked out the exact position of the car in my drive way with x and y):
18.104.22.168 - - [12/Jun/2011:16:19:39 -0600] “GET /rss.php?lat=47.xxxxxxxxxxxxx
&navi_set_spd_d=mile/h& HTTP/1.1″ 200 641 “-” “Mozilla/5.0 (compatible;
NISSAN CARWINGS; http://lab.nissan-carwings.com/CWC/)”
Looking at the GET string above, “lat” and “lon” variables contain the current position of the vehicle, “speed” is the vehicle speed, “car_dir” is the direction of the car, and “lat_dst” and “lon_dst” is your destination configured in your navigation system. I am not sure with that other lat/lon positions are, but perhaps they might be related to waypoints on a multi-stop itinerary.
All of these lovely values are being provided to any third party RSS provider you configure: CNN, Fox News, Weather Channel, it doesn’t matter! While a lot of these providers are probably not aware of these (rather valuable) parameters the car passes, they probably sit in thousands of HTTP logs already, waiting to be parsed out — or perhaps supported in the future.
There is no way to prevent this data from being sent, nor does Nissan or CARWINGS warn you that all of your location data can be flung off to random third parties. Simply put in any RSS url, and CARWINGS will add a question mark with all of the location data. Note that the RSS feeds are only loaded at the instant you request them, so while it cannot be used as a persistent vehicle tracker, it can provide real-time data at that moment where you are located.
I have created a proof of concept for those who want to see it all in action. Here is an RSS feed you can plug into the Nissan LEAF CARWINGS website:
Please note that your location information will be kept private, I am not making use of this data for any purpose.
UPDATE: Here is another interesting application of the “flaw”, a location based RSS weather feed complete with weather icons:
(I had to remove this link as the geocoding provider has cut me off for heavy traffic..ugh)
Quick demonstration of what the Car Spy RSS feed will do:
Full explanation and demonstration video:
The entire “flaw” is not entirely evil, here is a location based weather feed that I came up with tonight, complete with weather icons:
Update June 13 3:23 PM PDT: While nobody bothered to inform the customers, Nissan does document this functionality in this obscure Japanese developer document: http://lab.nissan-carwings.com/CWL/Spec.cgi [Google Translated].
Update June 14 10:45 PM PDT: There have been a couple of questions regarding the contents of the headers, and if there is any identifying information that CARWINGS could be providing. From what you can see here, it is not:
Connection: TE, close
User-Agent: Mozilla/5.0 (compatible; NISSAN CARWINGS; http://lab.nissan-carwings.com/CWC/)
Also, CARWINGS does not accept cookies.
Thus, besides some very exotic trending, it would be difficult to identify anybody making the request. It would be much easier for advertisers/content providers/etc to track and identify your iPhone/Android phone instead.
UPDATE 6/15/2011 5:00 pm it appears that CARWINGS is no longer providing any location information on requests.
Parallel Kingdom is a location-based MMORPG for Android and iPhone.
A marketplace exists for buying and selling of game items through various independent trading posts scattered throughout the realm. Some players in the game have obtained the ability to travel between these trading posts with ease to take advantage of the market dynamics of two or more different localities, and may others have not, so it introduces some interesting market dynamics.
The game does maintain a global list of average prices of various items, but no charting or trending takes place.
I am now polling the list on 15 minute intervals and providing chart information on a new website. My data only goes back a few days, but as times goes on, the amount of historical data should become very useful.
While everything works fine, Parallel Kingdom does have some very unusual volume reporting. The “total items sold” varies throughout the day, which makes no sense as this should only increment. Once I actually figure out what the heck this is measuring, I can probably provide better volume charts in the future.
If things go well, I will try to come up with a few interesting tools and charting features to aide in the buying, selling, and resale of game items.
Introducing “Sticker Message Board” (trendy web 2.0 name pending), a location-based message board which resides on a QR Code sticker! We have already started placing these stickers around the USA, but we need your help to put more out there!
As you scan codes, it will be saved to your ‘history’, so you can go back and re-visit codes you have previously scanned. You must physically find the message board before you can read/write posts! How fun!
Put them on community bulletin boards, or local businesses (pending permission of course!), create your own treasure/scavenger hunts, hide them in geocaches, or anything else you can think of.
Stickers can be put into “sign mode” (aka, read only), or the traditional “message board mode”, where anyone can read, write, etc. and join in on the fun.
Scan this QR Code with your phone to order free stickers and help out with this fun pilot/experiment:
You can also stop by Metrix Create:Space and pick up your stickers.
You can also keep tabs on our project by ‘liking’ our page:
I have been receiving and storing ADS-B and ACARS data in the KSEA area. For those who are interested, here are the raw data logs from these two services.
Not every aircraft in the US supports this mode, but most Airbus aircraft and internationally bound aircraft will report a position.
All operations were routine, with the exception of one: the China Air Cargo aircraft that overran the KSEA runway during a november snow event. You can watch the ill fated aircraft touch down mid field, overrun, and then return to the gate under its own power. Quite interesting to watch.
The 200MB file will expand to over 2GB CSV format, so be careful.
There are at least two ways to build the Nike+ Check-In Hardware that talks to stumble.to. One is easy, one is a bit difficult. I will first focus on the easy way, and then if you are daring enough with your soldering skills, I will send you off in the right direction for a more difficult way that does not require the very handy SparkFun hardware.
Things you will need:
If you run into trouble:
Contact our support department, er, i mean, Casey, by emailing casey_nike_support @ mobilesquared.com. Tell me as much as you can about your situation and I will try to steer you in the right direction.
Step 1: Connecting up the hardware
Connecting the hardware is very simple, thanks to the prefabricated Nike+iPod SparkFun board. Simply connect the white receiver to the iPod connector. Plug the USB into the SparkFun board and the computer. A red LED will light up, and a new serial port will be created on your computer.
Step 2: Installing the software
Python is usually on most unixes and standard with Mac OSX. If not, it should not be too hard to find it with popular packaging systems. One thing that probably isn’t automatically installed is PySerial, but this is easy to. Visit PySerial’s website and follow the installation instructions.
Step 3: Identifying your serial port
The Nike+iPod is a standard FTDI serial device, and nearly every operating system will automatically find the drivers on connection. On most unix-based operating systems, check the /dev directory for a new serial port. On my Snow Leopard Mac, this can be as easy as typing ‘ls /dev/*usbserial*’ in the terminal. In my particular case, the Nike+iPod shows up as “/dev/tty.usbserial-A600e18v”. If you still have a hard time seeing it, try unplugging it and plugging it back in and seeing if a new file pops up in /dev that looks like a serial port. Write down whatever the serial port is so you can modify the python script with the correct serial port.
Step 4: Get yourself a stumble.to account and API key
Stumble.to supports a variety of authentication systems (I simply just use google to log in). Now that you have an account, you can add your API key. Go to “venues” and create a new test venue (or link it to an existing foursquare venue). After you create your venue, you will see an API key and API secret. Write these down because you will need them for the python script.
Step 5: Download the stumble.to Nike agent
You can find the python script here:
Step 6: Edit the script with your API settings
Open the python script you downloaded in your favorite editor, and edit the following:
# Adjust these values as appropriate.
API_KEY = 'YOUR_API_KEY'
API_SECRET = 'YOUR_API_SECRET'
DEVICE = '/dev/tty.usbserial-A600e18v'
Populate the values you obtained for the API key, secret, and serial port in the above locations.
Step 7: Run the script and see if it works!
Run the script (ie: python stumbleto-shoe-agent.py) and watch the console. The script will initialize the Nike+ hardware and start listening on the air. Pick up your Nike+ sensor and jiggle it like you are going to role some dice. Rather shortly, it should see the Nike+ sensor and print out a hex serial number like: 8d-10-92-2f. This is the Nike+ sensor UID number that you will need to put into your stumble.to account. If you have more sensors, repeat the same process and be sure to keep track which is which.
Go ahead and quit the script for now after you are done with this.
Step 8: Visit the stumble.to site and enter your Nike+ UID and Foursquare account information
For the Nike+ sensor:
Visit the stumble.to site, log in, and click “Add Device”
For the name, you can put anything, but I suggest looking on the back for the serial number of the Nike+ sensor and using this.
Select Nike+ sensor for the type.
Finally, Enter the UID we discovered above where it say UID.
For the foursquare connection:
Stumble.to uses oauth for authenticating users on third party services. This means we do not store your login or password information on our server. This step is no more painful than authorizing a third party to use your twitter, facebook, etc. log in information and its used for us to check you into venues.
Click on “Add Service”, and select foursquare (and possibly twitter and fire eagle if you want to announce your stumble.to check ins to these services as well)
Step 9: Run the script to Nike+ enable the venue
Run the stumbleto-shoe-agent.py python script and either walk around your sensor or jiggle it a little. It will see your device. Congratulations! You just made your first Nike+ check in! You can also keep it in a backpack, purse, pocket, etc. so you don’t need to fuss with it again.
Be sure to let us know about your newly enabled venue!
And for some value add..
Stumble.to can also detect any WiFi device in range for auto-checkin (Laptop, iPhone, android, etc). Be sure to check out some of the example scripts you can run on some WiFi routers.
For those who want to try to the hard way…
This is actually not too hard if you have a steady hand. You will need a level shifter (FTDI is suggested, as it does have a 3.3V output that can drive the iPod receiver circuitry) and some wire. All you need to do is solder up a few grounds, TX, RX, and 3.3V.
Here is the SparkFun schematic
Here is a link to a UW security project that involved soldering directly to the receiver pins.
There has been a lot of recent talk about a blog post I made earlier this year, so after working a few late nights with Eric Butler at Metrix Create:Space, we now have a public friendly version of the Nike+ foursquare check in system! Not only do I have a much nicer collection of hardware and software, but anyone can now add their Nike+ shoes to http://stumble.to/ so they can check in too! Eric has put a lot of work into polishing the stumble.to service to allow functionality for the masses, which not only supports my Nike+ auto check-ins, but WiFi automatic check-ins! Not only can your shoes check in to foursquare, but so can your laptop, PDA or smart phone when it enters in range of a stumble.to enabled WiFi access point.
Only one flagship venue is enabled with this system (Metrix Create:Space), located in Seattle, Washington, but I hope to add more venues soon with this capability. If you own a venue interested in supporting automatic Nike+ and WiFi check-ins, be sure to contact me privately for more details. (casey_nikefoursquare @ mobilesquared.com)
I also hope to release some code and hardware instructions shortly. Eric Butler will also be publishing some information on how to use the stumble.to API’s to interface all sorts of interesting presence-detecting technology that people will eventually dream up.
I plan to write a more technical post soon, but this should be more than enough to get people going. Others have done quite a bit with Nike+ hardware, so these are some good reads if you want to learn more before then.
Special thanks to Eric, filer, and chronomex for helping to make this all come together, as well as Metrix Create:Space for hosting the first deployment!
UPDATE 9/2/2010: As promised, here is a link to the nike shoe stumble.to software so you can get started running your own! All you need to do is obtain an API key (sign up for stumble.to), install Python and PySerial, and buy yourself a SparkFun iPod to USB adapter. Make sure to remember to edit the script and change your API key, as well as specify the serial port that your USB adapter appears as.