Communicate IFTTT with AM

Post your questions and help other users.

Moderator: Martin

Post Reply
ariloc
Posts: 109
Joined: 05 Jun 2016 21:36

Communicate IFTTT with AM

Post by ariloc » 24 Apr 2019 21:11

Hi, I've lastly been trying to make my home smart and I wanted to make some custom commands with Google Assistant and IFTTT so I can toggle several things on my phone and start some flows with my voice. For the past month I've been using IFTTT with AutoRemote Lite and Plugin integration with AM to do so. The issue is that AutoRemote Lite only allows max 2 characters per mesaage so I was coding each action with 2 capital letters and then Automagic can differentiate between all the applets I have.

But I encountered some situations where I need more than to do things like sending SMS through my phone (as Google's is not available in my country yet). I thought of IFTTT doing this by itself, but it doesn't seem to be reliable. Also it's unreliable to make a notification from it with the app, so then AM catches that, deletes it and makes the action I want.

So as I'm not willing right now to buy Join nor AutoRemote, my question is:
Is there another way to communicate IFTTT with Automagic that I don't know of? (from the first one to the second, as the other way around is quite easy with an HTTP request)

Thanks.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Communicate IFTTT with AM

Post by Wibbly » 25 Apr 2019 06:13

> Also it's unreliable to make a notification from it with the app, so then AM catches that, deletes it and makes the action I want.

What is the source of unreliability using notifications from a IFTTT and catching those? That's the technique that I use and it's not a 100% reliable but as good as it gets, I think, with IFTTT which itself is not 100% reliable. Sometimes the IFTTT services fail (see the activity log on your account) and sometimes the IFTTT response is delayed.
Last edited by Wibbly on 25 Apr 2019 14:46, edited 3 times in total.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Communicate IFTTT with AM

Post by Desmanto » 25 Apr 2019 11:01

How do you use IFTTT as the connector? Is it a must to use Google assitant as the main app? If yes, there are some inter-event you can use actually, such as create calendar, send sms, create reminder, take screenshot or maybe broadcast message.

Then use automagic trigger to catch those event, example taking screenshot will produce notification screenshot saved. Use trigger notification for the screenshot text to get the event. Reminder/calendar maybe is better, as you can have text inside. I don't know yet which one is the best to use, and doesn't spam the system with a lot of notification/event.

I have my own speech project with action input dialog (speech), which will recognize the command and I can spread the command to each action based on a gigantic map-list database. I do it as fun project and to prank or show off. But it doesn't have urgent/daily usage purpose, so I have digressed for more than a year. My flow can work offline, although it will less accurate.

There is also another method using hotword plugin : viewtopic.php?f=4&t=7197
which work offline too. You can create your own custom trigger word. You can also paired this with google assistant or Automagic input speech (after triggered, run the GAss or Input speech).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Communicate IFTTT with AM

Post by Wibbly » 25 Apr 2019 14:50

> there are some inter-event you can use actually

I just use IFTTT's Then feature: 'Send notification from the IFTTT app', which I am running on my phone. Automagic catches that as a trigger, subject to the problems I noted above, which seem to be IFTTT related.

Using Google Assistant as the intermediary has the benefit that it works from other devices like Google Home, not just my phone :-)

ariloc
Posts: 109
Joined: 05 Jun 2016 21:36

Re: Communicate IFTTT with AM

Post by ariloc » 25 Apr 2019 17:22

I wanted a more direct method that didn't depend on the communication with the app. Just wanted a straight internet message to AM, as my method is quite quick in comparison to the notification one. I think I can try other intermediate actions as @Desmanto suggested. But I guess if there isn't anything more than that, I may stick with notifications as @Wibbly does, for the ones that require text and more info than just a command, and keep using AutoRemote with applets that require speed in their execution.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Communicate IFTTT with AM

Post by Desmanto » 25 Apr 2019 18:01

@Wibbly : I never really try to use IFTTT. But If I want interconnection message between AM powered devices, not located in the same network, I thought about using whatsapp/gmail as the communication. Gmail is the best, as all android usually will have google account login. But using them will spam the email/chat if you have so many command/events everyday. The other method is to use MQTT, there is free plugin out there, encrypt the message and use free MQTT broker out there. Client device will subscribe to the topic and receive command, decrypt it and do the command. That's why I ever request java crypto here : viewtopic.php?f=4&t=7892 We need to encrypt the communication as others might see the command and mimic the command, spamming our client device.

Using google home, we can use "broadcast message" to send message to all connected device. I am trying to find a way to create event on other device using the GAss alone. If we can utilize that, then inter network communication can be done. If it is the same local network, I can simply use HTTP request trigger, which is what I use currently. But separate network will require routing and not all devices have connection that has public IP that can be forwarded.

@Ariloc : HTTP request trigger is the one you need. Autoremote wifi lite server also has the same concept. The downside is you must can reach the IP, which mean it only works mostly in same local network only (same subnet). Different network will require routing/port forwarding and usually hindered by public IP.

If autoremote only support 2 chars, you can actually have a lot of combination from these only. Even using lower case alphabet, you can construct 26x26 = 576 possible combination. Just use map to assign each string to the specific action/message.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Communicate IFTTT with AM

Post by Wibbly » 25 Apr 2019 18:56

For out of band communications from AM to AM instances I also use SMS. In the UK at least many contracts allow you to send unlimited SMS and it doesn't rely on the IP network at all. Of course you need GSM coverage. And it's not a specific solution for voice activation, so a bit off topic!

ariloc
Posts: 109
Joined: 05 Jun 2016 21:36

Re: Communicate IFTTT with AM

Post by ariloc » 02 May 2019 23:17

Desmanto wrote:
25 Apr 2019 18:01
@Wibbly : I never really try to use IFTTT. But If I want interconnection message between AM powered devices, not located in the same network, I thought about using whatsapp/gmail as the communication. Gmail is the best, as all android usually will have google account login. But using them will spam the email/chat if you have so many command/events everyday. The other method is to use MQTT, there is free plugin out there, encrypt the message and use free MQTT broker out there. Client device will subscribe to the topic and receive command, decrypt it and do the command. That's why I ever request java crypto here : viewtopic.php?f=4&t=7892 We need to encrypt the communication as others might see the command and mimic the command, spamming our client device.

Using google home, we can use "broadcast message" to send message to all connected device. I am trying to find a way to create event on other device using the GAss alone. If we can utilize that, then inter network communication can be done. If it is the same local network, I can simply use HTTP request trigger, which is what I use currently. But separate network will require routing and not all devices have connection that has public IP that can be forwarded.

@Ariloc : HTTP request trigger is the one you need. Autoremote wifi lite server also has the same concept. The downside is you must can reach the IP, which mean it only works mostly in same local network only (same subnet). Different network will require routing/port forwarding and usually hindered by public IP.

If autoremote only support 2 chars, you can actually have a lot of combination from these only. Even using lower case alphabet, you can construct 26x26 = 576 possible combination. Just use map to assign each string to the specific action/message.
Thanks for your help. My issue was receiving data, as I need some sort of server to do that, as sending was easy. But I think I can manage with a combination of both AutoRemote and IFTTT notifications. Maybe also IFTTT sending SMS can work now that @Wibbly mentions, maybe not that fast, but gives me new ideas of other things I can do :)

Post Reply