AWS Builder Center
SuryaWatch: telling smog, dust and faults apart on India's rooftop solar with AWS

SuryaWatch: telling smog, dust and faults apart on India's rooftop solar with AWS

India has subsidised rooftop solar on over 50 lakh homes, but owners can't tell whether low output is smog, dust or a fault. Here's how our team built SuryaWatch in four days at Environmental Hacks 2026 with AWS Lambda, Amazon Bedrock (Amazon Nova), DynamoDB and EventBridge Scheduler: the problem, the stack, and what fought back.

Every October, the sky over Delhi turns a dull grey. A rooftop solar system near us sits under that haze, and its inverter has one small two-line display: power, today's units, lifetime units and a status message. We photographed it and asked a simple question: is today's number good or bad? If it's low, is it the smog, dust on the panels, or something broken?
Nobody in the house could say. That question became SuryaWatch, our project for Environmental Hacks 2026 (WeMakeDevs × AWS), Track 03: Waste and Energy. This post covers the problem, the stack, and what fought back.

The problem: solar is booming, but nobody checks it

  • India has subsidised rooftop solar on over 50 lakh homes under PM Surya Ghar, with a target of 75 lakh by December 2026.
  • Dust and air pollution cut Indian solar output by 17–25% (a Duke University study done at IIT Gandhinagar). Delhi's October–November smog is the worst case.
  • On the inverter, three different causes look exactly the same: smog (nothing to fix), dust (clean the panels) or a fault (call the installer). So owners clean too often, too rarely, or miss a fault for weeks.
  • Families who haven't installed yet get stuck on the basics: what size, what it really costs after subsidies, and how fast it pays back.

What we built

SuryaWatch is a free web and Android app, in English and Hindi, with no extra hardware: just a phone.
  • Plan (for a home without solar): draw your roof on a satellite map and add your electricity bill, or a photo of it. You get the system size in whole 550 W panels, the cost after PM Surya Ghar and Delhi subsidies, the monthly saving and the payback.
  • Watch (for a home with solar): photograph the inverter display. AI reads it, and SuryaWatch compares it with what that day's real sunlight allowed. It then says whether the panels are working well, it was a smog day, it's time to clean them (with the rupees lost per week), there may be a fault, or the whole area dipped.
  • An evening email alert, a printable installer report, and a public Impact page with totals only.
Plan promises a number of units a year. Watch makes sure you actually get them.

How SuryaWatch decides

The AI never decides anything. It only reads the numbers off the photo, and plain, testable maths does the rest:
  1. Sunlight allowed: that day's measured sunlight on the panels' own tilt (Open-Meteo), times the system size, corrected for heat.
  1. Take out the haze: we estimate the smog loss from the air's aerosol optical depth (AOD):  haze = 0.25 × (AOD − 0.4) , kept between 0% and 40%.
  1. Make the numbers add up: performance + generation shortfall = 100%, and the shortfall splits into a haze share and a panel share.
  1. The verdict:
  • a fault message on the display, or a sudden drop below 60% of recent days, means a fault;
  • 92% or more of what the hazy sky allowed is healthy, and a smog day if haze cut 8% or more;
  • below that, it's dust after 3 or more days without rain or a cleaning.
  1. Ask the neighbours: if most SuryaWatch rooftops within 5 km dipped the same day, it's the sky, not your panels, so no cleaning alert is sent.
For example, on one sample dusty day the panels made 79% of what the sunlight allowed. Of the 21% shortfall, 2% was haze and 19% was the panels, costing about ₹112 a week. Verdict: clean them. Even better, SuryaWatch learns how fast dust builds up on your roof. It then picks the cleaning interval that keeps "dust loss + cleaning cost" lowest (T = √(2C/r)), and tells you to wait if rain is coming.

The stack

