Listen on a tcp port for commands?

Here a summary of the settings in the screenshot that work for me (Thanks to resoai
Alexey)

3 Likes

Thanks a lot, i will try asap !

You did it ! Thanks a lot :slight_smile:

Take care.

Arnaud

1 Like

Protocol must be raw TCP/IP and not HTTP/1.0-Request which is explicitly sending GET method.

yes :slight_smile: ! Thank you.

Hi, this method seems to no longer working with T26 doorbell. Apparently starting from fw version 5.4.0.44 for the x26 cameras, HTTP POST can now be sent (source: mobotix community)
I tried several combinations, but it seems that the synthax of the call is now different, due to the fw update mentioned above.

For the ones interested in how to solve the webhook issue with Mobotix T2x with recent firmware versions, I found a workaround which consists in using this addon (thanks to @t00ks), which proxies the HTTP GET requests and properly sends them to trigger a webhook:
https://github.com/t00ks/homeassistant_webhook_proxy

Then I configured the IP Notify profile of the T26 doorbell as an HTTP request, as shown:

Hope it helps.

3 Likes

Hello mcfly76,
Yes, you are right. This method does not work for T26.
Can you explain briefly how you installed this addon webhook proxy. I copied the contents of this repo to the cunstomer_component folder in Home Assistant and I don’t see it in integrations. what should i do next?

Thank you!

I did nothing but creating a standard HA webhook, by setting it up in Mobotix web UI according to mobotix documentation. Then the custom integration converts the POST to GET automatically.

I have a problem to create a standart HA webhook. How did you do it. I copied the contents of this github repo to the custom_components folder in Home Assistant and I don’t see this custom integration to setting it up.

I’d personally just use NodeRed, you can set up an endpoint in NodeRed and then tell whatever equipment to make the request to http://ip-of-homeassistant:1880/endpoint/my-webhook-id then in the NodeRed flow, you have a few options - either use the Home Assistant nodes to simply fire a command on the home assistant event bus - name it whatever you want - eg - “my_doorbell_alert” and then create an automation to react to the “my_doorbell_alert” being fired on the event bus. The other option is to still setup a Webhook trigger in the automation - and in NodeRed you simply connect the HTTP IN node that receives the connection on /endpoint/my-webhook-id and POSTS it to HomeAssistant URL /api/webhook/whatever-id-you-created-in-the-automation

I followed these instructions: Automation Trigger - Home Assistant

Please pay attention to the port used by the custom integration, it’s 7123 versus standard HA port which is 8123.

Thank you very much for all answers. The problem is, I cannot install this addon: homeassistant webhook proxy. I copied the contents of this repo to the cunstomer_component folder in Home Assistant and I don’t see it in integrations.
Please support!

Thanks

1 Like

Dear @EKo please read the documentation carefully:

There’s no addon to install in the integrations tab. Simply you define a webhookid in your automation and it will be created automatically.

A late response, it needs to be copied to the addon folder, not the custom_component folder. After that, install the Addon in the store.

1 Like

I am operating a Mobotix S15. I used the configuration from this thread:

I have set up a webhook by providing the webhook_id:

alias: Türklingel
description: ''
trigger:
  - platform: webhook
    allowed_methods:
      - POST
      - PUT
    local_only: true
    webhook_id: doorbell

If I run the Mobotix network test for this profile, the process reports success:

Verschicken einer Netzwerkmeldung gemäß Profil “Home Assistant”. Das kann bis zu einer Minute dauern:
INF: loading notify profile MxEasy19216817833 …
INF: name given by user is Home Assistant …
INF: set profile send order “parallel”
INF: set profile address “192.168.178.62:8123”
INF: set profile data type “msg”
INF: set profile message "POST /api/webhook/doorbell HTTP/1.0
Content Type: application/json
"
INF: set profile raw boundary “”
*INF: force generation of current JPEG … *
INF: [hdl#1] connection established (ip=192.168.178.62, port=8123, fd=2) …
INF: notification to 192.168.178.62:8123 has been sent [msg okay=1].
Result:
INF: sending message succeed. 1x67 bytes in 0.071s.

Even though, the automation with the webhook trigger doesn’t fire. I tested the automation via the terminal command:

curl -X POST -d 'key=value&key2=value2' https://192.168.178.62:8123/api/webhook/doorbell

This triggers the webhook inside the automation successfully.

Any ideas what could be wrong?

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)

  1. 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.)

  1. 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.

  1. 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
  1. 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:

  1. Don’t forget to save the new settings permanent via the Admin Menu!

  2. 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.

1 Like

Hi,
I just made this configuration but my automation does not trigger when I press the bell button on the T25?

hi,
I don’t understand why part 3 is in the config file and not in an automation

Yes, part 3 is an automation. Since an update of HA / Mobotix firmware you may need to install and set up the Web Hook Proxy add-on.