-
Notifications
You must be signed in to change notification settings - Fork 164
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
Comments
I've posted a temporary workaround on the kodi forums, if you want it to work currently: It probably would be preferable to buy a RaspPi and start hosting it yourself via docker at this point though. :) |
I dont know about glitch and their plans. If the problem persists I will just remove them from the readme soon. |
Should be able to set up on Repl.it but I am not a coder. If someone gets it working, please let me know |
Ok, have simple commands working on repl.it. Can’t get any commands with text fields to work. Please help |
Number fields are ok but text fields bring back a 500 error on ifttt |
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? |
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 |
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. :) |
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. |
And I just leave the page open on my phone to ensure it stays live. Not sure if it’s necessary. |
You also need to do “npm install” in the console for the packages to install. |
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. :) |
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 |
So does this work for any command or only play? |
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). |
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. :) |
Works for all commands and leaving the site open does work. |
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. |
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 |
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. :) |
Do have to create separate ifttt applets for each command? |
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. |
I leave repl.it open in the background on my phone and even after no commands all night, still working this morning without restarting |
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. :) |
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 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({ |
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.. ;) |
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 |
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. |
harlekinrains you should start a new thread with the instructions you have come up with. Make it easier for people to find |
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 npm ERR! A complete log of this run can be found in: |
unless you pay, your repl.it is public so everyone can see? |
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. |
@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 |
Thanks harlekinrains, now it works, my listening port is 8080... strange Authentication succeeded |
I'm using coreelec! |
@harlekinrains seems like this site is not as responsive as glitch.me.. so sadly this is not a good alternative to glitch.me |
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? ;) |
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. |
@harlekinrains No... I meant as in the project itself was not loading on the repl site 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. How do you control multiple kodi devices? 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? |
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. :) |
@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.. 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 e.g. -Okay google, kodi bedroom play [movie] I tried this and none of the commands work.. May I suggest a different thread for that? ;) |
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... |
@harlekinrains no one is asking you to be a service bot for anyone.. 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. 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! |
Hi man! I ve the same issue with glitch service and ifttt. Thanks |
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... |
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. |
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 = [{ exports.globalConfig = { |
Make sure the filename of the file is: kodi-hosts.config.js Contents: exports.kodiConfig = [{ exports.globalConfig = { 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: 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). |
Thanks, have ordered a Google Mini, was using this with Cortana, but it‘s now useless, so i‘ll tinker when it arrives. |
What has Google Mini vs. Cortana to do with issue? |
Well obviously i can’t meaningfully test the setup without a functioning smart component, so i will wait until the chain is complete. |
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? |
@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?
The text was updated successfully, but these errors were encountered: