Monitor your Generac generators and propane tank monitors with AWS EventBridge, Lambda, and receive notifications via SNS or SES when status changes occur.
This project is adapted from the ha-generac Home Assistant integration, repurposed as a standalone AWS service focused on status monitoring and notifications.
- Automated Monitoring: Periodic checks of generator status via AWS EventBridge
- State Tracking: Stores previous state in DynamoDB to detect changes
- Flexible Notifications: Send alerts via SNS or SES (email)
- Comprehensive Alerts:
- Generator status changes (Ready, Running, Exercising, etc.)
- Connectivity changes
- Maintenance alerts
- Warning conditions
- Low battery voltage
- Configurable: Customize check frequency and notification preferences
- Infrastructure as Code: Deploy with AWS SAM
EventBridge Schedule (every 5 min)
↓
Lambda Function
↓
Generac API (MobileLink)
↓
DynamoDB (state storage)
↓
SNS/SES (notifications)
- Generac MobileLink Account: Active account at https://app.mobilelinkgen.com/
- AWS Account: With permissions to create Lambda, DynamoDB, EventBridge, SNS, and SES resources
- AWS SAM CLI: Install AWS SAM CLI
- Python 3.13+: For local development/testing
The Generac API requires authentication via a session cookie (username/password login is blocked by CAPTCHA):
- Log into https://app.mobilelinkgen.com/ and navigate to one of your devices
- Open browser Developer Tools (right-click → Inspect)
- Go to the Network tab and refresh the page
- Click the first request in the list (should match your device ID in the URL)
- In the Headers tab, scroll down to find the Cookie field
- Copy the entire cookie value (it will be very long, thousands of characters)
Important: Keep this cookie secure. Store it in AWS Secrets Manager or parameter store for production use.
git clone https://github.com/landonix/generac-aws-notifier.git
cd generac-aws-notifierStore your session cookie securely in AWS Secrets Manager:
aws secretsmanager create-secret \
--name generac-notifier/session-cookie \
--secret-string "YOUR_VERY_LONG_SESSION_COOKIE_HERE" \
--region us-east-1Important: Replace YOUR_VERY_LONG_SESSION_COOKIE_HERE with the actual cookie you copied from step 1.
# Build the application
sam build
# Deploy with your email configuration
sam deploy \
--guided \
--parameter-overrides \
SesToEmails="[email protected]" \
SesFromEmail="[email protected]"On first deployment, SAM will ask you questions:
- Stack name:
generac-notifier(or choose your own) - AWS Region:
us-east-1(or your preferred region) - Confirm changes:
Y - Allow SAM CLI IAM role creation:
Y - Save arguments to configuration:
Y
After the first deployment, you can simply run:
sam build && sam deployIf using SES in sandbox mode, you must verify recipient email addresses:
aws ses verify-email-identity --email-address [email protected]Check your inbox for a verification email from AWS.
| Parameter | Required | Default | Description |
|---|---|---|---|
SecretName |
No | generac-notifier/session-cookie |
AWS Secrets Manager secret name containing session cookie |
CheckSchedule |
No | rate(5 minutes) |
EventBridge schedule expression |
SnsTopicArn |
No | - | SNS topic ARN for notifications |
SesFromEmail |
No | - | From email address for SES |
SesToEmails |
No | - | Comma-separated recipient emails |
NotifyOnStatusChange |
No | true |
Enable status change notifications |
NotifyOnConnectivityChange |
No | true |
Enable connectivity notifications |
NotifyOnMaintenanceAlert |
No | true |
Enable maintenance alert notifications |
NotifyOnWarning |
No | true |
Enable warning notifications |
NotifyOnLowBattery |
No | true |
Enable low battery notifications |
LowBatteryThreshold |
No | 12.0 |
Battery voltage threshold (volts) |
Use rate or cron expressions for CheckSchedule:
rate(5 minutes)- Every 5 minutesrate(1 hour)- Every hourcron(0 */6 * * ? *)- Every 6 hourscron(0 8 * * ? *)- Daily at 8 AM UTC
View Lambda execution logs:
sam logs -n GeneracMonitorFunction --tailOr in the AWS Console:
- Go to CloudWatch → Log groups
- Find
/aws/lambda/generac-notifier-monitor
Test the Lambda function manually:
aws lambda invoke \
--function-name generac-notifier-monitor \
--payload '{}' \
response.json
cat response.jsonView stored device states:
aws dynamodb scan --table-name generac-notifier-device-stateSubject: Generator Alert: Home Generator
Your Generator has reported status changes.
Device: Home Generator
Serial Number: ABC123456
Changes:
• Status changed: Ready → Running
Current Status:
Status: Running
Connected: Yes
Battery: 13.2V
Timestamp: 2025-10-01T15:30:00Z
Subject: Generator Alert: Home Generator
Your Generator has reported status changes.
Device: Home Generator
Serial Number: ABC123456
Changes:
• Battery voltage: 13.1V → 11.8V
Current Status:
Status: Ready
Connected: Yes
Battery: 11.8V
Low Battery Warning
Timestamp: 2025-10-01T15:35:00Z
Approximate AWS costs (us-east-1, as of 2025):
| Service | Usage | Monthly Cost |
|---|---|---|
| Lambda | 8,640 invocations (5 min intervals) | < $0.01 |
| DynamoDB | On-demand, minimal storage | < $0.25 |
| EventBridge | 8,640 events | Free tier |
| SNS | 1,000 notifications | < $0.50 |
| SES | 1,000 emails | $0.10 |
| Total | < $1.00/month |
If you receive SessionExpiredException errors:
-
Get a new session cookie from Generac MobileLink
-
Update the secret in AWS Secrets Manager:
aws secretsmanager update-secret \ --secret-id generac-notifier/session-cookie \ --secret-string "NEW_COOKIE" \ --region us-east-1The Lambda function will automatically use the new cookie on its next run.
- Check Lambda logs for errors
- Verify notification settings in parameters
- For SES: Ensure email addresses are verified
- For SNS: Check topic subscription confirmation
If checks timeout with many devices:
- Increase Lambda timeout in
template.yaml(Globals → Function → Timeout) - Redeploy:
sam build && sam deploy
# Install dependencies
pip install -r requirements.txt
# Set environment variables
export GENERAC_SESSION_COOKIE="your_cookie"
export DYNAMODB_TABLE="test-table"
# Run tests
pytest tests/generac-aws-notifier/
├── src/
│ ├── __init__.py
│ ├── lambda_handler.py # Main Lambda entry point
│ ├── generac_api.py # Generac API client
│ ├── models.py # Data models
│ ├── config.py # Configuration
│ ├── state_manager.py # DynamoDB state management
│ └── notifier.py # Notification logic
├── tests/ # Unit tests
├── template.yaml # SAM template
├── requirements.txt # Python dependencies
└── README.md # This file
Remove all AWS resources:
sam deleteThis will delete:
- Lambda function
- DynamoDB table (data will be lost!)
- EventBridge rule
- CloudWatch log group
- IAM roles
This project is adapted from the ha-generac Home Assistant integration by @binarydev, which was originally forked from @bentekkie.
Special thanks to the contributors of the original project for reverse-engineering the Generac MobileLink API.
MIT License - See LICENSE file for details
This is an unofficial project and is not affiliated with, endorsed by, or connected to Generac Power Systems, Inc. Use at your own risk. The Generac MobileLink API is not publicly documented and may change without notice.