2.6 KiB
2.6 KiB
Docker Setup for UniFi Access Airbnb Integration
Quick Start
- Build and run continuously (checks every 6 hours):
docker-compose up -d
- Run once manually:
docker-compose --profile manual up unifi-access-airbnb-once
- View logs:
docker-compose logs -f
# Or check the logs directory: ./logs/unifi_access_airbnb.log
Configuration
- Config file: Edit
unifi.confon the host - it's mounted read-only into the container - Logs: Persistent in
./logs/directory - Timezone: Set in docker-compose.yml (default: America/New_York)
Automation Options
Option 1: Continuous Container (Recommended)
docker-compose up -d
Runs every 6 hours automatically. Change interval by modifying sleep 21600 in docker-compose.yml.
Option 2: Cron Job + Manual Container
# Add to crontab to run daily at 8 AM:
0 8 * * * cd /path/to/project && docker-compose --profile manual up unifi-access-airbnb-once
Option 3: Windows Task Scheduler
Create a scheduled task that runs:
docker-compose --profile manual up unifi-access-airbnb-once
Commands
- Stop:
docker-compose down - Rebuild:
docker-compose build - View container status:
docker-compose ps - Interactive shell:
docker-compose exec unifi-access-airbnb sh
Raspberry Pi Deployment
Compatibility
✅ Raspberry Pi 4/5 (ARM64) - Full support
✅ Raspberry Pi 3B+ (ARM32/ARMv7) - Full support
✅ Raspberry Pi Zero 2 W (ARM64) - Works but slower
Pi-Specific Setup
# 1. Install Docker (if not already installed)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi
# 2. Install docker-compose
sudo apt update
sudo apt install docker-compose-plugin
# 3. Clone and run your project
git clone <your-repo>
cd unifi-access-airbnb
docker-compose up -d
Performance Notes
- Pi 4/5: Excellent performance, recommended for production
- Pi 3B+: Good performance, slightly slower container startup
- Pi Zero 2: Functional but slower, consider running less frequently
Power Management
For reliable operation on Pi:
# Add to docker-compose.yml services section:
restart: always
deploy:
resources:
limits:
memory: 128M
Troubleshooting
- Check logs:
docker-compose logs unifi-access-airbnb - Test config:
docker-compose --profile manual up unifi-access-airbnb-once - Network issues: Ensure container can reach UniFi controller IP (10.0.1.20)
- Pi-specific: Check
docker --versionand ensure Docker is running:sudo systemctl status docker