Skip to content
Ali AhmedAI Solutions Engineer

Live production system

Solar or grid, switched from a phone and confirmed by the device.

STS is the smart automatic transfer switch I designed and built for Wattey Energy: remote, scheduled, and safe by design on industrial sites.

Head of Energy Systems & Product Engineering · Wattey Energy · Oct 2025 – present · Updated

The short version

Ali Ahmed designed and built STS, the Smart Transfer Switch, at Wattey Energy (formerly BijliBachao.pk), founded by Engr. Reyyan Niaz Khan. A controller fitted to a building’s existing solar/WAPDA changeover lets the owner switch by phone, on a daily schedule or automatically, and a switch is reported done only when the device’s own sensor confirms the new source.

  • Live production system
  • Three devices, one app
  • Installs on any phone
  • Private system · no customer named

Two products measure. STS acts.

Measuring tells a site where its electricity went. Control decides where it comes from. With Wattey Solar Performance Cloud and WattEY, STS completes one account of a site’s electricity, the job an energy management system does.

  1. Measure the solar

    Wattey Solar Performance Cloud

    What the site’s own solar produces, string by string.

    906 strings · 94 sites

    See Wattey Solar Performance Cloud
  2. Measure the grid

    WattEY

    What the site draws from the grid, and what it costs under the tariff.

    19 organisations · 1.92 GWh

    See WattEY
  3. Act

    STS

    Which source carries the load, switched on time and confirmed.

    Every switch confirmed

Until the switching is recorded, neither measurement can be attributed to the right source.

Figures as of 25 August 2026, from the Wattey Energy hub. I built all three products.

The changeover is still a lever on a wall.

Pakistan’s net-metering capacity rose from about 4 GW in 2024 to 5.3 GW by April 2025, and load-shedding still runs two to eight hours a day. Most of that solar sits behind the meter on homes and small businesses, where someone walks to a panel and flips the changeover by hand.

Sources: Renewables First, Pakistan Electricity Review 2025 (via pv magazine); Ember, Global Electricity Review 2025

STS was built for the hard version of this problem: a grid that drops for hours every day, and connections that fail in the middle of a command. Every decision on this page starts from that.

The moments people go looking for a better switch

  • The sun is up, and the load is still on the grid
  • Nobody switched back at sunset
  • A back-feed scare at the panel
  • One site became ten
Without STSWith STS
Walk to the panel and flip a lever One tap on a phone, from anywhere
Forget to switch, and waste solar or pay for the grid A daily schedule that switches on its own
No idea what is on when you are away Live status, read from the device
“Did it actually switch?” means going to look Every switch confirmed by the device itself
Someone has to be on site Many sites from one screen
A wrong switch can bridge two supplies On the industrial unit, the equipment makes that impossible

Fitted once. Then it runs itself.

  1. 01

    Fit the controller

    An electrician wires a small controller onto the existing solar/WAPDA changeover, once. The wiring stays as it is.

  2. 02

    Claim it with a code

    The device comes online by itself. The installer hands over a single-use code, and the device is bound to its owner.

  3. 03

    Control it from a phone

    Tap Solar or WAPDA, see the live source, set the daily switching times. The app installs from the browser, no app store.

  4. 04

    Leave it

    The schedule runs every day. After an outage it catches up to where it should be. Open the app only when you want to.

The app, as owners use it.

Three screens from the STS app, redrawn with sample data: the owner’s devices, one-tap switching, and the daily schedule.

  1. Every device, online or offline, at a glance

  2. One tap, then the device confirms the switch

  3. Two times a day, and it holds position in between

No app store, on purpose. The app installs from the browser on Android and iPhone, so a fix reaches every phone the moment it ships, with no review queue between a fault and its remedy.

Redrawn from the live STS app with sample names. No customer data is shown.

Four decisions that make it trustworthy.

A remote switch is easy to build. These are the choices that make a switch you cannot see something you can rely on.

01

Confirm.

The shortcut “The command was accepted, so report success.”

Success means measured, not sent

Reporting the command as success would demo identically and pass every test, and it would report an intention as a fact. A contactor can stick, a message can drop, a device can reboot mid-command. STS keeps the operation open until the device’s own input line shows the new source is live. If that does not happen within 30 seconds, it stops and tells the owner, rather than pretending.

