Some hints for the internet:
* gem install fcgi
* symbolic link CHILIPROJECT_ROOT/public to ~/web for the ispconfig user
* comment out the
and there you have it. easy-to-deploy project management systems for all your friends!
Some hints for the internet:
* gem install fcgi
* symbolic link CHILIPROJECT_ROOT/public to ~/web for the ispconfig user
* comment out the
and there you have it. easy-to-deploy project management systems for all your friends!
Images of an Amish barn-raising came to mind while I sat deep within Spaulding Court’s westernmost basement, slowly feeding strand after strand of blue wire through plastic conduit. I’ve never helped raise a barn, but I’ve seen pictures: a family in the village needs help putting up a gigantic building so all the neighbors come to lend a hand. But on this hot Sunday in July, our barn was less 2×4s and more Cat5 communications wiring. Spaulding Court, the venerable community-owned stone-walled apartment complex, was getting ten high-speed computer networking lines installed by a dozen volunteers.
The goal of that afternoon’s work was to provide each of the south side Court apartments with an ethernet connection to a central router. The occupied units already had wireless internet connections, but these new wires would be more reliable and faster. Getting a cable into each unit took planning: each successive unit needed a cable that would reach out of its junction box to the end unit’s box. Volunteers had been measuring the cable out at the previous Soup at Spaulding event.
At first I could hear voices from the other units through the plastic conduit—each unit’s basement needed a helping hand to push and prod the slowly-thickening bundle of cable as it was pulled through by a lead line—but as the bundle thickened the voices disappeared and we had to rely on cell phones and messengers to communicate. And soon enough, I got word from the grapevine that the final unit had gotten its length, and it was over! We climbed back into the Sunday afternoon heat.
I’ll put up an announcement on this blog when we are ready to install the router that links all these cables together.
Check out the latest zine from the Detroit Digital Justice Coalition for a synopsis of all our city’s community wireless projects along with a bunch of other relevant news: http://detroitdjc.org/2011/06/30/ddjc-zine-3-out-now/
my source code management / git workflow just got a bit easier: i’ve never used ssh agent forwarding before, but now i can just use one key to manage access to different repos instead of having separate keys on all my hosts.
in the past, i’d never really used “ssh -A” because it didn’t automagically work with the screen terminal multiplexer… but now, thanks to superuser, it does!
It has been a busy winter for me, and I’m sad to say that i haven’t been very active with the community internet building until recently… that said, it has been pretty awesome for the past few weeks.

Cut coax, foreground; jig, background
For the past couple OCD “open hack night” Thursdays, I’ve invited fellow wireless hackers to work on neighborhood mesh projects, talk about network protocols, and generally goof off in nerdy subversive ways. That first Thursday, these two super-smart network engineer types, Patrick and Adam, came by. The next week, piles of coaxial cable showed up and we started building omni antennas! Also present this past Thursday was Ryan Hughes. He’s organizing a community wireless project in Ann Arbor, and recently attended the Battle Mesh. Finally, another superleet hacker came into the mix, Marky B, who is interested in experimenting with mobile mesh devices.
Over the next few weeks, we’ll be busy working on these antennae as well as some other experiments. I’ve got a few new dual-radio open-mesh nodes on my workbench, and i’d like to work on devising a benchmark test for small neighborhood mesh networks.

my neighborhood: institutions, current mesh, future mesh
Also notable: A few weeks ago, I took part in a panel at SXSW Interactive (a surprisingly well-recorded audio feed of the event is available at that link). Along with Adriel Thornton, Diana Nucera, Jenny Lee, and Invincible, I spoke about Detroit’s future media-based economy. I introduced the idea of “media miles” as a technological parallel to “food miles” — sure, we all like avocados and parmesan reggiano once in a while, but shouldn’t we prioritize what we can grow in the back yard? How can we design technology that emphasize local community exchange, in the same way we are designing food distribution systems that do the same? Of course, you know the answer… mesh networks and community internet. I’ll be elaborating on these ideas sooner or later, in cahoots with Nina Bianchi.
Scenario: you’ve developed a magento extension, tested it on your development server for all these potential fringe cases, even brought in live customer data+code to test against… finally you deploy it to the live site, only to find that another (3rd party) extension uses the same dirty <rewrite>s as your code does. Damn.
What a great occasion to learn all about resolving namespace conflicts in magento. Here’s my list of links:
This is really all you need to know: http://www.webshopapps.com/blog/2010/11/resolving-magento-extension-conflicts/
If you don’t know how to use your text editor, you might need to use this extension for help: http://www.maisondulogiciel.com/english/magento/magento-extension-conflict.html
And finally, here’s an excellent / slightly confounding exposé: http://magebase.com/magento-tutorials/magento-extension-clashes-winners-and-loosers/
Recently a few of my friends have asked me what could help encourage more people in my neighborhood to ride bicycles. For all the time I’ve been a bicycle commuter and advocate for cyclists in Detroit, I’ve never really considered what a specific neighborhood could do to encourage bicycle use. My work at Back Alley Bikes / The Hub of Detroit is rooted in a neighborhood that I moved out of, and after the Jeffries projects closed down it turned into less of a neighborhood resource and more of a city-wide resource (more on that in a minute). Whenever I’ve seen bicycle advocacy come up in the public discourse, it’s been about city-wide or state-wide issues (bicycle licensing, safe streets funding, etc). It’s not often that I see local/block-level efforts to promote green transportation… but isn’t that the right place to start?

Blair rides her bike when it's cold
It’s easy for me to not think about it on the day-to-day: I’m more than happy to jump on my bike and ride to work 5 miles away in the middle of winter… mostly because I’ve spent my whole life growing fond of cold-weather discomfort and learning how to fix a flat with frozen fingers. What would it take to convince someone with less pain tolerance and more concern for their finger’s nerve endings? If you look at North Corktown from a mainstream bicycle-aware urban planning standpoint, the situation might seem bleak. There isn’t much in place that would encourage non-automotive transportation: bus stops are mysterious, sidewalks come and go, and the nearest bike shop and grocery store are a half-hour walk away, in opposite directions; in other words, you’d better pray that you don’t end up with a broken chain and an empty pantry.
The mainstream urban planning fancy-pants plan for a neighborhood like North Corktown might include accoutrement like bicycle lanes, a marketing campaign to encourage alternative transporatation, and maybe a spokesthing for good measure. I think that a lot of these ideas may not be especially relevant to many of Detroit’s neighborhoods.

A pile of cycle in my neighborhood
Rather than paying tens of thousands of dollars per mile for silly things like these, I’d prefer to see that money go into Detroit’s growing bicycle service economy. Detroit has a history of creative entrepreneurship, and the last few years have seen a plethora of bicycle-related businesses start up: The Hub’s in-school youth education services and repair shop, Wheelhouse Detroit’s bicycle tours, Detroit Greencycle curbside recycling pickup, Cass Cafe’s food delivery service.
A bicycle-related business grows the local economy and promotes bicycling at the same time. These groups are putting down fertile soil to grow bigger and better things on in the future. Those bike lanes take a lot of nutrients to get going, don’t they? Shouldn’t we start with the basics?
I live across the street from an apartment complex that was recently bought by a neighborhood nonprofit. Many residents look forward to using some of the units for community institutions, and I think that it’d be a perfect site for regular bike education workshops. An organization like Fender Bender or Mt Elliott Makerspace could provide a mobile toolkit and some educators, and my neighbors could try wrenching a bit or maybe learn some winter bike riding skills.

Let's jam econo with small-fry bike education on a massive scale
Running a program like this can be done on a shoestring budget (c.f. Back Alley Bike’s budget of 4000/year a few years ago), and can have lasting impact as well as serve as a statistical/research base for expanding into new ideas and ventures. A few other projects (Earthworks on the east side and All Saints Church in SW) are running their own small-scale bike education programs, and I’d love to see more neighborhoods join in. In Earthworks’ case, The Hub sponsored the formation of a shop at the soup kitchen/community farm and it turned into a program on its own over the course of a year. And I heard that the youth at All Saints want to open up a retail shop…
It’s up to us to make these ideas and plans available to any and all neighborhoods in our city. As the above projects show, we have what it takes to make amazing things happen, without having to wait on municipal decisions or state mandates.

The chicken sensor is in full operation.
It’s a yogurt container filled to the brim with:
I was so proud when I had my little prototype all put together… but then I did a test run with the USB unplugged and, lo and behold, nothing worked. After a solid hour or two of sifting through the internet, I found this gem-of-a-page at Pachube! This was doubly lucky: first off, the pachube crew concisely explained the problem I’d run into and secondly, I’d forgotten about pachube’s web service… and I promptly rewrote my code to use it instead of my janky homemade web API. Pachube’s site is totally awesome… what a great showcase for Drupal as a web application framework. I love purl.
So in the end, I re-programed the Arduino with a special bootloader customiezd by Ladyada. I’ve gotta say, this was a very steep learning curve for me. I didn’t really catch on at first that, after programming the new bootloader, the Arduino wouldn’t work with the default IDE: to trigger the bootloader, you have to send a special message over the serial line. I did this with a little python script written by Johannes Hoff.
Another issue: I tried to figure out the arduino IDE toolchain, but wasn’t able to. So I ended up compiling from within the IDE and uploading the created hexfile manually, via this command:
1 | pulsedtr.py /dev/ttyUSB0 && /usr/bin/avrdude -V -F -p m328p -P /dev/ttyUSB0 -c avrisp -b 19200 -U flash:w:Pachube_client.cpp.hex |
This worked like a charm.
Also worth noting: the sample code posted on the Pachube page I linked above is a bit out-of-date. I modified it to, among other things, only post once per minute and use the v2 API:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | diff --git a/Pachube_client.pde b/Pachube_client.pde index 1f7bd1c..d3da9bc 100644 --- a/Pachube_client.pde +++ b/Pachube_client.pde @@ -30,9 +30,7 @@ byte mac[] = { 0xDA, 0xAD, 0xCA, 0xEF, 0xFE, byte(ID) }; -byte server [] = { //www.pachube.com - 209, 40, 205, 190 -}; +byte server [] = { 173, 203, 98, 29 }; boolean ipAcquired = false; @@ -100,7 +92,7 @@ void loop(){ //main function is here, at the moment it will only connect to pachube every 10 sec if ((millis() - previousEthernetMillis) > ethernetInterval) { previousEthernetMillis = millis(); - ethernetInterval = 10000; //10 sec + ethernetInterval = 60000; //10 sec wdt_reset(); Serial.println("wdt reset"); updateLocalSensor(); diff --git a/functions.pde b/functions.pde index 3b559bd..329aba8 100644 --- a/functions.pde +++ b/functions.pde @@ -33,38 +82,35 @@ void useEthernet(){ if (client.connect()) { Serial.println("connected"); - int content_length = length(analog1) + length(analog2) + length(analog3) + 2 ; - //this line is to count the lenght of the content = lenght of each local sensor data + "," - //in this case we have 3 data so we will need 2 commas + int content_length = length(analog1); - client.print("GET /api/feeds/"); + client.print("GET /v2/feeds/"); client.print(REMOTEFEED); client.println(".csv HTTP/1.1"); - client.println("Host: www.pachube.com"); + client.println("Host: api.pachube.com"); client.print("X-PachubeApiKey: "); client.println(APIKEY); - client.println("User-Agent: Arduino (Natural Fuse v`1.1)"); + client.println("User-Agent: Arduinonioni"); client.println(); - client.print("PUT /api/feeds/"); + client.print("PUT /v2/feeds/"); + client.print(REMOTEFEED); + client.print("/datastreams/"); client.print(LOCALFEED); client.println(".csv HTTP/1.1"); - client.println("Host: www.pachube.com"); + client.println("Host: api.pachube.com"); client.print("X-PachubeApiKey: "); client.println(APIKEY); - client.println("User-Agent: Arduino (Natural Fuse v1.1)"); + client.println("User-Agent: Arduinonioni"); client.print("Content-Type: text/csv\nContent-Length: "); client.println(content_length); client.println("Connection: close"); client.println(); |
And finally, some less-geeky perspective: This device is indeed serving a purpose as a temperature sensor for my chicken coop, but mostly I’m using it as a learning platform to experiment with outdoor sensors. I’ll eventually be deploying similar sensors in hoop-houses to help my farmer friends monitor efficiency and better plan their growing.
I forgot one other thing: there was a third benefit to stumbling upon Pachube: I found another garden sensor experimentor!!! They really had it figured out, and it drastically shifted my plans. See their sensor system here: http://www.pachube.com/feeds/12401 with photos here:http://picasaweb.google.com/ryanferreri/HoopHouses#. I’d never heard of the JeeNode equipment before, and it seems to be absolutely perfect for low-cost wireless sensors… and they’re so nice and skinny… could just stick em right in some PVC pipe… oh the possibilities! The U.S. JeeNodes transmit in the 900ish-MHZ spectrum. I can’t wait to set up a test system… the rough plan would be a network of a few JeeNodes, each placed on the edge of a hoop house with one sensor inside and one outside. They would transmit back to a wifi router that would serve as the web uplink. I have to find a low-power wifi router with an on-board USB chip…
But for now, my only sensor resides in that chicken coop. Future plans: a relay switch for the coop’s light, for remote control / timer capabilities. Gotta maximize that layer productivity.
The public voting period for this year’s FACT Social Justice Challenge ends this Friday! Read about how to vote on projects — unfortunately it’s a bit complicated. I should’ve written up a grant to improve their website.
There are two interesting Detroit projects, as well as a few other cool ones, that I would like to promote:
Thanks for voting!
Loving, Graceful Machines to Watch Your Chickens With
It’s gotten cold in Detroit again, and the chickens need the usual TLC: more food, more straw, heated water dispensers, and active heating inside the coop. In previous years we’ve used a single incandescent lightbulb to keep the coop at a hospitable temperature, but this year, we’re trying something different: we’ll use an infrared heat lamp along with a daylight-simulating incandescent lamp. The heat lamp can stay on all night and not bother the birds — inconsistent lighting might have a bad impact on the birds’ health. The incandescent lamp should turn on at the pre- and post-crepuscular hours at dusk and dawn to add a bit of daylight and keep egg production up.
You may remember last year when I posted about the chicken sensor, an arduino with a temperature sensor and an ethernet shield that attached to a wireless mesh node. After the weather got warm enough, I decommissioned the chicken sensor and haven’t touched the arduino platform since. Now it is time for me to jump back into the open source embedded systems fray: either I hack together a system to toggle these lamps and monitor temperature, or my neighbors and I are going to have to run out to the coop during those crepuscular hours and fumble around with electrical switches while getting our hands pecked off by feisty young hens.
So, in the interest of avoiding bloody pecked-up hands, I’ve planned out an upgraded chicken sensor: one could call it v0.2.0 or one could call it by the codename “All Watched Over By Machines of Loving Grace.” I chose this codename because it describes how the chickens will feel.
Remote Control
I’m glad that I have taken my time with the JeeNode: while searcing through the wiki I came across a few shiny gems of projects. The shiniest by far is JeeMon. I was initially planning on writing a little node.js server to listen for temperature packets and post them somewhere on the internet, but JeeMon is a much more full and exciting solution… and an excuse to improve my tcl skills (I’ve done some quick expect scripts before but that’s it). This blog post at jeelabs has a good introduction and quickstart.
So far, JeeMon seems like a winner of a platform for DIY network physical computing projects. It’s backed by a great programmer who develops great hardware. Tcl has some nice text processing features — so much of the work in this type of project is sucking information out of sometimes-garbled strings. Its event-driven-ness makes sense with random bursts of radio-transmitted information. Finally, although it has a lot of examples dealing with the jeenode world of things, it is not at all tied to a specific platform or network technology.
Toolchains
The Arduino IDE is very, very integrated: all of the required libraries for compiling are included within the distribution. This makes it nice and easy for people to get started with Arduino, and it also makes it easier to run multiple virtual environments of different versions of the IDE. It has some built-in features to let you use your own text editor, but it’s still pretty clumsy. For past projects I’ve had to run avrdude with non-standard options to flash a device; I ended up finding where the IDE would put the compiled .hex file during the build and upload it manually. This was a pain.
I started looking around the internet for alternative build methods for arduino programs and didn’t really come up with much; there are a lot of one-off projects (see links below) but all of them rely on a forked version of the Arudino libraries, or even a partial set of those libraries. This makes development really tricky, especially if you’re including non-standard libraries.
I’d love to see the Arduino IDE expose some of the development processes via the commandline. Another option might be to do an scons setup that uses the arduino IDE’s hardware/arduino/boards.txt as a reference.
What’s next
I’m going to continue tinkering with this stuff. Expect more posts as I learn.
One experiment I’m anxious to try out is to hook a JeeLink to an OpenWRT router and run jeemon right from the router. This might make a good addition to the community wireless toolkit we’re building at The Work Department.
Notes
When using the arduino sdk to push code to a jeenode, you generally need to set serial.debug_rate to 57600 in your ~/.arduino/preferences.txt
Check your soldering on the jeenode using the voltages listed in the link below. I messed up the RST -> capacitor connection which caused unreliable uploads but didn’t interfere with anything else… kinda hard to track that one down
Links
Toolchain (your mileage may vary)
“create your own arduino ide!”: http://pragprog.com/magazines/2011-04/create-your-own-arduino-ide
forum topic about makefiles: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284144128
arduino-makefile fork on github: https://github.com/pix/arduino-makefile
fix math.h compile error: http://forums.reprap.org/read.php?146,107925,107925,quote=1 (in short, add an #undef round before round is defined in avr’s math.h)
oh, this is nice: http://www.tmpsantos.com.br/en/2010/12/arduino-uno-ubuntu-cmake/
JeeNode
check board voltages against these values: http://forum.jeelabs.net/comment/3728#comment-3728
random weird project: http://engin1000.pbworks.com/w/page/37615506/RF%20Locator
Thermometers
library to read DS1820 sensors: http://milesburton.com/Dallas_Temperature_Control_Library#Example
a nice DS18B20 setup that I’m using: http://www.makershed.com/Waterproof_DS18B20_Digital_Temperature_Sensor_Ex_p/mkad37.htm
JeeMon
home: http://jeelabs.net/projects/cafe/wiki/jeemon
intro: http://jeelabs.org/2011/11/25/jeemon-for-early-birds/