IFTTT PRO alternative?


#1

1) Give a description of the problem
Since ifttt is turning into a paid service, I trying to see if webcore can replace my existing applet

2) What is the expected behaviour?
Using brillant smart home (in replacement on smart life) in ifttt to connect to smartthings and google home sentence to send to webcore hook. Is there a way to make thome applet function work directly in webcore to avoid using them ? I have virtual switch in smartthings that are use to connect to smart life / brillant home


#2

In a nutshell…

If Smart life can toggle a simulated switch (or send a web request)
Then webCoRE should be able to react to that…

With regards to the other direction:
If Smart life can react to a simulated switch (or accept commands from an external source)
Then webCoRE should be able to initiate that…


#3

Ok great,

is there any exemple of a way to make it work ?

thanks!


#4

I based that statement on your previous quote:


To elaborate a bit:

If Smart life can toggle a simulated switch…
Then the piston can trigger when that device changes

If Smart life can send a web request…
It can directly execute the piston via the External URL.


Going in the other direction:

If Smart life can react to a simulated switch…
Then webCoRE can control that SimSwitch, and Smart life can do it’s thing

If Smart life can accept commands from an external source
Then webCORE can likely send a web request directly to Smart life.


Note:

You will need at least one from the first list, and one from the second list if you want communication to go both ways…


#5

Just posted a piston using an older blink API endpoint, still works but like IFTT it is one way communication so not ideal.


#6

Thanks for the reply

I copied your piston to start something and found out a way to login and retrieve the device with smartlife api

I’m able to make some call with rest api client. When I try to integrate those call on my piston, It’s not working for the moment, the $response is filled with an error and I can’t figure a way to debug it correctly

Log
01/10/2020 à 17:04:11 +656ms
+1ms ╔Received event [Salon - Switch Lampe].switch = on with a delay of 95ms
+106ms ║RunTime Analysis CS > 22ms > PS > 46ms > PE > 38ms > CE
+108ms ║Runtime (46593 bytes) successfully initialized in 46ms (v0.3.110.20191009) (106ms)
+109ms ║╔Execution stage started
+116ms ║║Comparison (enum) on changes = true (0ms)
+117ms ║║Condition #2 evaluated true (4ms)
+118ms ║║Condition group #1 evaluated true (state did not change) (5ms)
+120ms ║║Cancelling statement #3’s schedules…
+126ms ║║Executed virtual command setVariable (3ms)
+132ms ║║Calculating (string) https://px1.tuyaus.com/homeassistant/ + (string) auth.do >> (string) https://px1.tuyaus.com/homeassistant/auth.do
+146ms ║║Sending external web request to: px1.tuyaus.com/homeassistant/auth.do
+380ms ║║Executed virtual command httpRequest (243ms)
+386ms ║║Executed virtual command setVariable (3ms)
+391ms ║║200
+392ms ║║Executed virtual command log (1ms)
+397ms ║║application/json
+398ms ║║Executed virtual command log (1ms)
+403ms ║║[errorMsg:Get accesstoken failed. Invalid parms., responseStatus:error]
+404ms ║║Executed virtual command log (2ms)
+409ms ║║null
+410ms ║║Executed virtual command log (1ms)

this is an image of my piston for the moment


#7

Sorry, not familar with smartlife. Based on logs, it appears to be an authoization issue.

Not sure if it helps but I had to pass my auth token in the authorization header like this
\ required to escape the brackets, sending them as text. Otherwise webcore treats as an expression


#8

Guys, I finally have a working piston to integrate smartthings and smartlife!!!

It was a LOT of work for me to make it work so I will share it with you, if you want to avoid the subscription fee with ifttt pro!

If you have some comments, let me know, pretty sure it’s far from perfect

thanks