i am currently trying to send an http post to my hassio via IFTTT, which I am calling via my ghome.
I already have configured http post for my flic buttons as well as tasker and it works flawlessly, but for a strange reason it does not work via ifttt. Here is what I got:
I suppose there is a script.toggle service, but Iâm wondering why youâre using that instead of script.turn_on, or even script.MYSCRIPT (i.e., âŚ/api/services/script/MYSCRIPT.) If you use this latter form then you donât need to specify any body.
Regarding the specifics of your IFTTT webrequest, I donât see anything obviously wrong. FWIW, error 400 is âbad requestâ, which I think usually means the URL or body is malformed.
I just tried invoking one of my scripts both ways (script/SCRIPTNAME, and script/toggle with the body specifying â{âentity_idâ:âscript.SCRIPTNAMEâ}â) using curl, and both ways worked. So I guess the fact that youâre using script/toggle isnât an issue.
So, not sure whatâs wrong with your IFTTT webrequest. Unless did you maybe spell the name of the script wrong???
before using toggle, i tried turn_on intuitively. when that didnât work I just copy pasted everything from tasker and from my flic configuration, where it is working.
but ifttt returns that weird error and really do not understand why. is there something else I need to configure within hassio, so that ifttt can communicate with it? If yes, it would surprise me, because I did not have to do that for tasker or flic. After all, I am just asking ifttt to send a command to HASS via the hass api, which is apparently working, but not for iftttâŚ
ok, nevermind, I solved it by using my non-existing artistic skills:
the quote signs were different from each other. if you look at the quotes within the body code, you will find that the last quotes differ from the other ones, as those are vertical and the others diagonal.
what is this BS? everytime you think you have seen it all, you get surprised.
long story short: problem solved by retyping quotation marks, which were âbuggyâ due to copy pastingâŚ