Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IFTTT and Glitch Question #307

Open
outdoor720 opened this issue Jun 27, 2020 · 68 comments
Open

IFTTT and Glitch Question #307

outdoor720 opened this issue Jun 27, 2020 · 68 comments

Comments

@outdoor720
Copy link

@keydon @OmerTu
If i've read correctly IFTTT does not work with Glitch any longer?

What do you suggest as an alternative and easy way to get IFTTT to trigger Kodi commands?

@outdoor720 outdoor720 changed the title IFTTT and Glitch IFTTT and Glitch Question Jun 27, 2020
@harlekinrains
Copy link

I've posted a temporary workaround on the kodi forums, if you want it to work currently:
https://forum.kodi.tv/showthread.php?tid=314096&pid=2961230#pid2961230

It probably would be preferable to buy a RaspPi and start hosting it yourself via docker at this point though. :)

@keydon
Copy link
Collaborator

keydon commented Jul 21, 2020

I dont know about glitch and their plans. If the problem persists I will just remove them from the readme soon.
Other known hosting options are described in the readme. pick one.
Or if you find alternatives to glitch out there, please share.

@RonnieBoy82
Copy link

Should be able to set up on Repl.it but I am not a coder. If someone gets it working, please let me know

@RonnieBoy82
Copy link

Ok, have simple commands working on repl.it. Can’t get any commands with text fields to work. Please help

@RonnieBoy82
Copy link

Number fields are ok but text fields bring back a 500 error on ifttt

@RonnieBoy82
Copy link

Ok got this all working on repl.it. Make sure to install packages

@outdoor720
Copy link
Author

Ok got this all working on repl.it. Make sure to install packages

RonnieBoy,

Sorry i don't see a specific solution? is the Repl.it link supposed to take me to some coded repository that reproduces what glitch did?

@RonnieBoy82
Copy link

Repl.it is a website offering an alternative to glitch. Can import the project from GitHub just like glitch. Can’t help with the setup though. I don’t know coding but a friend managed to get it to work right for me

@harlekinrains
Copy link

Its not as easy as setting it up on repl.it via the github import, adding the .env variables and hit run. So when you can, could you ask your friend how he set it up. Any additional pointers would be helpful.

(By default it runs under node.js (nom start)) and errors out when trying to launch the start script. :)

@RonnieBoy82
Copy link

No env file. Put that info in the kodi-hosts.config.js.dist file and rename the file to remove the .dist. Basically the instructions for setting up a local server instead.

@RonnieBoy82
Copy link

And I just leave the page open on my phone to ensure it stays live. Not sure if it’s necessary.

@RonnieBoy82
Copy link

You also need to do “npm install” in the console for the packages to install.

@harlekinrains
Copy link

harlekinrains commented Jul 23, 2020

Works. Thank you so much. :)

edit: Here is a short write up for everyone else trying to get it to work. Create an account with repl.it (or use your github account to authenticate).

Click on 'My Repls', '+ new repl', import from github. Enter the github address ( https://github.com/OmerTu/GoogleHomeKodi ). Wait a while for the project to be downloaded and set up. repl.it will automatically identify it as a node.js project, click ok on that dialog box.

Replace the settings you would set in the .env file for a glitch.com installation in the kodi-hosts.config.js.dist file, as described above. Then rename that file to kodi-hosts.config.js

Type npm install into the shell/terminal window on screen, hit enter and wait a while.

Then hit the run button at the top of the site. At this point your 'test your connection to kodi' interface should pop up and already work. That interface sports a link at the top - this is the link you have to feed IFTTT instead of the glitch link (with /command (f.e. /playpause) at the end where necessary).

Works like a charm. :)

@RonnieBoy82
Copy link

RonnieBoy82 commented Jul 23, 2020

Thank you for doing that walk through. I was trying but where I worked at it then had another guy work at it over the course of 4 days I wasn’t sure if everything that was done. Collaboration gets things done. Now that walk through just needs to get put in the main instructions

@outdoor720
Copy link
Author

Works. Thank you so much. :)

edit: Here is a short write up for everyone else trying to get it to work. Create an account with repl.it (or use your github account to authenticate).

