NYC ASP Parking Bot

Automated Slack notifications for NYC Alternate Side Parking strategy.

šŸ”— View Source Code on GitHub

What This Val Does

This Val runs every hour and sends you strategic Slack notifications about NYC Alternate Side Parking:

  • Sunday 5 AM: Weekly parking strategy with visual calendar
  • Mon-Thu 10 AM: Move reminders when you need to switch sides
  • Mon-Fri 5 AM: Emergency alerts for unexpected ASP suspensions

Configuration

Required Environment Variables

Set these in the Val Town UI:

Optional Environment Variables

Cleaning Schedule:

  • NEAR_SIDE_DAYS (default: Mon,Thu) - Days when your home side has cleaning
  • FAR_SIDE_DAYS (default: Tue,Fri) - Days when opposite side has cleaning
  • CLEANING_START_TIME (default: 09:00) - When cleaning starts
  • CLEANING_END_TIME (default: 10:30) - When cleaning ends
  • NEAR_SIDE_EMOJI (default: šŸ”) - Emoji for your home side
  • FAR_SIDE_EMOJI (default: 🌳) - Emoji for opposite side

Testing/Development:

  • FORCE_RUN - Override scheduled run times for testing:
    • Leave empty/unset for normal operation
    • Set to move to force 10 AM move reminder check
    • Set to summary to force weekly summary generation
    • Set to emergency to force emergency suspension check
    • Remove this variable for production use!

How It Works

  1. Fetches NYC's official ASP suspension calendar (ICS)
  2. Scrapes NYC DOT website for emergency suspensions
  3. Analyzes your weekly parking schedule
  4. Sends strategic Slack notifications at key times

Deployment

This code is auto-generated from the source repository.

Do not edit index.ts directly - changes will be overwritten on next deployment.

To contribute or modify:

  1. Clone the GitHub repo
  2. Edit files in src/
  3. Run bun run deploy to build and push

Schedule

āš ļø IMPORTANT: Cron Schedule Configuration

This val should run with cron schedule: 10 * * * * (every hour at 10 minutes past the hour)

After deploying, verify the schedule is set correctly:

Val Town deployments may reset your cron schedule. Always check after deployment:

  1. Option 1 - Automated (Recommended):

    bun run set-schedule

    Requires VAL_TOWN_API_TOKEN in .env with "Vals: read and write" permissions. Create token at: https://www.val.town/settings/api

  2. Option 2 - Manual:

    • Open your val in the Val Town UI
    • Click the cron schedule selector in the top right
    • Set to: 10 * * * *

License

MIT - See GitHub repository for details