Skip to main content

FRITZ!SmartHome smart home integration, free and open source

FRITZ!SmartHome integration for Gladys Assistant

Plugs, radiator thermostats, blinds, lamps and buttons of your FRITZ!Box (DECT).

Connect the AVM smart home devices of your FRITZ!Box to Gladys: FRITZ!DECT 200 and 210 plugs (on/off, power, energy), FRITZ!DECT 301 and 302 and Comet DECT radiator thermostats (target temperature, heating on/off, measured temperature, battery, open window, boost), blinds on DECT ULE (Rollotron), FRITZ!DECT 500 lamps, HAN-FUN detectors, and the FRITZ!DECT 400 and 440 buttons as scene triggers. Everything stays on your local network: the integration talks to the box through its AHA-HTTP interface, documented by AVM. No cloud, no MyFRITZ! account.

This integration does not replace the FRITZ!Box integration (internet, guest Wi-Fi, presence, phone calls): the two complement each other and can run side by side.

Developed without the hardware: feedback welcome. The integration is covered by automated tests built on real answers of FRITZ!Boxes (collected by the pyfritzhome library), with the login methods of AVM checked against its own examples, but it has not run against a real box yet. Tell us on the Gladys forum how it works with your devices.

What you get​

  • One Gladys device per smart home device of the box, with the features it has (see Devices): switch and meter of a plug, target temperature and heating mode of a thermostat, position of a blind, light, brightness and colour of a lamp, state of a detector, temperature, humidity and battery.
  • A dashboard widget: power drawn by the plugs, thermostats heating, open windows, and one line per device.
  • Three scene triggers: a FRITZ!DECT button pressed (which button, short or long press), a thermostat detecting an open window, a battery turning low.
  • A scene action: put a thermostat on its comfort or eco temperature, start a boost or the "window open" mode for a while, or end them.

Requirements​

  • A FRITZ!Box with FRITZ!OS 7 or later (FRITZ!OS 7.24 or later recommended: secure PBKDF2 login) and smart home devices paired with it (Smart Home > Devices).
  • A FRITZ!Box user with the Smart Home right.
  • Gladys Assistant 5.1.0 or later.
  • Gladys on the same local network as the box.

Configuration​

