Bascule Relief
I built a tool for determining if the Hamilton Avenue Bridge over Brooklyn’s Gowanus Canal is open or closed, in real-time. You can determine for yourself if the bridge is open or closed at hamiltontraffic.com, or read on to learn all about my very unhinged obsession with this very hinged drawbridge.
But first, here’s a short time-lapse video of the Hamilton Avenue Bridge opening and closing, taken early one morning this spring while I was stuck waiting for it (a not uncommon occurrence — though I seldom get a front-row seat):

The Hamilton Avenue Bridge is the southernmost of five bridges that cross the Gowanus Canal, the wonderful and reviled Superfund site that’s sandwiched between South Brooklyn‘s somewhat tonier neighborhoods of Park Slope and Carroll Gardens. It’s not the most glamorous span across the canal — that award must go to the landmarked Carroll Street Bridge, a wooden span built in 1889 and one of only four remaining retractile bridges in the United States. But the Hamilton Avenue Bridge is unquestionably the canal’s hardest-working and most heavily-trafficked span.
I had a lot of time to think about this on that spring morning while waiting for the bridge to come down.
For those of us who often travel by car from central Brooklyn, the Hamilton Avenue Bridge is a well-known nuisance. If it’s open, it can easily add 15 minutes of delay to your trip. And given street geometry and sightlines, there’s no real way to see if the bridge is open until you’re too close to it to re-route your journey:

It’s hard to predict the bridge’s status and equally hard to avoid it. The span opens irregularly, two or three times a day, upon request by the commercial tugboats that ply the rapidly-gentrifying canal. (Usually this is due to the maritime activities of the concrete plant and scrapyard just north of Hamilton Ave, or the Superfund remediation currently happening up-canal.)

It’s also hard to avoid the bridge! Hamilton Avenue is a key artery for anyone traveling to/from/around neighborhoods like Gowanus, Red Hook, or Carroll Gardens, trying to head to Manhattan through the Brooklyn-Battery Tunnel, or trying to get onto the Brooklyn-Queens Expressway. According to the Automated Traffic Volume Counts dataset on NYC Open Data, the eastbound stretch of this six-lane artery sees as many as ~6,700 cars in a single hour of peak traffic. With the bridge closed to traffic for ~15 minutes two or three times a day, often during rush hour… that’s a lot of cars sitting in traffic! (According to the US Department of Energy, idling a vehicle wastes between 0.3 – 1.0 gallons of fuel per hour, depending on the vehicle’s size and class. Using some very questionable back-of-the-envelope math, that suggests that each time the bridge goes up at rush hour, the ~3,350 cars and trucks waiting on Hamilton Ave burn as much as ~554 gallons, dumping ~11,080 lbs of CO2 into the environment. That’s slightly more than the average gasoline-powered car emits in a year of driving, all in 15 minutes of wasted time.)
All of that, just to let little tugs like the Washington (seen here transiting the Ninth Street Bridge on its way down to Hamilton) pass by!
OK. I’m not a science communicator or a traffic engineer. I’m just a lil guy who likes to get the occasional breakfast sandwich at Court Street Grocers and sometimes (shamefully) drives there. I don’t want to waste 15 minutes. I’m hungry. There must be a better way, I thought.
Turns out there are many, many ways to approach this problem.

I wound up exploring and rigging up four completely distinct approaches, which I’ll discuss in turn. (Tl;dr: I’m only using the tilt sensor at present!)
- Analyzing traffic cam footage
- Monitoring marine AIS traffic
- Listening to VHF radio announcements
- Rigging a tilt sensor
1. Analyzing traffic cam footage
The city and state DOTs operate a bunch of publicly-accessible traffic cameras at major intersections around town, but I was frustrated to learn that the closest cameras are mounted JUST outside of view of the bridge. (N.b.: as of 6/21/2025, these two cameras have been offline for a couple of weeks. I’m assuming that’s because of nearby construction, and not in response to my Replit scripts hammering their server!)
To get this working, I set up a script that took a photo of the camera closest to the bridge every 2 minutes, and then diff’d them. (An earlier version attempted to use YOLO and SAM 2 to segment and track vehicles in the photos, but this had a lot of overhead.) The theory is that if the two photos are ≥90% similar, it probably means the bridge is up and the cars on the road are just idling. This worked pretty well, and as a bonus I was able to send the traffic cam frames to my phone via rich push notifications! But it wasn’t quite good enough. After all, there’s a bit of a delay. You won’t know the bridge has gone up until at least 2 minutes after an opening has been triggered. Plus, diff’ing the photos can yield false positives if the roadway happens to be empty in both frames.

We can do better!
2. Monitoring marine AIS traffic
For the most part, one can infer a likely bridge opening simply by looking for any commercial vessel close enough to the bridge. And every commercial vessel transmits tons of information about themselves, including their location and heading, every minute or so via a tracking system called AIS. Anyone can decode AIS signals via VHF (if you’re nearby), but if you want to look at a wider area you’re better off using an API. MarineTraffic has this market cornered, but their API is pricey. Fortunately, aisstream.io exists, transmitting geofenced AIS reports in realtime via websocket! I have a Python listener that tracks every AIS-reporting vessel located in the Gowanus Canal or Gowanus Bay, and by using a very tight geofence I can reliably anticipate bridge openings.