02

Catch up.

The shortcut “The device was offline at switching time, so it missed it. It will get the next one.”

A schedule is a state to hold

Load-shedding and dropped connections are normal here. If a device was offline at switching time, it does not stay on the wrong supply all day: when it returns, STS moves it to the source the schedule says it should be on now. If it missed both switches, it goes straight to the later one instead of switching twice. On the industrial unit, no schedule runs until the wiring has been checked at the device, because a schedule switches with nobody watching.

03

Defer.

The shortcut “The schedule says solar, so put it back on solar.”

A person’s choice comes first

Someone who switches by hand has a reason the system cannot see: maintenance, a fault, an unusual load. Automation that instantly reverts a person is worse than none, because then nobody trusts either. STS honours the manual change until the next scheduled time, then the schedule resumes.

04

Interlock.

The shortcut “The app will never send both commands, so that is enough.”

Two supplies are never live together

On STS Industrial, the transfer switch latches in one position, Solar or WAPDA, never both. The software never drives both selector coils at once and drops the other first, and a manual selector on the unit locks remote control out entirely. Bridging two live supplies is not a bug report to fix in the next release; it is a fault on someone’s premises, and back-feed is a documented, sometimes fatal hazard to line workers.

Where each rule lives.

Each guarantee sits at the level that can keep it. The most important one sits lowest.

  1. Platform
    • The source that should be livethe schedule, and the manual override
    • Who may switch ita one-time claim code, then ownership
  2. Device
    • The source that is liveread from its own input line, never assumed from the command
  3. Equipment
    • One source at a timethe industrial switch latches in one position, with a manual selector that locks remote control out

Why not just use what exists?

Each option people use today covers part of the job. None of them covers all of it.

A manual changeover lever
Depends on a person being there, and confirms nothing.
A basic remote relay
Fires the command and assumes it worked.
A generator ATS
Built to start and stop a generator, not to run solar every day.
The inverter’s own transfer
Tied to one inverter, with no view across sites.
A smart-home Wi-Fi switch
Not transfer equipment, and no interlock between two supplies.

STS: confirmed by the device, scheduled with catch-up, honours manual changes, many sites in one app, and an interlocked latching switch on the industrial unit.

One app, three kinds of hardware.

CNC Electric YCQ6 automatic transfer switch used in STS Industrial, front view: positions I and II, the manual selector and key lock
STS Industrial: a CNC Electric YCQ6 automatic transfer switch (PC class, IEC 60947-6-1). Two positions, I and II, never both.
WattEY STS smart transfer switch controller, product render
The STS controller (product render)
  • STS Controller

    Switches up to four circuits independently, each one schedulable, with a cap on how many run at once. For homes and shops that want per-circuit control.

  • STS Transfer Switch

    A dedicated Solar/WAPDA changeover, with its own sensor confirming which supply is live.

  • STS Industrial Interlocked

    Built around a CNC Electric YCQ6 PC-class automatic transfer switch: it rests on Solar or WAPDA, never both, and is never driven with both coils on. Its manual selector locks remote control out. Fully schedulable, every switch confirmed.

Built on

  • Dingtian DT-R industrial relay controllers
  • MQTT (ISO/IEC 20922)
  • Next.js installable web app
  • AWS

Designed against the standards for this kind of device.

A transfer switch has a real standards home. STS was designed against it, so a facility engineer can check the design against rules they already use.

UL 1008 Transfer Switch Equipment
The industrial unit is designed to its intent.
IEC 60947-6-1 Automatic transfer switching equipment (ATSE)
Aligned to its model: the load is connected to one source at a time, which is how STS Industrial behaves. The industrial unit is built around a CNC Electric YCQ6, a PC-class automatic transfer switch its maker lists under this standard, printed on its nameplate.CNC Electric: the YCQ6 series
ISO/IEC 20922 MQTT, the messaging standard for connected devices
Devices and the platform talk over it, not over a private protocol.

The STS controller and platform are aligned, not certified or Listed. The transfer switch inside STS Industrial is CNC Electric’s own IEC 60947-6-1 product.