Prepare the FRITZ!Box​

  1. Open the interface of the box (http://fritz.box).
  2. In System > FRITZ!Box Users, create a user for Gladys (e.g. gladys) with a strong password, and tick the Smart Home right. Other rights are not needed.
  3. Make sure your devices show in Smart Home > Devices.

Settings​

SettingDescription
AddressIP address or name of the box. Empty: it is searched on the network (SSDP), then fritz.box.
User namethe user created above.
Passwordits password, stored by Gladys, never written in the logs.
Encrypted (HTTPS)port 443 instead of 80. The box's own certificate is not checked.
Refresh intervalhow often the devices are read: 10 s, 30 s (default), 1 min or 2 min. Button presses follow it.
Language of the nameslanguage of the feature names of the devices you add, and of the messages (French by default).

Run Test the connection: it logs in, counts the devices and lists them in the Discover tab.

Add your devices​

Open the Discover tab of the integration and add the devices you want. A device out of reach of the box is proposed too (it shows its values once it is back). A device paired later shows at the next read.

Devices​

Every device is read by the integration itself, at the refresh interval: one request to the box for all the devices. Only the values that changed are sent to Gladys.

Plugs​

FRITZ!DECT 200, 210 and HAN-FUN plugs of other brands:

FeatureType in GladysNotes
Powerswitchon/off, controllable
Power consumptionpower, in W
Energyenergy, in kWhtotal measured by the plug
Voltagevoltage, in Vwhen the box reports it
Temperaturetemperature, in °Cmeasured by the plug, offset of the box

A plug locked in the box ("switching lock") refuses the commands, with a message.

Radiator thermostats​

FRITZ!DECT 301, 302 and Comet DECT:

FeatureType in GladysNotes
Target temperaturethermostat setpoint, in °Ccontrollable, 8 to 28 °C in half degrees
Heatingthermostat mode (off/heating)off closes the valve; heating returns to the weekly programme
Window (open window mode)opening sensor"open" while the thermostat keeps its valve closed
Boostinput (on/off)on during a boost
Temperaturetemperature, in °Cmeasured
Batterybattery, in %

Commands are bounded on purpose: a target below 8 °C or above 28 °C is brought back into this range, and "heating" goes back to the comfort or eco temperature of the programme set in the box, never to the permanent "on" (valve open whatever the temperature). A thermostat locked in the box, in summer mode or following the holiday programme refuses the commands, with a message. The window and boost features exist on recent thermostats only (not on the first Comet DECT).

Blinds​

Rollotron and other blinds on DECT ULE / HAN-FUN:

FeatureType in GladysNotes
Positionblind position, %100 = open, 0 = closed; controllable
Blindblind stateopen, stop, close

Lamps​

FRITZ!DECT 500 and other HAN-FUN lamps:

FeatureType in GladysNotes
Lightlight on/offcontrollable
Brightnessbrightness, in %controllable
Colorcolourcontrollable (FRITZ!OS 7.39 or later); empty in white

Detectors​

HAN-FUN detectors paired with the box: a door or window contact is an opening sensor, a smoke detector a smoke sensor, a motion detector a motion sensor, a water detector a leak sensor; others an input (on = alarm).

Buttons and sensors​

The FRITZ!DECT 400 and 440 buttons show their battery (and the temperature and humidity measured by the 440). Their presses are the Button pressed trigger. A FRITZ!DECT repeater shows its temperature.

Dashboard widget​

FRITZ!SmartHome: three tiles (power drawn by the plugs, thermostats heating out of all, open windows), then up to ten lines: thermostats (measured → target temperature, or off, boost, open window, summer, holiday), plugs (on and power), lamps, blinds, detectors, a low battery, a device out of reach. Settings: the devices to show; empty, the devices you added (or all the devices of the box if none is added yet). The widget is read-only: control the devices from their own dashboard boxes or from scenes.

Scene triggers​

TriggerFilters (optional)Variables
FRITZ!DECT button pressedbutton device, which button (400, or one of the four of the 440), short or long press (400)device name, button, press
Open window detectedthermostatdevice name, minutes before it heats again
Battery lowdevicedevice name, battery level (%)

The box gives the time of the last press of each button: the integration sees a press at its next read (10 s to 2 min later, see the refresh interval), and two presses of the same button between two reads count as one. The events seen before a start of the integration are not replayed.

Scene actions​

Set a radiator thermostat: thermostat, mode, duration.

  • Comfort temperature / Eco temperature: the temperatures set in the box for this thermostat.
  • Boost: valve fully open for the duration (30 min by default).
  • "Window open": valve closed for the duration (15 min by default), e.g. while you air a room.
  • End boost and "window open".

The duration is 24 hours at most, the box's limit: the boost and the "window open" mode always end by themselves.

Scene examples​

  • Air the bedroom: when the window contact of the bedroom opens, "Set a radiator thermostat" → "Window open" for 20 minutes; when it closes, "End boost and window open".
  • A button for the bathroom: when the FRITZ!DECT 400 of the bathroom is pressed (short press), boost the bathroom thermostat for 30 minutes; long press, turn the towel heater plug off.
  • Battery reminder: when a battery turns low, send a message "Battery of {{triggerEvent.data.device_name}}: {{triggerEvent.data.battery}} %".

Troubleshooting​

  • "refused the user name or password": check them in System > FRITZ!Box Users. After a failure, the integration waits 15 minutes, then longer and longer up to 4 hours (or a change of the configuration), before trying again: the box blocks logins for longer and longer after failed attempts.
  • "blocks logins for … s": the box refuses logins after failed attempts; the integration waits.
  • "lacks the Smart Home right": tick it for the user in System > FRITZ!Box Users.
  • "No FRITZ!Box found": enter the address of the box in the configuration.
  • A device shows "Out of reach": it lost the DECT connection with the box (battery, distance).
  • Commands refused: the device is locked in the box, or the thermostat is in summer or holiday mode.
  • More details: set LOG_LEVEL=debug on the container of the integration.

Limits​

  • Groups and templates of the box are not proposed: a group would duplicate the devices it contains. Control the devices one by one, or with a Gladys scene.
  • A button press is seen at the next read of the box, not instantly; two presses between two reads count as one.
  • Colour temperature (white tones) of the lamps is not offered, only the colour.
  • Thermostat holiday and summer periods, comfort and eco temperatures and the weekly programme are set in the box, not from Gladys.
  • Developed without the hardware: based on the AVM documentation and on real answers collected by pyfritzhome; behaviours of devices not covered by these answers may differ.

Configuration settings​

These are the settings FRITZ!SmartHome asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Connect your FRITZ!BoxsectionNoYour DECT smart home devices (plugs, radiator thermostats, blinds, lamps, buttons, detectors) are read from the FRITZ!Box. In the FRITZ!Box (http://fritz.box), create a user with the "Smart Home" right in System > FRITZ!Box Users. Then run "Test the connection" and add your devices in the Discover tab.
Address of the FRITZ!BoxstringNoLeave empty to find it automatically on the network.
FRITZ!Box user namestringYesA user of System > FRITZ!Box Users, with the "Smart Home" right.
PasswordsecretYes
Encrypted connection (HTTPS)booleanNoPort 443 instead of 80. The box's own certificate is not checked.
Refresh intervalselectNoHow often the devices are read from the box. Button presses are seen at this pace.
Language of the feature namesselectNoNames given to the features of new devices, and language of the messages.

How to install FRITZ!SmartHome in Gladys​

  1. In Gladys, open Integrations: FRITZ!SmartHome appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-fritz-smarthome:1.0.0), 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/guim31/gladys-fritz-smarthome.

FRITZ!SmartHome 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​

FRITZ!SmartHome 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 guim31, 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 🙂