This works super well, but the timing is suboptimal. Vessels generally get priority when they request an opening, but they may have to sit and wait at the bridge for a while before it goes up. So knowing there’s a boat in the water isn’t the same thing as knowing exactly when the bridge is going up, it’s just a very strong signal.
We can do better!
3. Listening to VHF radio announcements
Bridge openings are requested by tugboat operators by hailing the bridgetender over VHF radio, tuned to channel 13. This is the only surefire way to know in advance that the bridge is about to go up. But how to access these transmissions?
This question yielded a quick answer that sent me down a very deep rabbit hole: software-defined radio (SDR).
It turns out that USB dongles that can tune into VHF radio transmissions are cheap and plentiful; a device called the RTL-SDR is a super common and well-supported entrypoint.
The thing is, ship-to-ship (and ship-to-bridge) transmissions over channel 13 are, by design, very low-power. When you’re on the water, you want to be able to hail the boat right in front of you without lighting up every captain’s radio in New York Harbor. This makes a ton of sense but made it super hard for me to tap into.
I did a bunch of reconnoitering and eventually made arrangements with two Gowanus institutions, Big Reuse and the Gowanus Dredgers Canoe Club, to install small radio receivers at their locations along the canal:

All of a sudden, I could tap into every nearby radio transmission, from commercial FM to NOAA weather reports to MTA and NYPD police feeds to maritime VHF! The RTL-SDR is pretty easy to use, but figuring out the optimal conditions for the receiver has been challenging. I spent a long time messing with a Pi Zero 2, but these seem to suffer from major RF interference. Eventually I swapped them out for Pi 3A models which have worked much, much better. I’ve also thrown a lot of time and money at things like commercial FM bandstop filters, LNA amplifiers, and antennas of every shape and size. It’s still a work-in-progress, but at this point I’ve got a pretty functional setup, using RTLSDR_Airband to scan for and record every audible marine-band transmission in proximity of my receivers. These transmissions get saved as wav files, which I then transcribe via gpt-4o and then push to my phone using the push notification platform ntfy.sh. (Pushover has much better iOS support, but doesn’t support audio file attachments!)
This is super fun and works pretty well. In fact, it’s the only way to know in advance that the bridge will shortly go up. But audio quality is hit-or-miss, two-second VHF transmissions are hard for gpt-4o-transcribe to properly contextualize, and Brooklyn tugboat captain accents are thick — all of which means that LLM transcription isn’t always reliable.

I’ve repurposed the VHF receivers to support another Gowanus Canal data visualization project that I’m excited to share soon, but in the meantime…
…we can do better!
4. Rigging a tilt sensor
As soon as I started working on this project I fell in love with the idea of just sticking some DIY sensor on the bridge that would alert me when it’s going up. But I couldn’t imagine a way to do this without a ton of overhead. Avoiding storms, vandalism and rapidly-depleted batteries seemed like way too much to conquer.
Then I discovered LoRaWAN.
LoRaWAN is a long-range wireless protocol that excels at a very specific type of thing that happens to be exactly what I needed: sending small bits of data wirelessly over far distances with very low power usage. Plus, there’s a robust and growing network of devices that support it! You don’t even need to set up your own gateway; the mesh of receivers in NYC is ample.
I came across the SenseCAP T1000-E by Seeeed Studios. The T1000-E is a credit-card LoRaWAN device that offered a 6-axis accelerometer, months of battery life and an IP65 waterproof rating. Stuck in a magnetic waterproof box and affixed inconspicuously to the bridge, it was the perfect solution.

Out of the box, the T1000-E supports Meshtastic (a decentralized peer-to-peer LoRa protocol), but the device is open-source and can be flashed with custom LoRaWAN firmware. Fortunately Seeed provides plenty of useful examples, one of which demos transmitting the accelerometer’s readings. That’s all I needed to get a simple tilt sensor working. (I did have some issues with the gateway losing its connection after ~4-5 days, but I made some small alterations to the script so it would call a reboot command after every n data uplinks which has been a perfectly fine workaround.) My tracker is connected to a gateway running on The Things Network, and since the LoRaWAN protocol allows me to see the name of any gateway I’m connected to, I’ve learned that it mostly connects to a gateway about a mile up-canal that is operated by FloodNet, a program that’s deployed LoRaWAN sensors around the city to monitor real-time urban flooding. That’s super cool.
With The Things Network and a custom payload formatter for the sensor firmware I’m using, I can record my sensor data to a database using TTN’s webhook support, each time a new reading comes in (every minute). Amazingly, it’s been running for about two weeks, and claims to have 90% battery remaining!
If the tilt sensor indicates that the bridge is going up, I get a push on my phone alerting me, thanks to a workflow I set up using The Things Network’s API and Apple’s incredible Shortcuts app. You can see it in action here:

If you’re an iOS user and would like to get notified about the Hamilton Avenue Bridge’s status next time you’re cruising down the Prospect Expressway, you can simply import this file into Shortcuts, then set up a geofenced Automation in the app that’s triggered whenever you’re nearby! (I use the intersection of the Prospect Expressway and 4th Avenue — the perfect amount of time to get the data before having to make a quick up-or-down decision while driving.)
A closing note about the bridge’s uniqueness. The Hamilton Avenue Bridge is one of only four Hanover knee-girder skew bascule bridges made. It’s a “skew” bascule because Hamilton Avenue does not cross the Gowanus Canal at a right angle; the awkward approach required some unique engineering. (There’s a great write-up by the engineering firm Hardesty & Hanover here [pdf]!)

I did some sleuthing and learned that Hardesty & Hanover built only three other Hanover skew bascules, all in Florida, after Clinton D. Hanover left the NYC Department of Public Works and joined the firm in 1945. Two of them crossed the Miami River and have since been removed. The only surviving sibling to the Hamilton Avenue Bridge is the Boca Inlet Bridge [pdf]. I was nearby last week, so naturally I had to make a special pilgrimage to it.
The Boca Raton Inlet is a little snazzier (and far more snorkel-able) than the Gowanus Canal and the bridge spans a much smaller two-lane roadway… but when that bridge went up, I felt like I was right at home.
