How to get IFTTT working with new auth

nope, same error.
Is this code need some modifications to work properly?

I copied it as it is and pasted into automations.yaml file and I checked its inclusion into configuration.yaml

I’m not sure what to say. So you have the IFTTT integration set up? And you used that with your IFTTT setup?

and then you set it up like this
How to get IFTTT working with new auth.

So nothing is happening at all?

Ok, actually trying again from IFTTT I get 301 error. I enabled an apache proxy by following this guide to redirect hs traffic on a specific domain like myhome.domain.com and secure it with cloudflare.
Do you have something like this?

Sorry, honestly, I have a super simple setup. Just followed the instructions and it worked for me. I dont have any redirects or anything like that.

Thanks for your patience, I was using http instead of https, DOH! :sob:
In any case your code was a missing piece in my config, big thank you

1 Like

Do you know if this is mandatory to activate the API component with this in the configuration.yaml to make the IFTTT integration work ?

api:

ifttt:
key: key_here

I found the answer: NO you don’t need the API component activated to make this work.

Hello Folks,

I’m going crazy with this setup…

My setup :

  • Raspberry PI 3 with Hass 0.88.2
  • Duckdns enabled and works via 443 and 8123
  • IFTTT API code generated https://xxxx.duckdns.org:8123/api/webhook/xxxxx0f06dcf14492a8125908780b7b0a954243dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Configuration enabled and works.
  • Xiaomi Vacuum added and works from hass dashboard.

My problem is that I can not get to work with IFTTT.

This is how my applet looks :

Body : { "action": "call_service", "service": "vacuum.start", "entity_id": "vacuum.xiaomi_vacuum_cleaner" }

If i access the URL from web browser I get this :

Hope to get some help on this issue, thanks

Have you added the required automation in your HA configuration?

You then need to consume that incoming information with the following automation:

automation:
  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 }}'

Also I’m having an issue with this not working…

  1. Added the above automation to catch webhook events
  2. Have a generated webhooks link with the token
  3. In IFTTT have voice command for Google Home to execute the webhook, but nothing happens except responding my preset phrase.
  4. POST-ing anything to the webhook link returns “200 OK” status, but nothing happens in my Home Assistant or any devices

For example sent a POST to https://xxx.duckdns.org:8123/api/webhook/xxx as JSON { “action”: “call_service”, “service”: “light.turn_off”, “entity_id”: “light.all_lights” } and response is “200 OK” but nothing happens

same thing is happening to me i just noticed. but only on the ones where i want to create a phrase and have it send a webhook. other things sending webhooks works.

Didn’t work for me, nothing is happening

Sticking to legacy api for now…

Which direction, IFTTT to HA or vice-versa?

Did you make sure your base_url is set correctly in configuration.yaml? Then did you save the webhook url that appeared when you created the IFTTT integration in HA? As far as I can tell, it appears once only, and then it’s gone if you don’t copy and save it. Doing a POST to that url from IFTTT works to trigger an IFTTT event.

need help.

  • base url configured
  • https://xxx.duckdns.org:8123/api/webhook/xxxx configured in ifttt
  • webhook posts are like this { "action": "call_service", "service": "input_select.select_option", "entity_id": "input_select.b43_state", "option": "one" }
  • copied and pasted the automation made for “consuming incoming information”

i tried listening ifttt_webhook_received and HA receives the payload but it doesn’t change the input select option…

Sound like your webhook in IFTTT may be wrong?

Here is mine for turning on an input boolean

{ "action": "call_service", "service": "input_boolean.turn_on", "entity_id":"input_boolean.paul_in_bed" }

Edit, nevermind, I misread, thought it was input bool, not input select.

Here is the listened event:

Evento 0 generato 10:00:
{
    "event_type": "ifttt_webhook_received",
    "data": {
        "action": "call_service",
        "service": "input_select.select_option",
        "entity_id": "input_select.b43_state",
        "option": "One",
        "webhook_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx04b5c95876e27e47d7ef7ecfd2"
    },
    "origin": "LOCAL",
    "time_fired": "2019-11-30T09:00:49.981199+00:00",
    "context": {
        "id": "xxxxxxxxxxxx854fea881bacbed48a4ab3",
        "parent_id": null,
        "user_id": null
    }
}

Is the name of your input select

input_select.b43_state ?

Or is it

input_select.b43 ?

It looks like you have everything correct on the IFTTT side as far as it is talking to HA, so I would check your IFTTT automation and the inputs

yes I confirm it’s “input_select.b43_state”

Here is the automation I’m using:

- id: '1575036072589'
  alias: IFTTT to HA
  trigger:
  - event_data:
      action: call_service
    event_type: ifttt_webhook_received
    platform: event
  condition: []
  action:
  - data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'
    service_template: '{{ trigger.event.data.service }}'

Here’s mine

- alias: IFTTT Automation Handler
  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 }}'

Looks about the same. I know this is a dumb question, but it’s happened to me a few times. Is the automation “on”

I copied your automation and tried out, here is what I get from logs:

Error while executing automation automation.ifttt_automation_handler. Invalid data for call_service at pos 1: required key not provided @ data['option']

uff!