Auth: false (webhook, IFTTT, Home Assistant)


#1

I can’t get IFTTT webhook working on my Synology. Everytime I active the webhook with Google Assistant, homeassistant.log shows something like this:

2019-01-04 02:10:51 INFO (MainThread) [homeassistant.components.http.view] Serving /api/webhook/47270ee44ede6700523cce382e6986578984dda7292bf2475c79752e83c6bc57 to 54.167.40.27 (auth: False)

The token is correct. i’m not using SSL. Can anyone help?

Best regards
Claus


#2

Hey, I was having the same issue and I also thought it had something to do with authentication but actually you will also see this message if the syntax of your POST is wrong. What are you trying to achieve?


#3

I’m trying to send a webhook from IFTTT with the following code:

["vacuum.xiaomi_vacuum_cleaner", "command": "app_zoned_clean", "params": [[18500, 17500, 23500, 19100, 1]]}

However the Xioami won’t start.


#4

There is already a xiaomi component on home assistant, aren’t you able to use that?

Also your code is wrong. You start with “[” instead of “{” and the formatting is messed up. If I understand what you’re trying to do correctly, your code should look like this :

{ "action": "call_service", "service": "vacuum.xiaomi_vacuum_cleaner", "command": "app_zoned_clean", "params": [18500, 17500, 23500, 19100, 1] }

This could probably be improved but it should work.

Then you should have an automation setup to consume the data coming from that webhook. I suggest you read the IFTTT doc for this.


#5

Thank you. I’ve spent a lot of time but can’t get it just right. How would you construct the automation?

automation:
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service

?

#6

I’m getting this error (the same error I’ve had for days, I don’t know the solution :frowning:

2019-01-06 19:45:36 ERROR (MainThread) [homeassistant.core] Invalid service data for vacuum.send_command: required key not provided @ data['command']. Got None

#7

try this:

automation:
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
  action:
    service_template: '{{ trigger.event.data.service }}'
    data_template:
      command: '{{ trigger.event.data.command }}'
      params: '{{ trigger.event.data.params }}'

#8

Still not working ;/ log says "unable to find service vacuum/xiaomi_vacuum_cleaner

Shouldn’t service be vacuum.send_command instead of vacuum.xiaomi_vacuum_cleaner. And then an entity_id with vacuum.xiaomi_vacuum_cleaner ?

If I use the service dev tool in HA the following works perfect:

{  "entity_id": "vacuum.xiaomi_vacuum_cleaner",  "command": "app_zoned_clean",  "params": [[18500, 17500, 23500, 19100, 1]]}

I just don’t know how to get it to work from a webhook.

If I use:
trigger:
platform: event
event_type: ifttt_webhook_received
event_data:
action: call_service
action:
service_template: ‘{{ trigger.event.data.service }}’
data_template:
entity_id: ‘{{ trigger.event.data.entity_id }}’
command: ‘{{ trigger.event.data.command }}’
params: ‘{{ trigger.event.data.params }}’

And:
{ “action”: “call_service”, “service”: “vacuum.send_command”, “entity_id”: “vacuum.xiaomi_vacuum_cleaner”, “command”: “app_zoned_clean”, “params”: [18500, 17500, 23500, 19100, 1] }

It starts cleaning in zone cleanup BUT on the map it doesn’t show the zone, and what it actually does is start a normal cleanup. It looks like the params is not being passed on to the unit when sent from webhook. As I wrote earlier, if use the same command through service dev tool, it works perfectly.


#9

Hey,

As I don’t own a Xiaomi it’s a bit hard for me to come up with the right code since my process involves a lot of trials and errors ^^

If it’s just an issue with the params, maybe I was wrong to remove the double brackets, try to put them back: [[18500, 17500, 23500, 19100, 1]]

and use the same automation in home assistant


#10

I did try with double brackets. No luck. I ended up making scripts and calling them instead. It was just easier if I could send the params through ifttt. But thank you for your help:)