Inspiration
In Sri Lanka, most houses get wired from a rough sketch and the electrician’s experience. Homeowners rarely see a layout before work starts. We wanted to see how far we could get in a hackathon: could a tool take a floor plan and produce a reasonable first draft of where the lights, switches and sockets should go, using real rules instead of guesswork?
What it does
Lumira is a floor-plan editor with an AI-assisted Suggest wiring flow:
Import a plan. Accepts PNG, JPG, PDF, SVG or DXF. DXF keeps its real scale. For images, you set the scale by clicking two points and typing the distance. Find and name rooms. OpenCV detects the rooms, then an LLM vision agent labels each one (bedroom, kitchen, bathroom…) with a confidence score. Rooms it isn’t sure about are flagged, and you confirm, correct or reject every suggestion. Lights, switches and sockets. Calculated per room from a rule profile: light count from the lumen method, a switch next to the door, and a socket count based on room size. You preview the layout before it’s placed. Appliances. Add ACs, water heaters, pumps and kitchen appliances. An AC is sized from the room’s area, and each appliance gets an outlet on the plan with a suggested breaker and cable size. Maximum demand. Estimates the whole-house load and warns you if it goes over a typical 30 A single-phase main switch.
You can also draw rooms and place 12 types of electrical symbol by hand.
It’s a design aid only. A qualified electrician or engineer must review the output.
How we built it
We built Lumira in Jac using JacHammer, with a Jac client frontend. The project is a graph of Project → Level → Room → Device. Room detection uses OpenCV. Room naming uses Jac’s by llm() with a typed output and a look_closer tool that lets the model zoom into one room.
The key design decision: the LLM only names rooms; it never produces numbers. Every count, current and breaker size comes from plain functions reading a JSON rule profile. That profile is based on BS 7671 and adapted for Sri Lanka (230 V, TT earthing). We wrote tests for the layout and load calculations.
Challenges we ran into Room detection broke easily. Door openings merged rooms, and text and dimension lines split them. Separating thick wall lines from thin drawing lines fixed most cases, but unusual plans can still confuse it. The AI misreads labels sometimes, especially handwritten ones. Rather than hide that, we show its confidence and make the user confirm every room. Finding trustworthy rule values was hard. Many numbers in our profile come from secondary sources or general knowledge, so we tagged every value with how much it can be trusted instead of presenting it as fact. Accomplishments that we’re proud of The full flow from plan → rooms → lights and sockets → appliances → demand check works end to end. Every calculated number can be traced to a rule and a trust tag. The app never says a design is “safe” or “compliant”. What we learned
Computer vision is better at finding shapes and LLMs are better at reading meaning, so splitting the work between them worked far better than asking one to do both. We also learned that wiring rules are much harder to pin down than we expected.
What’s next for Lumira
The app has several features that are planned but not built yet:
Grouping points into circuits, with a consumer unit schedule Voltage-drop checks A materials list with costs in rupees Editing the design by typing requests to the “Ask AI” box PDF export Wall drawing and keyboard shortcuts in the editor Having engineers verify the rule values
Log in or sign up for Devpost to join the conversation.