Everything is serverless, and the whole thing is defined in one AWS SAM template (about 150 lines).
[Insert image: architecture.png. Caption: "SuryaWatch on AWS"]
  • AWS Lambda (Python 3.12, arm64): the solar engine. One function serves the app; a second runs the evening check. The backend uses only the standard library, plus the boto3 that's already in the runtime.
  • Amazon API Gateway (HTTP API): the one endpoint the web and Android app call.
  • Amazon Bedrock (Amazon Nova 2 Lite): reads inverter displays and electricity bills from photos, and answers questions in English and Hindi.
  • Amazon DynamoDB: one table for rooftops, readings, verdicts and settings.
  • Amazon S3: a private bucket for inverter photos. Bill photos are never stored.
  • Amazon EventBridge Scheduler + Amazon SNS: a 7:30 PM IST check, then email alerts. A filter policy per rooftop means each owner gets only their own alerts.
  • AWS Amplify Hosting: serves the web app.
Our favourite small thing was that the scheduler understands Indian time directly:
YAML
Events:
EveningCheck:
Type: ScheduleV2
Properties:
ScheduleExpression: cron(30 19 * * ? *)
ScheduleExpressionTimezone: Asia/Kolkata
We deploy from AWS CloudShell, which already has the SAM CLI, AWS CLI, git and Python, and is already signed in. No access keys ever touch a laptop.

What fought back

1. Smog and dust look identical. A 20% drop could be either. Separating them with AOD data was the core idea, and the neighbourhood check became our second opinion.
2. Bedrock model IDs. Amazon Nova 2 Lite is called through a cross-region inference profile ( us.amazon.nova-2-lite-v1:0 ), not the plain model ID. The error for a wrong ID didn't make that obvious. The Converse API saved us: it uses the same request format for every Nova model, so falling back to the next model is a short loop (simplified from our  reader.py ):
Python
MODELS = ["us.amazon.nova-2-lite-v1:0", "us.amazon.nova-lite-v1:0", "us.amazon.nova-pro-v1:0"]
for model in MODELS:
try:
resp = bedrock.converse(
modelId=model,
messages=[{"role": "user", "content": [
{"image": {"format": "jpeg", "source": {"bytes": photo}}},
{"text": prompt}]}],
inferenceConfig={"temperature": 0})
return parse(resp)
except ClientError as e:
if e.response["Error"]["Code"] in ("AccessDeniedException", "ValidationException",
"ResourceNotFoundException"):
continue # try the next model
raise
3. Reading a tiny LCD from a phone photo. Glare, angles, and two numbers that look alike (today's units and lifetime units). The owner confirms every reading before it's saved, unreadable digits are left blank instead of guessed, and the photo's own clock gives the reading's time.
4. When is a day over? Inverters switch off near sunset, so the last photo is often taken before 6 PM. A reading counts as final after 6 PM, or once 97% of the day's expected sunlight has passed.
5. Amplify without Git. Publishing a static site without a Git connection takes three API calls: create a deployment, upload a zip to a presigned URL, then start the deployment. We scripted it into our one-command deploy.
6. Testing without AWS. Bedrock can't run locally, and  sam local  needs Docker, which is heavy on student laptops. So we wrote a small local server with a mock-AI mode and 103 automated tests.
7. Numbers people actually understand. Our teammates pushed back on our first screens. Percentages must add up to 100, "panel loss" became "generation shortfall", and Plan now sizes in whole panels (3.3 kW, not "3"). It was better because they said so.

What's next: an Arduino on the roof

Photos work for anyone today. Next is a low-cost Arduino sensor kit that sends readings to SuryaWatch through AWS IoT Core every 5 minutes:
  • a CT-clamp energy meter on the inverter's output;
  • two small reference solar cells, one kept clean and one left dusty, so dust loss is measured directly;
  • panel temperature and PM2.5 sensors;
  • optionally, a valve that rinses the panels on the best day to clean.
The same Lambda engine handles it unchanged.

What we learned

  • Serverless plus one SAM template let a four-person student team, new to AWS, ship a real product in four days.
  • Let AI read, and let maths decide. Every verdict can be explained and tested, and that matters when you tell someone to spend money on cleaning or call an installer.
  • The best feedback came from our own teammates, looking at the screens like users would.

Team and tools

Aryan Nirala (idea, code, solar law), Agrim Chaturvedi (AWS deployment, video), Prakhar Srivastava (front-end design, writeup, README, review) and Anshu Dhaka (data collection, backend, domain expertise).
We built SuryaWatch with Claude (Anthropic) as our AI coding assistant. Amazon Nova on Amazon Bedrock is the AI inside the app.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article