Click on 'My Repls', '+ new repl', import from github. Enter the github address ( https://github.com/OmerTu/GoogleHomeKodi ). Wait a while for the project to be downloaded and set up. repl.it will automatically identify it as a node.js project, click ok on that dialog box.

Replace the settings you would set in the .env file for a glitch.com installation in the kodi-hosts.config.js.dist file, as described above. Then rename that file to kodi-hosts.config.js

Type npm install into the shell/terminal window on screen, hit enter and wait a while.

Then hit the run button at the top of the site. At this point your 'test your connection to kodi' interface should pop up and already work. That interface sports a link at the top - this is the link you have to feed IFTTT instead of the glitch link (with /command (f.e. /playpause) at the end where necessary).

Works like a charm. :)

So does this work for any command or only play?

@harlekinrains
Copy link

harlekinrains commented Jul 23, 2020

Tested it with my custom german setup on IFTTT (using all kinds of /somethingsomething commands). Seems to work with all of them (tested /playpause /playyoutube (with a custom Kodi API key (changed in kodi-hosts.config.js ) /stop /koditestconnection - all of them worked).

@harlekinrains
Copy link

Only issue so far is, that the server stops running the code after a certain amount of time, so you'd have to press "run" again on the project once in a while when you want to use it.

Having the website open on a smartphone like suggested is a workaround that might be workable. :)

@RonnieBoy82
Copy link

Works for all commands and leaving the site open does work.

@harlekinrains
Copy link

Good to know - might have been my smartphone going into deep sleep, or me connecting from a second machine in between and then letting that one (laptop) go to sleep as well.

@RonnieBoy82
Copy link

RonnieBoy82 commented Jul 23, 2020

Even after a few hours I refreshed the page and the run button was there again but the voice commands still work. Little lag every now and again. Free service so should expect that

@harlekinrains
Copy link

I had a connection interrupted message there, and the voice commands had stopped working. This might be my brand of android rom (chinese vendor, known to kill processes in the background, or at least not allow them to wake up the device radio (/wlan) in deep sleep, to save battery), or it might have been, that I loaded up the instance from a laptop in between. But it is encouraging to hear, that it stays up for several hours (and potentially more) in your case. :)

@outdoor720
Copy link
Author

Do have to create separate ifttt applets for each command?

@RonnieBoy82
Copy link

RonnieBoy82 commented Jul 23, 2020

That’s the way I set it up. Worth it for customizing your commands and what google home says in response. Also I already had the ability to control volume and play/pause/stop with my Xbox that I use for Kodi so I didn’t set those commands up. Only the commands I actually use.

@RonnieBoy82
Copy link

I leave repl.it open in the background on my phone and even after no commands all night, still working this morning without restarting

@harlekinrains
Copy link

harlekinrains commented Jul 24, 2020

Same here (left it open in a Chrome tab on my android phone in the background over night). :) Yay. :)

Also, everyone setting this up - would probably benefit from making a shortlink to the repl.it project page (where you can press start), I did it on my own domain/website, but bit.ly or something similar would work just as well. :)

@outdoor720
Copy link
Author

I was able to get pipedream to work as well without having to have anything open or copy repository. It works through existing Glitch. And Apparently it should be not too difficult to setup with variable IFTTT command.

I just don't know coding, so need assistance on that part

Here is what i have:

// Make an HTTP GET request using axios
const resp = await axios({
method: "POST",
url: https://xxxxliving.glitch.me/navdown,
headers: {
"Content-Type": "application/json"
},
data: {"token":"xxxx"}
}
);
await sleep(5000);
await axios({
method: "POST",
url: https://xxxxliving.glitch.me/navdown,
headers: {
"Content-Type": "application/json"
},
data: {"token":"xxxx"}
}
);
function sleep(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}

Now, apparently something like the following should work with variable. Capturing the variable in pipedream and sending it off??? Again i'm not a coder, so don't really understand what all the lines are doing.

axios({
method: "POST",
url: 'https://enx8tqg2l75z97k.m.pipedream.net/phrase=${event.body.myvariabletext}',
headers: {
"Content-Type": "application/json"
},
data: {"token":"xxxx"},
});

@harlekinrains
Copy link

harlekinrains commented Jul 24, 2020

Simple answer to the last posting - I'm not a coder either. :) To send the 'dynamic' output from ifttt (words it recognized) to any other service via post/json, and then have that service (pipedream) resend the 'dynamic' output to the glitch server via post/json actual coding is needed. The part that you have doesnt do that. We dont have that. Someone would have to code that. (If the workaround IFTTT>pipedream>glitch should work with 'dynamic' voice inputs (not setting up several IFTTT applets, just using the one that dynamically parses what you say.))

