After struggling so long with this mobotix webhook, I found a workaround that should work for the most of mobotix owners. The main idea is, that the Mobotix camera writes an image to a FTP Server and to make Home Assistant recognizes the new file. It works fine and when someone presses the doorbell button, Home Assistant reacts only 2 seconds later to it.
Alternative way to make Home Assistant notice, that somebody rang the Mobotix doorbell (Using an FTP Server)
- Install the Home Assistant FTP Add-On and add a ftp user in the configuration tab of the Add-On (make sure, config is set to true if you want to send a picture of the doorbell event, if you are not at home aka outside from your network):
- username: camera
password: YOURSECRET
allow_chmod: true
allow_download: false
allow_upload: true
allow_dirlist: true
addons: false
backup: false
config: true
media: true
share: true
ssl: false
Now start the FTP Server on your HA machine. (I tested with Filezilla, if clients are able to connect.)
- Call up the Mobotix “Admin Menu” by opening it via the Mobotix IP in your Browser and hit the Admin Menu button. Then go to FTP-Profile Settings and set up a profile like this:
Attention: by using the path “config/www/” you will expose this file to the internet without needs of any credentials. If you don’t want that, use the path “share/”.
You need to expose the file via config/www/ only, if you want to get the camera picture shown in notifications outside from your network.
- Test for the correct settings by letting the mobotix camera send the current picture to the HA FTP Add-On:
You can also check the Log File of the HA FTP Add-On. This should look like this:
Thu Dec 14 13:58:56 2023 [pid 2] CONNECT: Client "192.168.178.48"
Thu Dec 14 13:58:56 2023 [pid 1] [camera] OK LOGIN: Client "192.168.178.48"
Thu Dec 14 13:58:56 2023 [pid 3] [camera] OK UPLOAD: Client "192.168.178.48", "/config/www/lastdoorbell.jpg", 108875 bytes, 3387.60Kbyte/sec
- Now leave the Mobotix Admin Menu and go to the Mobotix Setup Menu and call up this menu:
Here you can add the new action, if the button is pressed:
-
Don’t forget to save the new settings permanent via the Admin Menu!
-
Add the following lines to the configuration.yaml:
homeassistant:
allowlist_external_dirs:
- /config/
folder_watcher:
- folder: /config
patterns:
- '*lastdoorbell.jpg'
This allows to fire an event when the file is changed aka somebody rang the door. This we can use now for automations or to press a helper switch…
Automation can look like this:
alias: Doorbell Notification
description: ""
trigger:
- platform: event
event_type: folder_watcher
event_data:
event_type: modified
condition: []
action:
- service: notify.YOURDEVICE
data:
message: Somebody is at the door {{ now().strftime("%H:%M") }}
data:
image: https://YOURDOMAIN.com/local/lastdoorbell.jpg
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
mode: single
I added 5 seconds delay, otherwise i got the notification 4 times. No clue, why… But the delay fixed this.
Pleas keep in mind, that you need some dyndns to use this setting (https://YOURDOMAIN.com/local/lastdoorbell.jpg). I recommend a cloudflare proxy if you got your own domain.
I hope this can help others, who just couldn’t get the mobotix notification to function via webhook.