Hello, is it possible to use IFTTT as a trigger for automation? I am fine with using IFTTT as an action, but I have a couple of scenarios where using IFTTT as the trigger would be clever.
xprezz can you give us an example of what you want to achieve?
I use Amazon Alexa to trigger several things through Stringify. Some of the component are inside my LAN and not reachable from stringify. So I usually send a trigger to IFTT which then grabs the right device through home assistant. However I would like to trigger several devices or services in one automation, having IFTTT kick of the automation would be a lot easier. At least the way I have structured my workflows.
For instance when I want to listen to music in my living room I need to turn on my receiver. Then wait. Then turn to the right source and set a certain volume. This requires multiple IFTTT applets. It would be easier for me to trigger IFTTT via alexa which then starts an automation in home assistant.
Make sense?
Use the maker channel to hit the REST API of home assistant.
You could have IFTTT trigger a script through the rest api (POST /api/services/script/{script name}
), or you could try POST /api/events/{event_type}
to trigger an event which you can then write an automation for.
Doing this requires your home assistant to be externally reachable (forward port 8123 or setup https)
more info at
and
I am borrowing this thread. I am struggling with the same thing, I want to do IFTTT to trigger something in a HA. It could be an script or an action.
But I don’t understander how to do it, what do I type in at body in IFTTT?
Hey I solved it this way. Use whatever trigger you want from IFTTT. Then make a web request from IFTTT to a script in HASS:
http://yourhomeassistant:yourport/api/services/script/turn_on?api_password=yourpassword
Post
Application/JSON
{“entity_id”: “script.yourscriptname”}
Hope that helps
xprezz, what would take the place of “entity_id” in the body?
Nothing, entity_id stays as is. Including quotes. Onlything you change is yourscriptname to match the name of the script you want to fire. And of course server name and port. Or am I mistunderstanding the question?
ok so ineed help !!! since webhhoks took over i have ni idea how to configure yaml to get a simple button on my interface to activate a iftt ?help
No different than when it was Maker.
Just create your IFT in Webhooks and your TT to do whatever you want, in this example I set the Webhook event as ‘hive_heat_boost’ and then added this script to HA…
boost_heating:
sequence:
- service: ifttt.trigger
data: {"event": "hive_heat_boost"}
Then trigger the script by whatever method you fancy.
ok this is the first ime i am sending any thing to or from ha to ifttt, so i set up webhooks to “If maker Event “ha_trigger”, then turn on light” and set it for my sonoff light how would i configure my .yaml to have a simple switch or button on the dashboard ? and again thank you for your help i love this interface i just dont know how to control things it cant find like a sonoff switch with original firmware, or the relay on my garage door so the ifttt will be an easy solution once i get it squared away!
If you’re just using the default view it should automatically show up in your front end with ‘ACTIVATE’ next to it.
If you’ve set up views in a groups.yaml, add it to one in there and it will appear.
Being a script you can add it to automations and all sorts of you want.
Well it definitely is not on my front end I default view. I c
this so I know I have ifttt sumwhat but no idea how to configure the .yaml or what to do to get a switch on the front endany more help would be greatly appreciated
Ok thank you for your help I’ve now got it working I watch the video tutorial by somebody or another and it had putting backslashes by my entity ID
didn’t work… Unauthorized service called script/name_of_The_script
Thank you
Only one question: the field “API_PASSWORD” containt a password that I don’t know hot to create…
can you help me?