I dont even know if that works. (The sending the dynamic variable from IFTTT to pipedream via post/json part).

Repl.it is preferable. (Glitch takes much longer to respond, when the project is hybernating.) I've removed all my pipedream integrations except for the last one (press info twice with a 5s delay in between) in the Kodi forum thread ( https://forum.kodi.tv/showthread.php?tid=314096&page=14 ) which I've now connected to repl.it instead of glitch.

Having to press the play button on your smartphone for repl.it once a day (or less) is the far better compromise, compared with piping IFTTT to pipedream, and then to glitch.

I'm positive.. ;)

@outdoor720
Copy link
Author

I never had a problem with glitch until it atopped workong completely

I know ifttt can send a variable to pipestream i tested it and could see it coming in within pipestream

@harlekinrains
Copy link

harlekinrains commented Jul 29, 2020

I've set it up today again from scratch and it works.

One odd thing I came across was, that the https link above the "function test" website now had two -- in it as a separator, where the first time around it seemingly had a . as a separator. (See my link in the IFTTT screenshot) - I left in the . separator version in IFTTT, and it still worked.

Maybe the sequence of doing things is important (probably not). In my case I imported the github project, clicked on ok for it being autodetected as a jquery project, then edited the kodi-hosts.config.js.extensioniforgot, double checked to be filled out correctly. Then renamed it. Then typed npm install into the command prompt (waited for the install to finish), then hit the start button up top.

Then copied the link above the functionality test window. Replaced the two -- with a . added a /playpause at the end, and set up the IFTTT command with that.

As long as you tested the setup to work from the "test window", and you filled out the kodi-hosts.config.js correctly - everything should just work with the link above the test window (maybe with -- replaced with a . if applicable in your case).

You can also try to delete the project and set it up once more, but as long as the terminal on Repl.it doesnt throw error messages, not even that should be required.

Only additional things I did was, that I used Github OAuth to create my Repl.it account (create account using Github login), and authorized a Repl.it plugin to have read/write access to my github (the one it requires to be able to clone the project directly from Omertus Github).

No extra steps, and works in my case.

@RonnieBoy82
Copy link

harlekinrains you should start a new thread with the instructions you have come up with. Make it easier for people to find

@outdoor720
Copy link
Author

so is this normal?

i get this after selecting the Run button (after NPM Install)

IFTTT command does not seem to work. is there a way to test a connection right from repl.it?

/home/runner/GoogleHomeKodi/kodi-hosts.config.js:22

store your secrets and config variables in here

^

SyntaxError: Invalid or unexpected token
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/load
er.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:87
9:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (/home/runner/GoogleHomeKodi/config.j
s:12:18)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/load
er.js:1158:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is like
ly additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-07-30T22_09_41_794Z-debug.log
exit status 1

@outdoor720
Copy link
Author

unless you pay, your repl.it is public so everyone can see?

@harlekinrains
Copy link

harlekinrains commented Aug 1, 2020

Yes. (Thats what I read as well.) Privacy issue.

(Keeping my fingers crossed that no one is personally targeting people in here. Type of no security mindset here on my part.)

Probably really should shell out for another RaspPi and put the docker image on at this point.

edit: That said, my account was far too easily guessable, so I switched it. Thank you for the nudge and the reminder.

@harlekinrains
Copy link

@outdoor720: Yes, once you've got the module running. If you get an error message on repl (yours errors out at reading the config.js which probably means that you have mistakenly typed something in that file instead of the kodi-hosts.config.js - or that your kodi-hosts.config.js isnt set up correctly), and you hit the start button, you should see the html "test your kodi connection" interface of OmerTu/GoogleHomeKodi that you are familiar with from Glitch.

In your case the program (scriptbundle) isnt running correctly, if it errors out on repl.it

@Brunathaur
Copy link

Brunathaur commented Aug 8, 2020

I've set it up today again from scratch and it works.

One odd thing I came across was, that the https link above the "function test" website now had two -- in it as a separator, where the first time around it seemingly had a . as a separator. (See my link in the IFTTT screenshot) - I left in the . separator version in IFTTT, and it still worked.

