Skip to content

Which car is plugged in? ​

When two or more cars share a charger, SpotNav has to know which one was plugged in. It plans from that car's charge level, battery size, onboard charger and target. Chargers do not report the car, so SpotNav reads what the cars report about themselves, and asks you when that is not enough.

It also tells a visitor's car from yours: a guest car is planned by kWh, with no car's level or target, once you say it is one. At a charger only one of your cars can charge at, SpotNav asks only when that car says it is not the one plugged in.

Settings ​

All of these are in the card's Settings: the charger's section (its identification rows are shown when more than one car is detected) and, per car, the car's tab in the Car section. Only an administrator can change them.

The charger's section: the cars at this charger, identification Automatic, the camera, its crop and the AI task

  • Vehicles at this charger. These are the cars that can charge here. By default every car SpotNav detects is included. At least one must be ticked.
  • Which car is plugged in:
    • Automatic (the default). SpotNav uses the cars' own reports, and asks only if they cannot decide.
    • Always ask. SpotNav asks at every plug-in and never switches the car by itself.
    • Off. The car stays the one you chose.
  • Camera, Crop parking spot and AI task (under the charger, shown when Home Assistant has a camera and an AI Task entity): see The camera. Off until you choose a camera.
  • Per car: Reference picture: see The camera.
  • Per car: Plug sensor and Location. These are the car's own "plugged in" sensor and its tracker, as SpotNav found them. If a car has more than one, you choose. You can also choose None, or go back to Automatic. SpotNav only reads these entities, and only for identification. They are never used as a charge level, a range or a way to start or stop a charge. The plug sensor's list also has Other sensors of this car: every other on/off sensor and every text sensor without a unit on the car's device, each with its current state. If SpotNav missed your car's plug sensor, or ruled it out, choose it there. The dialog says what the chosen sensor reads as now: plugged in, unplugged, or says nothing (a value SpotNav cannot tell as plugged or unplugged, so it is not used).

The target belongs to the car: each car has one target percent, the same at every charger. Changing it at one charger changes it at every charger planning for that car, and when the car at a charger changes, its own target comes with it. When two chargers change one car's target in quick succession, the later change wins everywhere; a change of anything else at a charger (a departure, the current) never moves a target. The departure belongs to the charger and stays as it is. A car with no target of its own takes, when SpotNav starts, the highest target any charger planned it to before this feature (it is never left short), and every charger planning for it is aligned once.

Vehicles at this charger also limit what the charger plans for: only those cars are offered as the target vehicle in the card and the app, and with one car ticked that car is planned for.

How SpotNav finds a car's plug sensor and location ​

SpotNav reads the entities on the car's own device, by their shape and the generic words in what the integration calls them, never by brand:

  • Plug sensor, best first:

    1. an on/off sensor of the kind "plug";
    2. an on/off sensor of the kind "connectivity" (or no kind) that names the cable, the plug or the charger connection;
    3. a text sensor that names the plug, the connector or the connection, and that can say both: among the values it declares, one reads as plugged in and one as unplugged. The car's online state ("Car connection") never can, and a sensor whose value is a number is never one. The DC inlet's own sensor comes after the others;
    4. last of all, and only when the car has nothing above: a charging state that declares exactly one "unplugged" value, such as connect_cable or disconnected. Through it that value is unplugged, and every other value it declares (charging, ready for charging, conserving, interrupted) means the cable is in; none, error and unknown values say nothing. A charging state with no single unplugged value is never a plug sensor. This is how a Skoda in Home Assistant's own integration, which has no plug sensor, is found.

    A lock, a latch and the charge port's door or flap are never one. When several of the best kind are left, the one for the whole car wins ("any" or "all" in its name, such as BMW CarData's anyPosition.isPlugged beside one sensor per port); otherwise you choose.

  • Location: the car's tracker. A tracker for a route's start or destination (origin, route, destination) is never one. When the car has a live position and a last or parked one (Polestar's location and parked_location), the live one is used; otherwise several are a choice.

  • Toyota (toyota, pytoyoda) has no plug sensor, only a charging status whose value none is what Toyota reports while the car is not charging, also with the cable in. SpotNav cannot read "unplugged" from it, so a Toyota is identified by its position alone.

  • An integration that names its entities with the car's name in front ("Jeep Max Battery") is read without that name, so a car called Max, Trip or Key is found like any other.

What happens at a plug-in ​

SpotNav starts when the charger reports that a car was plugged in. A charger that cannot tell whether a car is connected never starts identification, so the choice stays yours.

  1. SpotNav asks Home Assistant to re-read each car's plug sensor and tracker. It uses homeassistant.update_entity and never a brand's wake-up, at most once a minute per car. Waking a car costs its 12 V battery and part of the account's daily limit. Kia Uvo (kia_uvo) answers even this re-read by asking the car itself when its last report is older than the integration's force-refresh interval, which can wake it.
  2. It then weighs what each car says:
    • A car's plug sensor turned on from five minutes before the plug-in. That car was plugged in.
    • A car whose plug sensor went to "not plugged in" around or after the plug-in is not here. A sensor that only says "not plugged in" again rules nothing out: cloud integrations write their cached value again on every poll (Kia's cache can say "not plugged in" for hours after the car was plugged in), and SpotNav's own re-read makes them write it too.
    • A fresh position away from home means that car is not here. "Fresh" means reported after the plug-in, or at most two minutes before it, and not just written again by SpotNav's own re-read. An older position may be the car's last report on its way home (many cloud integrations report every half hour), so it rules nothing out and SpotNav asks instead.
    • A car already identified at another SpotNav charger that is connected is not here. A car decided there counts at once, even while that charger's settings are still being saved, so two chargers never take the same car.
  3. In Automatic mode, SpotNav picks a car without asking in two cases: exactly one car says it was plugged in, or every other car is ruled out. If two cars both say they were plugged in, SpotNav asks at once. Otherwise it waits three minutes and then asks. It keeps listening for 30 minutes after the plug-in, and if a car's own report settles it before anyone answers, SpotNav switches to that car. It switches automatically at most once per plug-in. With a camera, SpotNav also asks the camera while the cars' own reports have not decided.
  4. In Always ask mode, SpotNav asks at once. The cars are ordered by what they report, and SpotNav never switches by itself.
  5. At a charger with one car, SpotNav only looks whether that car is ruled out by the same reports: its plug sensor went to "not plugged in" around or after the plug-in, a fresh position away from home, or it is identified at another SpotNav charger. Then it asks "<car> or Guest car?" after the same three minutes. A car that says nothing is no question: it is the car, as before. Always ask asks there only in the same case.

While SpotNav identifies the car, the card's and the app's status line leads with Identifying the car…, and while the question is open with Waiting for an answer: which car is plugged in?. The line is gone as soon as the car is decided (by the cars' reports, the camera, an answer, or a swiped question).

The card while the car is identified: "Identifying the car…" and "identifying…" on the car line

Once decided, the card's car line says how, for example identified by the car's charging cable, and ends in ⇄ (Change car).

The car line: City car, identified by the car's charging cable, with ⇄

A car's plug sensor may report late, depending on the integration. Many cloud integrations report within seconds to ten minutes, but some only every 30 minutes or more. If the report comes late, SpotNav asks.

The question ​

The question goes to the phones chosen under Settings → Notifications, as the event Which car is plugged in?. This event is on by default. It is a notification with a button per car and one for Guest car. Android shows at most three buttons: with one or two cars each car and Guest car; with three or more, the likeliest car, Guest car, and a third that opens SpotNav (the rest are in the card and the app). With two or more cars Guest car comes first when every car is ruled out, or when the camera saw none of them; else last. At a charger with one car the car's button comes first: "<car> or Guest car?". The card shows the same question as a banner with a button per car and Guest car, and so does the SpotNav app.

The card's question: "Which car is plugged in?" with a button per car

  • The first answer wins, from any phone, the card or the app. Any Home Assistant user may answer in the card; changing the identification settings stays an administrator's. Choosing the car in the card's or app's settings at the same time also counts as an answer. A person's answer always beats what the cars report.
  • When the question is answered, or a car's report settles it, the notification on every phone is replaced with "Tesla selected." or "Tesla selected automatically." The replacement is silent: it does not alert again on Android, and iOS delivers it passively, without a sound or a banner.
  • No answer keeps the current car. If the notification is swiped away on Android, the current car is kept too, and nothing switches it later.
  • Unplugging the car for more than two minutes takes the question off the phones. A shorter unplug is looked at again. When nothing new is reported (a reseated cable, a connector that flaps) it is the same plug-in: what was decided or answered holds, and it still counts toward the one automatic switch. When the decided car reports, since the unplug, that it is not plugged in or away from home, or (unless a person answered) another car's plug sensor turns on, the cable has moved to another car: that car is identified as at a new plug-in, with its own one automatic switch. No question is sent while the charger is empty; a car plugged back in after the three minutes passed is asked about then. After twelve hours an unanswered question is taken off as well.
  • A Home Assistant restart while a car stays plugged in is no new plug-in. What was decided at that plug-in is kept across the restart; a plug-in that was still undecided is identified again from the restart (the question follows after three minutes, as for a plug-in). A button of a question that is gone takes it off the phone.
  • Change car (in the card and the app, for every Home Assistant user) changes the car at any time while a car is plugged in: it answers an open question, or corrects a car already decided, and counts as an answer.
  • A person's answer holds for the car's stay. It is written after any automatic switch still being saved, and written again if another settings change got there first: it is the newest choice and is never dropped.
  • The text names no number plate, place or person, because notifications pass through Google's and Apple's push services. It names the charger and the cars.
  • Each button carries a random code that only the asked phones received, so another app cannot answer for you. The question counts towards the charger's limit of twelve notifications an hour. It is not held back by the 15-minute repeat rule, because it is asked at most once per plug-in.

Switching the car ​

When the car changes, the settings are written the same way as when you change them in the card: a new revision is stored, and the plan is calculated again from the new car's charge level and its own target. Identification never starts, stops or takes over a charge by itself.

The charge history records how the car of each session was decided:

vehicle_decided_byMeaning
plug_sensorthe car's own plug sensor said so, or every other car reported that it was not plugged in
locationevery other car was away from home, or was identified at another charger
answereda person answered the question, on a phone, in the card or in the app
manuala person chose the car in the settings (also with identification Off, or just before the plug-in)
camerathe charger's camera recognised the car, sure, among cars of different colours
answered with the car Guest cara person answered that a guest car is plugged in (see A guest car)
only_candidateonly one car can charge here
assumednobody answered and nothing decided it, so the car that was already chosen was kept

The dashboard's identification block and the diagnostics show what each car was judged by: its plug sensor and position entities, the plug's state with when it changed and when it was last written, home or away (never where), and the verdict. A field report can show from it exactly which entity and state decided. The charge port door of a Kia (ev_charge_port, and its switch) is never taken for a plug: it says the port's door is open, not that a cable is in.

A guest car ​

A visitor's car plugged in is not one of yours: its level and target are not your car's, so planning for your car would plan nothing (your car at its target) or the wrong amount. Guest car plans for it by kWh instead.

  • Only you say it is a guest. Answer Guest car to the question, or choose Guest car under Change car in the card or the app (also at a charger with one car, while a car is plugged in). Nothing switches to a guest by itself, not even when every car is ruled out or the camera saw none of them: those only put Guest car first. Unanswered, swiped or expired, the current car is kept.
  • The guest's plan is the amount in kWh, by the charger's own strategy and departure time (the next time it comes round: the household's weekdays and chosen date are not the guest's): Cheapest buys the cheapest hours for it before the departure (with no departure, within the next twelve hours), Solar charges it from the surplus, Hybrid from the sun first and the rest from the grid by the departure. The import target and the fuse hold it like any charge. Charge now charges it at once.
  • Nothing of a car is used. No charge level, no target, no minimum charge level, no charge limit, no plug or position sensor, no wake, and nothing is learned (the energy per percent and the power a car draws stay as they were).
  • The amount is 10 kWh until you change it. The Guest tab in Settings → Car (an administrator) has the one row for it, and changing the amount in the plan dialog during a guest's plan does the same: the last change is the next guest's.
  • When the amount is delivered the charge stops, and the charger stays paused until the guest is unplugged: it does not charge on at any price, and a charge the charger begins by itself is stopped. Your Start still charges, as any Start. Raising the amount above what was delivered lets it charge again.
  • Unplugged (for more than two minutes), your car and its settings come back, and the next plug-in is identified as usual. Choosing one of your cars under Change car ends the guest's plan at once. A Home Assistant restart while the guest stays plugged in keeps it.
  • The status says Guest car · 10 kWh by 07:00, and once it is delivered Guest car · done, waiting to be unplugged. The New plan notification says it is the guest car's. In the charge history the session's car is Guest car, with its energy and cost as usual.

The camera ​

A camera that sees the parking spot can help, through Home Assistant's AI Task (for example a local vision model in Ollama). Describing the cars in words does not work: similar cars (the same colour, a similar body) are mixed up, and at night an infrared picture has no colour. Comparing the picture with a picture of each car taken by the same camera at the same spot works, day and night. So SpotNav compares pictures.

Setting it up (Settings → Charger, an administrator):

  1. Camera: the camera that sees the parking spot.

  2. Crop parking spot: SpotNav fetches a fresh picture and you drag a selection around the parking spot (a corner or the whole selection, with a finger or the mouse), check the preview of what is inside, and save. Only what is inside the frame is compared: no other cars, no street, and a dual-lens camera's seam stays out. Without a frame the whole picture is used.

    Crop parking spot: the camera's picture with the selection around the parking bay, and what is compared

  3. AI task: the AI Task entity that compares the pictures, or Home Assistant's default one. When several have one name (three "Ollama AI Task"), the card shows each one's model, or else its entity id. It must take pictures (attachments). See Which model?.

  4. Per car, Reference picture: the dialog has a Day and a Night slot. With that car parked at the charger, tap Take day picture; in the dark, Take night picture adds one for the camera's infrared. Over a picture the button is Retake, and Delete under it removes only that picture. The slot updates in place and the dialog stays open until you close it (the × in the card, Close in the app). A car without a reference picture is never recognised by the camera. The picture is kept whole, and it is cropped with the selection drawn at the time it is compared, so you can change the crop at any time without taking the pictures again; its thumbnail shows it cropped as it is compared.

    A car's reference pictures: a day picture with Retake and Delete, and an empty night slot

The pictures in this guide are of a demo camera whose picture is drawn, not photographed.

Choosing the camera and the AI task is an administrator's, in the card. The SpotNav app can draw the frame and take, show and delete reference pictures for the camera chosen here, but cannot choose another camera or AI task.

At a plug-in, in Automatic mode, when two or more cars are left after the cars' own reports: SpotNav takes one picture, crops it with the frame and asks the AI Task which reference car is the one in the picture, comparing shape, roof line, windows and lights rather than colour. The picture of the spot now is sent first and the reference pictures after it: a model asked about "the last picture" was seen to answer "none" when a reference of an empty spot came just before it. The answer is one car, a car that is none of them (other), or no car (none), and how sure the model is. At a charger with one car the camera is asked too, while that car is not ruled out.

  • The camera decides on its own only when all of this holds:

    • the model is sure ("high");
    • every car left has a reference picture (a car without one may be the one standing there);
    • no other car's own plug sensor went on at this plug-in (a sensor that did not change across the plug-in, such as one that has said "off" for hours, counts neither for nor against a car);
    • in daylight (the picture now has colour): that colour is closest to the reference colour of the car the model named (a model that names the red car for a picture of a white one does not decide), and the car it names has a clearly different colour from every other car left, judged from the daylight reference pictures. When the named car has no daylight reference picture there is no colour to check: that holds nothing back, unless the picture now has the colour of another car;
    • at night (the picture now has no colour): the car it names has a night reference picture, so the model had that car's own infrared picture to recognise it by.

    The last rule is the one people meet most. A model compares shapes, but two cars of one colour (two dark blue cars, a dark blue and a dark grey one) look much alike in a small, cropped camera picture, and a model can be sure and still wrong. So between such cars the camera never decides alone. "Similar colour" is measured picture against picture: every picture comes from the same camera and frame, so where two pictures differ is where the cars differ, while the ground, plants, posts and the time stamp stay and cancel out. There the two pictures' average colours are compared, after the light of one is evened out to the other's on the ground that stays. A dark blue car is then far from a reference picture of the empty spot, however much paving the frame holds, and a car parked a little further on, or in other light, stays near itself. Black and white, or red and silver, are clearly different; dark blue and dark grey are not. A white or grey car on grey ground can show almost no colour at all, and then it is judged as at night. The picture now is compared with each car's reference pictures the same way: when another car is nearer and the car it names is clearly unlike the picture now, the camera does not decide; when the car it names is near too, the colours cannot tell the cars apart. Reference pictures taken with an earlier release have their colour taken anew from the stored picture when SpotNav starts: there is no need to take them again.

  • At night an infrared picture is grey, or evenly tinted purple or pink by a camera without an infrared filter: colour tells no car apart, so the camera decides on its own only for a car with a night reference picture. Take one in the dark for each car that charges at night.

  • In every other case the camera only puts its car first on the question's buttons, and the question is asked as usual, after three minutes.

  • None of these cars never makes a guest by itself: with two or more cars it puts Guest car first, and when the model is sure it counts as the cars with a reference picture ruled out, so a charger with one car asks.

  • A car's own plug sensor outranks the camera. If, after the camera decided, a car's plug sensor changes at this plug-in and settles it within the 30 minutes SpotNav listens, SpotNav switches to that car (recorded as decided by the plug sensor). If the camera's car's plug sensor goes to not plugged in and nothing else settles it, SpotNav asks. A car identified at another SpotNav charger that is connected cannot be here: that corrects the camera too. A position (home or away) alone never overrides the camera's sure answer: trackers are sometimes wrong, and a plug sensor that has not changed since before the plug-in says nothing either way.

  • Your answer always wins. The camera is asked only while nobody has answered and nothing has decided, and an answer that comes later is not used.

  • The camera is asked once per plug-in, and once more only after an error. A model that takes longer than two minutes (loading the model included) is ignored and SpotNav asks as without a camera. When a car's plug sensor or position decides, the camera is not asked at all. Always ask and Off never ask the camera.

Which model? ​

The AI Task needs a model that looks at pictures (a vision model). A local 7B vision model, for example qwen2.5vl:7b in Ollama, compares the pictures well enough and answers in about 20 seconds on an ordinary home server (a little more when the model must first be loaded). Smaller models (4B) were seen to pick a reference picture by its place in the list rather than by what it shows, and to be sure about it: they are not recommended. A model that takes longer than two minutes is ignored, so a large model on a slow machine only costs time. The history shows each query's answer, how sure the model was and how long it took, so you can see how a model does at your charger.

Privacy. The reference pictures are kept in Home Assistant's private storage (.storage/spotnav_camera/, never www/ or a media folder), so they are part of Home Assistant's backups, and they are removed with the charger. Pictures go to the AI Task entity you chose (with a local model they never leave your home; with a cloud AI Task they go to that service) and, for the frame editor and the thumbnails, to the card and the paired SpotNav app. The question names the cars only as "car 1", "car 2". No picture is ever put in a notification.

For field reports ​

When a car was identified wrongly, or a question came that should not have, the diagnostics tell why. Home Assistant's Download diagnostics for the charger, and the card's Download debug info, carry the block vehicle_identification with a history of the last ten plug-ins at the charger, oldest first. It is kept across restarts. For each plug-in:

  • when the car was plugged in, which cars could be the one (by id, never by name), and each car's evidence: its plug sensor and tracker, their states and when they changed and were last reported, home or away (never where), and the verdict;
  • the camera, when it was asked: its answer and how sure the model was, whether the answer was used, how long the query took (latency_s), the AI Task entity and its model, an error (timeout, no_snapshot, no_reference, ai_task_error), and camera_reason, why it did or did not decide on its own: decided (by day, the colours agree), decided_night (at night, the named car has a night reference picture), decided_without_colour (by day, the named car has no daylight reference picture to compare colours with), similar_colour (with colour_distance, how different the nearest other car's reference picture is where the two differ; 0.25 or more is clearly different, 0 is pictures the colours cannot tell apart; also when another car is as near the picture now, and, when the named car's colour is not known, the other car's distance from the picture now), night (at night, the named car has no night reference picture), missing_reference, confidence_low, answer_none (no car), none_of_these (a car that is none of the cars, other), other_plugged_in (another car's own plug sensor went on at this plug-in), colour_mismatch (another car is nearer the picture now and the named car is clearly unlike it, with colour_distance the named car's distance from the picture now), or late (it answered after a person or the cars had decided);
  • skipped with a reason when nothing was identified: off, only_candidate (no car can charge here), or recent_choice with chosen_at (the car was chosen shortly before the plug-in). A charger with one car looks at its car's reports at every plug-in, and ends only_candidate when nothing ruled it out;
  • the question: when it was sent and to how many phones, and when it was answered, and how (answered_by: notification, a phone's button, or choice, the card's or the app's);
  • the car it ended with (guest for a guest car) and how it was decided (as in the charge history). assumed says why the car that was already chosen was kept: swiped (the notification was swiped away), unanswered (nobody answered in twelve hours) or unplugged (unplugged before anything decided);
  • later corrections: a person's change with Change car, or a car's own report that overruled the camera.

No picture and no position is ever in it.

For developers ​

The settings fields, the dashboard's identification, camera_identification and guest blocks, the vehicle row's sources and the identification, guest and camera commands are described in Apps and API.

Sensnology AB. No accounts, no analytics, no tracking.