Get notified when an appointment opens up at one of your favorite NC DMV locations.
The new NC DMV system is designed to circumvent automated queries. To stay maintainable and under the radar, this script requires you to define exactly which sites you are interested in.
- Go 1.19 or newer
- curl
- This probably works on pretty much anywhere, but only tested on macOS so far
go install github.com/tstromberg/ncdmv-appointment-notifier@latest
ncdmv-appointment-notifier
It's that easy! There are a number of flags for tuning the behavior of this program:
--max-notify-days
: only notify if a reservation is available within this many days (default 30)--refresh-delay
: how long to wait between refreshes if no matching appointments are found (default 9m0s)--found-delay
: how long to wait between refreshes if a matching appointment is found (default 1h0m0s)--run-command
: alert command to run (must accept a string argument) (default "say")--sites-directory
: path to sites content (default "sites/")
On macOS, Linux, and Windows, this program will generate a desktop notification:
If your computer has the "say" command installed (macOS), ncdmv-appointment-notifier will also speak the contents of the notification out loud. You can use --run-command
to set an alternative tool, such as espeak
.
There is also useful logging output for diagnostics:
checking sites/carrboro.txt ...
"sites/carrboro.txt" returned 163988 bytes of data
next appointment for "Carrboro" is 2022-12-29 00:00:00 +0000 UTC (85 days)
checking sites/graham.txt ...
"sites/graham.txt" returned 164279 bytes of data
next appointment for "Graham" is 2022-12-02 00:00:00 +0000 UTC (58 days)
Graham has an appointment available at 2022-12-02 00:00:00 +0000 UTC!
Sending alert: Next appointment for Graham is in 58 days
Running say ...
checking sites/hillsborough.txt ...
"sites/hillsborough.txt" returned 105888 bytes of data
next appointment for "Hillsborough" is 2022-12-20 00:00:00 +0000 UTC (76 days)
Hillsborough has an appointment available at 2022-12-20 00:00:00 +0000 UTC!
Sending alert: Next appointment for Hillsborough is in 76 days
Running say ...
checking sites/raleigh-west.txt ...
"sites/raleigh-west.txt" returned 105822 bytes of data
"Raleigh West" has no appointments available
checking sites/siler-city.txt ...
"sites/siler-city.txt" returned 105878 bytes of data
next appointment for "Siler City" is 2022-12-02 00:00:00 +0000 UTC (58 days)
Siler City has an appointment available at 2022-12-02 00:00:00 +0000 UTC!
Sending alert: Next appointment for Siler City is in 58 days
Running say ...
Sleeping for 7m0s ...
To define which offices you are interested, you will need to modify the contents of the sites/
subdirectory. Out of the box, this program comes with a couple of sample sites (Carrboro, Hillsborough, etc).
To program a site, you will need to create a text file in the sites/
subdirectory containing the appropriate request data.
- Visit https://skiptheline.ncdot.gov/
- Select your appointment type and location - when you see a Calendar view, you are on the right page.
- Click the "Hamburger menu" on the top-right of the browser
- Select "More Tools"
- Select "Developer Tools"
- Click the "Network" tab
- Reload the page
- Right click on the first entry
- Select "Copy" then "Copy as cURL"
- Paste the contents into a text file in this directory.
- Visit https://skiptheline.ncdot.gov/
- Select your appointment type and location - when you see a Calendar view, you are on the right page.
- Click the "Hamburger menu" on the top-right of the browser
- Select "More Tools"
- Select "Web Developer Tools"
- Click the "Network" tab
- Reload the page
- Right click on the first POST entry
- Select "Copy Value" then "As cURL"
- Paste the contents into a text file in this directory.
NOTE: The request data generated by Firefox is ocassionally corrupt. If the site returns 0 bytes of data, try again with Chrome.