Maybe the sequence of doing things is important (probably not). In my case I imported the github project, clicked on ok for it being autodetected as a jquery project, then edited the kodi-hosts.config.js.extensioniforgot, double checked to be filled out correctly. Then renamed it. Then typed npm install into the command prompt (waited for the install to finish), then hit the start button up top.

Then copied the link above the functionality test window. Replaced the two -- with a . added a /playpause at the end, and set up the IFTTT command with that.

As long as you tested the setup to work from the "test window", and you filled out the kodi-hosts.config.js correctly - everything should just work with the link above the test window (maybe with -- replaced with a . if applicable in your case).

You can also try to delete the project and set it up once more, but as long as the terminal on Repl.it doesnt throw error messages, not even that should be required.

Only additional things I did was, that I used Github OAuth to create my Repl.it account (create account using Github login), and authorized a Repl.it plugin to have read/write access to my github (the one it requires to be able to clone the project directly from Omertus Github).

No extra steps, and works in my case.

Thanks harlekinrains, now it works, my listening port is 8080... strange
I have another issue and it's for me the more important. I am a karaoke fan, and when i used glitch i said "chanter + song title" and it worked (all the araoke songs were in favourites" but now, i have this issue (it founds the good song but it fails). can you tell me what i must to do ?

Authentication succeeded
==== BEGIN === route: /playfavourite
requested favourite: comment est à peine
Sending command to kodi http://xxxxxxxxxx:8080/jsonrpc:
{
"jsonrpc": "2.0",
"id": 1,
"method": "Favourites.GetFavourites",
"params": {
"properties": [
"window",
"path",
"windowparameter"
]
}
}
best fuzzy match for 'comment est à peine' is: {
item: 'Benjamin Biolay - Comment est ta peine.mp4',
refIndex: 1568,
score: 0.7159876105334388
}
request failed
route: /playfavourite
query: { q: 'comment est à peine' }
error: TypeError: Cannot read property 'title' of undefined
at playFavourite (/home/runner/GoogleHomeKodi/helpers.js:1394:60)
at /home/runner/GoogleHomeKodi/helpers.js:1419:30
at processTicksAndRejections (internal/process/task_queues.js:97:5)
body: { token: '1234' }
versions: {
node: '12.18.2',
v8: '7.8.279.23-node.39',
uv: '1.38.0',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.16.0',
modules: '72',
nghttp2: '1.41.0',
napi: '6',
llhttp: '2.0.4',
http_parser: '2.9.3',
openssl: '1.1.1g',
cldr: '37.0',
icu: '67.1',
tz: '2019c',
unicode: '13.0'
}
==== END === route: /playfavourite

@erbasandrade
Copy link

Trabalho. Muito obrigado. :)

editar: Aqui está uma breve redação para todos os outros que estão tentando fazê-lo funcionar. Crie uma conta com repl.it (ou use sua conta github para autenticar).

Clique em 'My Repls', '+ new repl', importe do github. Digite o endereço do github ( https://github.com/OmerTu/GoogleHomeKodi ). Aguarde um pouco para que o projeto seja baixado e configurado. repl.it irá identificá-lo automaticamente como um projeto node.js, clique em ok nessa caixa de diálogo.

Substitua as configurações que você definiria no arquivo .env para uma instalação glitch.com no arquivo kodi-hosts.config.js.dist, conforme descrito acima. Em seguida, renomeie esse arquivo para kodi-hosts.config.js

Digite npm install na janela do shell / terminal na tela, pressione Enter e espere um pouco.

Em seguida, clique no botão Executar na parte superior do site. Neste ponto, sua interface 'teste sua conexão com o kodi' deve aparecer e já está funcionando. Essa interface apresenta um link no topo - este é o link que você tem para alimentar o IFTTT em vez do link de falha (com / command (fe / playpause) no final, quando necessário).

Funciona como um encanto. :)

I'm using coreelec!
I think I did everything but forget some detail!
I'm in Brazil can I help, check my settings?
Via teamviewer!
Thank you.

@madmax2
Copy link

madmax2 commented Aug 20, 2020

@harlekinrains
my repl.it project is now showing failed to connect after I successfully got it to work yesterday etc..

seems like this site is not as responsive as glitch.me..

so sadly this is not a good alternative to glitch.me

@harlekinrains
Copy link

harlekinrains commented Aug 20, 2020