Who it is for.

  • Homes

    “Am I actually on solar, or quietly paying the grid?”

    Solar from morning, grid from sunset, set once and left running.

  • Shops, offices and branches

    “I can’t babysit the changeover.”

    Switch from home before closing, and see every branch on the right source.

  • Factories

    “I need a hard interlock and switching I can defend to an inspector.”

    Solar by day, grid overnight, and the two supplies can never be live together.

  • Installers and operators

    “I need sites I can see and control, not hardware I can’t.”

    Register a device, hand over a code, and manage every device from one dashboard.

Worries from our buyer research; situations written by the Wattey team as examples. No named customers.

What I built, and what the team did.

Strip out the supplies and the skill is not electricity. It is control of equipment under four hard conditions, solved in production:

  • Equipment you cannot see: the truth is in the device, not the last command
  • A network you cannot trust: outages are normal, so state must catch up
  • People who can overrule it: manual intent needs defined precedence
  • One rule that cannot fail: it sits below the software

The same problem, in other teams

  • Energy management and DER control
  • Smart metering
  • EV charging and load control
  • IoT device management
  • Industrial automation

My part

  • The device model and claim-by-code ownership: one owner, many devices; one operator, many customers’ sites
  • The confirmation protocol that reads the source back before a switch is called done
  • The schedule that holds a state and catches up after an outage
  • The rules for when a manual change wins over the schedule
  • The installable phone app, and the record of every switch, schedule run and change

The team’s part

Wattey Energy’s engineers handled installation, rollout and training at client sites. Wattey Energy was founded by Engr. Reyyan Niaz Khan.

Questions people ask.

What is STS?

STS, the Smart Transfer Switch, is an automatic transfer switch for buildings with solar and a grid connection. A controller on the existing changeover moves the building between solar and the WAPDA grid by phone, on a daily schedule or automatically, and confirms each switch from the device’s own sensors.

What did Ali Ahmed build?

The product and its control layer: the device and ownership model, the confirmation protocol, the schedule with catch-up after outages, the rules for manual changes, and the installable app. He leads it as Head of Energy Systems & Product Engineering at Wattey Energy. Wattey Energy’s engineers handle installation at client sites.

What is the hardest problem in a system like this?

That you cannot see the thing you are controlling. Every other difficulty follows from it: you cannot trust that a command was carried out, you cannot assume a device was awake when it was needed, and you cannot tell whether an unexpected state came from a fault or from a person. Confirming from the device, catching up to the schedule, and giving manual changes defined precedence each answer one of those.

Does it need new wiring?

No. STS fits onto an existing solar/WAPDA changeover. An electrician installs the controller once, and the wiring stays as it is.

What happens if the internet or power drops?

When the device is back, it moves to the source the schedule says it should be on now, including a switch it missed while it was down.

Can I still switch by hand?

Always. STS honours a manual change and will not override it until the next scheduled time, then the schedule resumes. On STS Industrial, the manual selector on the unit locks remote control out entirely.

Can one person manage many devices or sites?

Yes. One owner can hold several devices, and one installer or operator can manage many customers’ sites from a single dashboard. Each device is claimed with a single-use code and bound to its owner, so everyone sees only what is theirs.

Does the app come from an app store?

No. It is an installable web app that goes onto Android and iPhone straight from the browser and opens full-screen. That was a release decision: a fix reaches every phone the moment it ships, with no app-store review in the way.

Is STS a static transfer switch?

No. STS is an automatic transfer switch (ATS), the kind that moves a building between solar and the grid. The solid-state static transfer switch that shares the acronym is a different product, used in data centres.

Is STS certified?

The transfer switch inside STS Industrial is a CNC Electric YCQ6, which its maker lists under IEC 60947-6-1. The STS controller and platform are not certified or Listed: they are designed to the intent of UL 1008 and aligned to the IEC 60947-6-1 model, and the telemetry runs on MQTT, an ISO/IEC 20922 standard.

How does STS relate to WattEY and Wattey Solar Performance Cloud?

Wattey Solar Performance Cloud measures what the site’s solar produces. WattEY measures what the site draws from the grid and what it costs. STS controls which of the two carries the load. Ali built all three.

Need control, not just a dashboard?

If you have a version of this problem, equipment you can’t see, a network you can’t trust, people who can overrule the system, I have already shipped one. Let’s talk.