The same here: there’s only a diagnosis of the battery level available
I’ve read of some problems regarding the API (no push available).
I can read temperature, humidity and battery. But I don’t get the switches. I don’t even dream of using the display.
I can see the temperature in the Diagnose information. However, I would appreciate this to be moved to the sensor section.
In addition I would appreciate support for all buttons and potentially also for the display
I got a Fritz!DECT 400 working! What I did was use the Fritz Smart Home interface (not the HA Fritz integration) to create a webhook. The webhook can then be used in HA for triggering automations/scripts, etc.
In the Fritz! Smart home settings for the Fritz400, create a template. You have the option to enter a URL. The format you want is: http://192.xxx.xxx.xx:8123/api/webhook/webhook_id
Obviously, enter your HA IP address and change “webhook_id” to whatever you want to call it. Next is important, click the drop-down for “Additional Settings” and change the method to “POST”. Once your template is done, you need to create an automation next. This basically links the button press of the switch to the template you just created. The 400 switch let’s you have two automations, short press, and long press. I used both so I have two templates created because I need two webhooks so HA knows the difference.
You can now use a webhook as a trigger. You only need to enter the webhook id, not the full URL inside HA.
Tony
Hello Tony,
Which Fritz!OS version are you using?
It auto-updates, so v7. 50.
Hi Tony,
thanks for this tutorial on using the 4 buttons of the DECT 440. In my case I am using an older FritzBox 7490 which was running 7.29. With that it was not possible to generate the webhook. Unfortunately, the 7490 final release 7.50 is not ready, but fortunately the beta (lab) version can be applied to the 7490 and after doing that everything worked as you have described. I am positively surprised that you can even put text for the button in the device (see photo) and that the time to execute is speedy.
Cheers,
Frank
Super! Glad I could help. I never looked at the DECT 440 before but I might pick one up as you can add text plus 4 buttons is very useful.
Tony
I have not understood this yet. Where and how do I create this webhook? In Home Assistant or on the FritzBox? And what do I have to do with it?
Hi Marku,
The webhook is created by you and can be anything you want. Think of it like a secret code word. You are telling the Fritz button/device what secret code word to use (the webhook) and who to tell it to (your Home Assistant instance). Every time you press the button it will be telling HA your code word. Nothing happens unless you also tell HA what to do in the event it ever hears this code word. You do this by creating an automation in HA and as a trigger you have a webhook as the trigger (and you tell it exactly what webhook/code word to listen for).
Example:
You want to open the garage door when the Fritz button is pushed assuming your HA can already control the garage door as needed. Let’s call our webhook open_garage_door
for simplicity. Your HA has an IP address of 192.168.1.29:8123.
- In the Fritz smart home settings create a template and choose the option to enter a URL. As the URL, enter:
http://192.168.1.29:8123/api/webhook/open_garage_door
- Also go to additional settings and change the method to POST
- Next go to automations in the Fritz smart home settings and create a new automation. Here you can tell it what button will do what task/template. Basically links a button push to the template you created before. Now, anytime the button is pushed it will tell your HA:
open_garage_door
- Since HA has no idea what to do with
open_garage_door
, you have to tell it what to do. Create an automation in HA using the simple automation creator and as a trigger tell it to use a webhook. It will ask for the webhook ID and here you simply putopen_garage_door
- Complete the HA automation to add the action to actually open your garage door and that should be it!
More info on webhooks here: Automation Trigger - Home Assistant
Tony
That’s great. A bit tedious, but it works. Thank you very much
Hi Frank,
I wasn’t able to create a routine for the 440 switch. I have the Fritz!Box 7590 with 7.50.
But if I want to create a routine for the 440 I can only select between Temperatur and humidity
It only works for the 400. And how can I change the text on the 440 display?
Markus
For 440:
- create template to open webhook URL (URL opening is under “comfort functions”)
- Edit settings of the 440, click edit (pencil symbol) for “display 1”, “add action”, “scenario/template”, and select the template.
btw, interestingly, DNS does not work for this in my case. But my fritz!box is in IP Client mode, so maybe that’s the reason. I had to use IPs.
Update:
If the requirement is only to trigger the actions of the Fritz!DECT button, then I found a way to realise this without any webhook, which is even simpler.
The AVM FRITZ!SmartHome integration is able to trigger Fritz!Box templates: just create a template that does whatever you want the button to do. Then, in Home Assistant, the template will appear as device and you can trigger it.
If you need to know when a DECT 400/440 button has been pressed, then you still need the webhook it seems.
With Fritz!OS 7.57 some menues are different. I made a little visual helper on how to add a webhook for the 440 buttons. Appologies for German menues only.
Finally you need to do the automation in Home Assistant using the webhook, in my example taster_og_ro.
just registered to compliment on this solution.
worked like a charm (and easier than most automations).
important to point out though, that the buttons/automations are not fully supported prior to Fritz!OS 7,5.
(device registers but only shows 1 button in 7.3)
works perfect :)…
Works very well,
I managed to use one button to toggle light on/off
Hm well, anyone an idea how to change color or brightness with a second button?
Maybe a counter 0-255 or 1-100 as percetage representing the brightness and setting the corresponding attribute in the linght entity?
cheers Franky
I used a combined approach of web hook, parameter, and script to change for example the color temp.
For the web hook I use the GET method together with a URL parameter as this allows to copy-paste the complete URL into a browser and test the call and automations independent of the FritzDect 440, e.g.
URL call with parameter
http://192.168.200.45:8123/api/webhook/my_secrect_webhook_id?command=esstisch_an
Web hook automation
alias: FritzBox Webhook
description: ""
triggers:
- allowed_methods:
- GET
local_only: true
webhook_id: "my_secrect_webhook_id"
trigger: webhook
conditions: []
actions:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.query.command=='esstisch_an' }}"
sequence:
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.esstisch_an
- conditions:
- condition: template
value_template: "{{ trigger.query.command=='esstisch_color_temp_up' }}"
sequence:
- action: script.light_color_temp_up
metadata: {}
data:
max_color_temp: 4000
target_light: light.esstisch
color_temp_step: 300
Script for color temp up
alias: light color temp up
sequence:
- action: light.turn_on
target:
entity_id: "{{ target_light }}"
data:
color_temp_kelvin: >
{{iif(state_attr(target_light,'color_temp_kelvin')+color_temp_step >
max_color_temp, max_color_temp,
state_attr(target_light,'color_temp_kelvin')+color_temp_step)}}
fields:
target_light:
name: Light
description: Light for color temp down
selector:
entity:
filter:
domain: light
required: true
max_color_temp:
name: Maximal color temperature
default: 4000
selector:
number:
mode: box
required: true
color_temp_step:
name: Change of color temperature per step
default: 300
selector:
number:
mode: box
required: true