Mine still works perfectly, hadnt had to relaunch the project (opened in chrome on a smartphone in a tab in the background) in nearly a month. Responsiveness for me is about on par with glitch.com - but then your results may vary depending on where in the world you are located.. ;) (Central Europe in my case.)

So for me its a great alternative. 👍

'Failed to connect.' After it worked yesterday seems like an ISP IP address change, no? ;)

@Brunathaur
Copy link

harlekinrains, could you just test to open a favourite on kodi to tell me if you succeed ? thanks by advance

@harlekinrains
Copy link

harlekinrains commented Aug 20, 2020

harlekinrains, could you just test to open a favourite on kodi to tell me if you succeed ? thanks by advance

"Cannot read property 'title' of undefined" error. But I've never used this function, so if there is any additional setup I'm missing (except adding stuff to favourites) I've not set it up.

@madmax2
Copy link

madmax2 commented Aug 21, 2020

@harlekinrains No... I meant as in the project itself was not loading on the repl site
This has nothing to do with ISP IP address change
This is entirely an issue on the repl site end..I read some others had the same issue.

https://www.google.com/search?q=repl+failed+to+connect&oq=repl+failed&aqs=chrome.0.0j69i57j0j69i60.3311j0j1&sourceid=chrome&ie=UTF-8

Anyway I have moved on and now self hosting my own local server which was quite easy to setup, much faster and does not rely on any website(repl, glitch) to be working properly.

Surprising thing is I just tested the repl site again and now my project has loading 100% again.
Anyway the site seems less responsive than the glitch site and not as good as my own local server.

How do you control multiple kodi devices?
Did you setup multiple repl or change the kodi config js file to include more IDs e.g bedroom etc?

I tried add more IDs to the config js file but it doesn't work when issue commands.

Did ever manage setup docker following the instructions on the readme?
I can't get it to work with docker after following the instructions

@harlekinrains
Copy link

May I suggest a different thread for that? ;)

I'm only using a single voice controlled Kodi unit in my flat. ;) So I didnt try setting up multiple ones. :)

@madmax2
Copy link

madmax2 commented Aug 21, 2020

@harlekinrains you don't need multiple kodi unit to test if it multiple instances work or not..

If you can test for me..

Add a second ID in the kodi hosts config js file..
Name the ID bedroom like the example and just change that to your local kodi unit IP address and same settings as the ID=kodi settings (ie same port, username and password)

Now change the IP address for the main ID = kodi to some fake IP address and change the port to some fake one..

Reload your server
Now try issuing command

e.g.
-Okay google, bedroom play [movie]

-Okay google, kodi bedroom play [movie]

I tried this and none of the commands work..
so want to confirm if others can get it work or not.


May I suggest a different thread for that? ;)
A different thread for the docker issue?

@harlekinrains
Copy link

harlekinrains commented Aug 21, 2020

Service bot, going out of the way of my own needs, servicing other peoples needs not available. ;)

I've spearheaded the service needs of an entire (ereading) oriented community before, and in the end got the boot when requesting a little more say, despite of course more and more support requests all the time. I'm not jesus. Or your personal support bot. There is nothing in it for me. Stop personally egging on others to go out of their way to do something you want them to. I think it has no redemptive quality. :)

I do what I do out of my on volition, but that includes saying "stop" at one point. This is that point.

Yes, different thread for the docker issue. :)

@Brunathaur
Copy link

Service bot, going out of the way of my own needs, servicing other peoples needs not available. ;)

I've spearheaded the service needs of an entire (ereading) oriented community before, and in the end got the boot when requesting a little more say, despite of course more and more support requests all the time. I'm not jesus. Or your personal support bot. There is nothing in it for me. Stop personally egging on others to go out of their way to do something you want them to. I think it has no redemptive quality. :)

I do what I do out of my on volition, but that includes saying "stop" at one point. This is that point.

Yes, different thread for the docker issue. :)

I agree. You are sympathical to help us. There is a way to ask some things...

@madmax2
Copy link

madmax2 commented Aug 22, 2020

@harlekinrains no one is asking you to be a service bot for anyone..
everyone here is answering/helping out of their own free will or like you said their own volition..

All I was asking is if you can help test out if the setup for multiple instances of kodi is working properly or not..

It was just a simple modifying of the script and you can backup the original script, to quickly revert back.
It is not taking an arm or a leg.

if you don't want to help then no worries..just ignore it, or simply say I can't help with that..

OMG!! No need to be such a drama queen!

@alessandrodatri
Copy link

alessandrodatri commented Oct 22, 2020

Works. Thank you so much. :)

edit: Here is a short write up for everyone else trying to get it to work. Create an account with repl.it (or use your github account to authenticate).

Click on 'My Repls', '+ new repl', import from github. Enter the github address ( https://github.com/OmerTu/GoogleHomeKodi ). Wait a while for the project to be downloaded and set up. repl.it will automatically identify it as a node.js project, click ok on that dialog box.

Replace the settings you would set in the .env file for a glitch.com installation in the kodi-hosts.config.js.dist file, as described above. Then rename that file to kodi-hosts.config.js

Type npm install into the shell/terminal window on screen, hit enter and wait a while.

Then hit the run button at the top of the site. At this point your 'test your connection to kodi' interface should pop up and already work. That interface sports a link at the top - this is the link you have to feed IFTTT instead of the glitch link (with /command (f.e. /playpause) at the end where necessary).

Works like a charm. :)

Hi man! I ve the same issue with glitch service and ifttt.
I found this guide (https://medium.com/glitch/how-to-trigger-multiple-applets-in-ifttt-5877860a76af) but now i cant use it and maybe i can use repl.it.
I ve to import this project https://glitch.com/edit/#!/project/multi-ifttt-triggers (the same used inglitch guide), but i dont know how. Can somebady help me?
I ve to use it with my ifttt to launch multiple trigger with a single web call.

Thanks

@outdoor720
Copy link
Author

outdoor720 commented Oct 23, 2020 via email

@alessandrodatri
Copy link

Is your data ip address kodi password repl.it not visible to all unless you subscribe?

On Thu, Oct 22, 2020, 6:32 PM Alessandro @.***> wrote: Works. Thank you so much. :) edit: Here is a short write up for everyone else trying to get it to work. Create an account with repl.it (or use your github account to authenticate). Click on 'My Repls', '+ new repl', import from github. Enter the github address ( https://github.com/OmerTu/GoogleHomeKodi ). Wait a while for the project to be downloaded and set up. repl.it will automatically identify it as a node.js project, click ok on that dialog box. Replace the settings you would set in the .env file for a glitch.com installation in the kodi-hosts.config.js.dist file, as described above. Then rename that file to kodi-hosts.config.js Type npm install into the shell/terminal window on screen, hit enter and wait a while. Then hit the run button at the top of the site. At this point your 'test your connection to kodi' interface should pop up and already work. That interface sports a link at the top - this is the link you have to feed IFTTT instead of the glitch link (with /command (f.e. /playpause) at the end where necessary). Works like a charm. :) Hi man! I ve the same issue with glitch service and ifttt. I found this guide ( https://medium.com/glitch/how-to-trigger-multiple-applets-in-ifttt-5877860a76af) but now i cant use it and maybe i can use repl.it. I ve to import this project https://glitch.com/~rientro-a-casa in repl.it (the same used inglitch guide), but i dont know how. Can somebady help me? I ve to use it with my ifttt to launch multiple trigger with a single web call. Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#307 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQTPCHLOAM5TMOT2ALE6LDSMCXJFANCNFSM4OKHXPIQ .

Yes man, but i chenged link with the original...

https://glitch.com/edit/#!/project/multi-ifttt-triggers

@outdoor720
Copy link
Author

Yes man, but i chenged link with the original...

https://glitch.com/edit/#!/project/multi-ifttt-triggers

I don't follow.. I thought glitch is not working. Not sure i understand the interaction of glitch and repl.it

@alessandrodatri
Copy link

Yes man, but i chenged link with the original...
https://glitch.com/edit/#!/project/multi-ifttt-triggers

I don't follow.. I thought glitch is not working. Not sure i understand the interaction of glitch and repl.it

Glitch and Repl.it are similar service.. Now i've to use repl.it to make web request, i've to convert the glitch project in repl.it project, so i can use ifttt to call multiple trigger.

@captainfearless
Copy link

Hi all, on repl.it when i test the connection, i get "request to http://?/jsonrpc failed, reason: connect EHOSTUNREACH 90.255.226.106:8080", filled my credentials as follows, amended ifttt applet, what am i missing?

exports.kodiConfig = [{
id: 'kodi', // For now leave the first set to kodi.
// YOUR_EXTERNAL_PROTOCOL (http or https)
kodiProtocol: 'http',
// YOUR_EXTERNAL_IP_ADDRESS
kodiIp: '?',
// YOUR_KODI_PORT
kodiPort: '8080',
// YOUR_KODI_USER_NAME
kodiUser: 'kodi',
// YOUR_KODI_PASSWORD
kodiPassword: 'fearless5'

exports.globalConfig = {
// YOUR_CONNECTION_PASSWORD
authToken: '?',
// YOUR_LOCAL_LISTENING_PORT
listenerPort: '8099',
// YOUR_YOUTUBE_API_KEY
youtubeKey: '?'

@harlekinrains
Copy link

harlekinrains commented Dec 4, 2020

Make sure the filename of the file is: kodi-hosts.config.js

Contents:

exports.kodiConfig = [{
id: 'kodi', // For now leave the first set to kodi.
// YOUR_EXTERNAL_PROTOCOL (http or https)
kodiProtocol: 'http',
// YOUR_EXTERNAL_IP_ADDRESS
kodiIp: 'publicIPofYOURhomeROUTER',
// YOUR_KODI_PORT
kodiPort: 'publicPORTopenONyourHOMErouterTHATSforwardingTOtheINTERNALkodiPORT',
// YOUR_KODI_USER_NAME
kodiUser: 'kodiUSERNAME',
// YOUR_KODI_PASSWORD
kodiPassword: 'kodiPASSWORD(if set)'
}
];

exports.globalConfig = {
// YOUR_CONNECTION_PASSWORD
authToken: 'AUTHtokenCHOSENhereANDnowMAKEitAsimpleWORDtoTEST',
// YOUR_LOCAL_LISTENING_PORT
listenerPort: '8099',
// YOUR_YOUTUBE_API_KEY
youtubeKey: 'AIzyKyCdbx_mSertpt30-HIdfhdQWTUpylpuAsdd6hXyk'
};

Troubleshoot with your smartphone first (connected to your cellcarriers network, not Wifi). Open a browser, enter the Public Ip:Public Port hit enter, you should see a password prompt, fill in Kodi Username and Password, you should see the Kodi interface. If that fails, either port forwarding or Ip address forwarding is not set up correctly.

If that works the only additional thing that has to be changed, that is different from default is the authToken.

edit: Had two aspects wrong from memory. Posting now edited to be correct.

edit2:
Maybe some additional aspects on how this works.
Kodi has a webserver built in, that can be activated, that can be addressed from the internet at large (if you portforward the internal Kodi port to an external port of your routers IP address), which also means it can be accessed simply through a browser running on your smartphone. Everything can be checked from a browser on a smartphone (on the cellular network, not Wifi) up to that point, to see if its set up correctly.

OmerTu's sever code, that runs on repl.it(/repl.co) is simply another server that communicates with the built in Kodi webserver. So in the first section of the config file you give it all the information and credentials for your Kodi webserver.

The only additional thing you set is the auth token. authToken is used as follows. OmerTu's server (the thing running on repl.it) is addressable by curl POST/json commands (you 'surf' to a certain url address, OmerTu's server does a certain thing). To prevent that OmerTu server being addressable by anyone knowing the url - you set the authToken (simple word), the curl POST/json command now has to reference it in its metadata to be able to give the OmerTu's sever commands, which in return gives your Kodi installations webserver commands.

Curl POST/json commands are just entered in the IFTTT mask (together with the auth token, formating, see readme), which now triggers those commands via IFTTTs webhook feature, every time a voice command is spoken (IF part of the IFTTT "IF this than THAT" pair. THAT being the webhook giving a curl POST/json command).

@captainfearless
Copy link

Thanks, have ordered a Google Mini, was using this with Cortana, but it‘s now useless, so i‘ll tinker when it arrives.

@keydon
Copy link
Collaborator

keydon commented Dec 5, 2020

What has Google Mini vs. Cortana to do with issue?

@captainfearless
Copy link

Well obviously i can’t meaningfully test the setup without a functioning smart component, so i will wait until the chain is complete.

@captainfearless
Copy link

Got this all up and running with my new google nest mini, so good to have it back! Thanks to all who contributed to this thread. Out of curiosity, I find as before that the toggle full screen command in phrase broker doesn’t work. I can do a separate applet, but wondered if others found the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants