Skip to main content

Toyota / Lexus smart home integration, free and open source

Toyota / Lexus integration for Gladys Assistant

Toyota and Lexus cars (Europe, MyToyota): fuel, battery, charging, range, locks, doors, trips.

This integration brings your Toyota and Lexus cars into Gladys through the MyToyota connected services of Toyota Motor Europe (the MyToyota app, and Lexus Link for a Lexus): fuel and battery levels, charging, ranges, odometer, locks, doors and windows, warning lights and the last trip. It uses the account of the app. Unofficial, not affiliated with Toyota or Lexus.

Development version (0.1). Built from the protocol of pytoyoda (the library of the Home Assistant integration ha_toyota) and tested with simulated answers, not with a real car yet. Feedback is welcome on the GitHub repository.

Europe only: the cars of North America use another API (Toyota app, not MyToyota) and are not supported.

What you get​

One device per car of the account (named after the nickname given in the app), with the features the car reports:

FeatureCarsIn Gladys
Fuel levelfuel, hybrid, plug-inpercent
Fuel rangefuel, hybrid, plug-inkm
Battery levelplug-in hybrid, electricpercent (battery gauge)
Electric rangeplug-in hybrid, electrickm
Total rangeplug-in hybridkm, fuel + electric (air conditioning on, as the app)
Odometerallkm
Charging stateplug-in hybrid, electriccharging, vehicle connected, idle (complete or unplugged)
Plugged inplug-in hybrid, electricyes / no
Charge time remainingplug-in hybrid, electricminutes
Lockedwhen reportedlocked when every door and the boot are locked
Door, boot, bonnet openwhen reportedopen / closed (any side door for "Door open")
Window openwhen reportedopen / closed (any window)
Parked positionoption, when reportedtext "latitude, longitude" of the last parked position
Warning lightsallnumber of dashboard warning lights reported
Last tripalltext: end, distance, duration, L/100 km, % electric, score
Last trip distance, fuelall (fuel: not electric)km and litres, recorded once per trip at its end
Last report from the carallwhen the car last sent its data to Toyota

Distances in miles are converted to km. Read only: no lock, unlock, climate or charging command yet (see "Remote commands" below).

Installation​

  1. Use the MyToyota app (or Lexus Link) once: the car must be added to the account and its connected services active.
  2. In Gladys, install the integration, then in its configuration enter the e-mail and password of the app and choose the brand (Toyota or Lexus).
  3. Click Test the connection: it lists the cars of the account.
  4. Open the Discovery tab and add the cars.

Scenes​

  • Trigger "Trip ended": a new trip appeared in MyToyota (read after the car stopped, at the next read). Filter: the car. Variables: car name, distance (km), duration (min), fuel used (L), consumption (L/100 km), share driven electric (%), driving score, end of the trip.
  • Action "Read the cars now": reads Toyota's last values now, for every car or one, the warning lights and the last trip included (at most once every two minutes). Useful when you arrive home, for instance.
  • Every feature can also trigger a scene the usual way (car unlocked, boot open, battery below 20 %, charge finished…).

How often it reads​

  • Every 15 minutes by default (5 minutes minimum, see the options), one request at a time with a pause in between: Toyota answers "too many requests" to accounts read too often, and to bursts.
  • Each car reads only what the account says it supports: telemetry (fuel, odometer), electric status (battery, charging), doors and locks, and the parked position only if you turned the option on.
  • The warning lights every 6 hours; the last trip when the odometer moved (and every 6 hours); the list of cars once a day and on Scan.
  • The car is never woken up: the values are the ones Toyota keeps, sent by the car on its own (engine stop, locking, charging…). This spares its 12 V battery, but a value can be a few hours old: see "Last report from the car". The MyToyota app shows the same values.

Options​

OptionDefaultWhat it does
Brand of the accountToyotaToyota (MyToyota app) or Lexus (Lexus Link app)
Refresh interval (s)900how often the cars are read (300 to 86400)
Parked positionoffadds the last parked position; turned off, it is forgotten
Language of the feature namesFrenchnames of the features of the devices added (or updated) from now on

Remote commands​

Toyota's API has commands (lock, unlock, climate, charging), but they are not in this version: in Europe they depend on the remote services subscription of each car, their routes are being moved by Toyota, climate starts are limited per ignition cycle, and they could not be checked on a real car. They are planned as an opt-in once confirmed.

Troubleshooting​

  • "MyToyota refused the e-mail or password": check them in the app, then in the configuration. The integration does not retry by itself (Toyota may lock an account that insists): it waits for a change or a click on Test the connection.
  • "asks to slow down": raise the refresh interval, and stop other tools reading the same account (Home Assistant, Node-RED…) if you can.
  • "The MyToyota sign-in answered unexpectedly": Toyota may have changed its sign-in; the integration tries again every 6 hours. Please open an issue on GitHub.
  • A feature never gets a value: the car or its subscription does not report it (the doors of some models, the position, the electric status of some hybrids). An endpoint Toyota refuses for a car is asked again once a day only.
  • Old values: the car only reports at certain moments; drive or lock it, then use the scene action "Read the cars now".

Privacy​

The e-mail and password are stored by Gladys as a secret (never sent back to the browser). The integration only sends them to b2c-login.toyota-europe.com, the sign-in of the MyToyota app, to open a session; it keeps the access and refresh tokens and the user id in its /data folder (with a hash of the e-mail, never the password), and reads the cars from ctpa-oneapi.tceu-ctp-prd.toyotaconnectedeurope.io. The logs show only the last four characters of a VIN, never the position. The parked position is only read when you turn the option on. Toyota, Lexus and MyToyota are trademarks of their owners; this integration is not affiliated with Toyota or Lexus.

Configuration settings​

These are the settings Toyota / Lexus asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Your MyToyota accountsectionNoBrings your Toyota or Lexus cars into Gladys through the MyToyota connected services (Europe): fuel level, battery level, charging and plug of hybrids and electric cars, ranges, odometer, locks, doors, boot, bonnet and windows, warning lights, the last trip, and a "trip ended" scene trigger. Enter the e-mail and password of the MyToyota app (Lexus Link for a Lexus), then add the cars from the Discovery tab. Read every 15 minutes by default, one request at a time: Toyota limits requests, and the car is never woken up (no drain of its 12 V battery), so the values are the last ones the car sent. Read only: no remote command yet. North America is not supported (another API). Unofficial, not affiliated with Toyota or Lexus.
MyToyota e-mailstringYes
MyToyota passwordsecretYes
Brand of the accountselectNoToyota for the MyToyota app, Lexus for the Lexus Link app.
Refresh interval (s)numberNoHow often the cars are read, in seconds (5 minutes minimum, 15 minutes by default). Toyota answers "too many requests" to accounts read too often.
Parked positionbooleanNoAdds the last parked position of each car (latitude, longitude) as a text feature. Off by default: it is personal data. Turned off, the position is forgotten.
Language of the feature namesselectNo

How to install Toyota / Lexus in Gladys​

  1. In Gladys, open Integrations: Toyota / Lexus appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/lm1lc3n7/gladys-toyota:0.1.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/LM1LC3N7/gladys-toyota.

Toyota / Lexus requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Toyota / Lexus is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by LM1LC3N7, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