Integración domótica myStrom, gratuita y de código abierto

myStrom Wi-Fi switches, bulbs, LED strips, buttons and motion sensors, locally.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Your myStrom Wi-Fi devices in Gladys, on your local network, through the REST API the devices serve themselves: no myStrom cloud, no account. Unofficial integration, not affiliated with myStrom AG.
What you get
| Device | In Gladys |
|---|---|
| Switch (CH v1, CH v2, EU, Zero) | On/off, power (W), energy index (kWh), temperature (°C), as far as the model measures them |
| Bulb | On/off, brightness, colour, white temperature, power |
| LED Strip | On/off, brightness, colour, power |
| Button, Button Plus (1st and 2nd gen) | A button feature, and the myStrom button scene trigger (single, double, long, touch) |
| Motion Sensor (PIR) | Motion, light level (lux), temperature |
The switches, lights and motion sensors are read every 10 seconds (the Refresh interval setting, 5 seconds to 5 minutes): a motion is seen at most that late. The energy index keeps growing when a switch restarts.
Setup
- In your router, give every myStrom device a fixed IP address (a DHCP reservation): the integration reaches them by address.
- In Gladys, open the integration Configuration tab and type the
addresses in IP addresses of the devices, separated by commas, for
example
192.168.1.30, 192.168.1.31. Or press Find the myStrom devices: the devices announce themselves on the network every few seconds, and Gladys listens for 7 seconds. - Save. The devices appear in the Discovery tab: add the ones you want.
If you secured the local API of your devices with a token in the myStrom app, type it in API token. One token for all the devices: devices secured with different tokens are not supported yet. A device found by the search is first asked without the token: the token is only sent to a device that asks for it.
The integration checks regularly that the device answering at an address is still the same one (its MAC address). If your router gives the address of a device to another one, the first is shown unreachable and searched again, and the status of the integration names both: give your devices fixed addresses.
Buttons
A myStrom button sleeps between presses: Gladys cannot ask it anything. When pressed, it calls the address it was given (its "action URL"). The integration runs a small receiver for these calls, in a second container that Gladys starts and publishes on a port of the Gladys machine (shown in the configuration screen).
- Type the IP address of the Gladys machine on your network in Address of
Gladys for the buttons (for example
192.168.1.10), and save. - Plug each button on USB: it stays awake while charging. Make it known to Gladys (its address in the list, or Find the myStrom devices).
- Press Set the button action URLs. The single, double and long presses (and the touch of a Button Plus) of every awake button now call Gladys. This replaces what the myStrom app had set on these presses.
- In a scene, use the myStrom button trigger, pick the button and the
press. The press is in the
pressvariable of the trigger.
A button not reached (asleep) is named in the answer: plug it on USB and press the configuration button again.
The action URLs contain a random secret, so another machine of your network cannot fire your scenes by guessing them. It is a limited protection: the buttons call Gladys in plain HTTP, so the secret can be seen by anyone listening on your network, and read back from a button by anyone who can reach its local API. It only starts scenes, it gives no access to Gladys. If you think it leaked, see "Troubleshooting".
Good to know
- Everything stays on your network: Gladys talks to the devices in plain HTTP, as the myStrom API does. Keep your Wi-Fi closed to strangers.
- The Button Plus wheel, the Bulb effects (sunrise, rainbow) and the motion sensor settings are not handled.
- The devices reached by Gladys show a "local" badge, an "unreachable" one when they stop answering.
Troubleshooting
- "Token refused": the device has a token in the myStrom app; type it in API token.
- Nothing found by the search: some networks do not let Gladys hear the announcements, and buttons only announce themselves while awake. Type the addresses instead.
- The button secret leaked: renewing it is not possible from the configuration screen yet (planned). Meanwhile, remove the action URLs of the button in the myStrom app.
- A button press does nothing: check that the Gladys address is the one the buttons reach (not a VPN or Gladys Plus address), and set the action URLs again after changing it.
Parámetros de configuración
Estos son los parámetros que myStrom te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Your myStrom devices, on your local network | section | No | Switches (on/off, power, energy, temperature), bulbs and LED strips (on/off, brightness, colour, white), buttons and motion sensors, through the local REST API of the devices, without the myStrom cloud. Give each device a fixed IP address in your router, then type the addresses below, or use "Find the myStrom devices". The devices then appear in the Discovery tab. Unofficial integration, not affiliated with myStrom. |
| IP addresses of the devices | string | No | Separated by commas, for example 192.168.1.30, 192.168.1.31. Devices found by the search are kept without being typed here. |
| API token (optional) | secret | No | Only for devices whose local API is secured with a token in the myStrom app. Leave empty otherwise. |
| Refresh interval (s) | number | No | How often the switches, lights and motion sensors are read, in seconds. A motion is seen at most this late. |
| Buttons | section | No | A button sleeps between presses: it calls Gladys on {{gladys_host}}:{{port:buttons}} when pressed. Type the IP address of the Gladys machine below (the one the buttons reach on your network), save, plug each button on USB so it stays awake, then press "Set the button action URLs". Each press then starts the scenes that use the "myStrom button" trigger. |
| Address of Gladys for the buttons | string | No | The IP address of the machine running Gladys on your local network, for example 192.168.1.10. |
Cómo instalar myStrom en Gladys
- En Gladys, abre Integraciones: myStrom aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/lm1lc3n7/gladys-mystrom:0.1.2), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-mystrom.
myStrom 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
myStrom 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.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación