Saltar al contenido principal

Integración domótica Toyota / Lexus, gratuita y de código abierto

Integración Toyota / Lexus para Gladys Assistant

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

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

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.

Parámetros de configuración​

Estos son los parámetros que Toyota / Lexus te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
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-mailstringSí
MyToyota passwordsecretSí
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

Cómo instalar Toyota / Lexus en Gladys​

  1. En Gladys, abre Integraciones: Toyota / Lexus aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/lm1lc3n7/gladys-toyota:0.1.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-toyota.

Toyota / Lexus requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

Toyota / Lexus es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene LM1LC3N7, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