• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 16
Release Control Kodi with your Google Home
#46
My main language is python. I've created a small xmbc addon couple of year ago. I could try creating a service addon, with a small webserver. Then create one or two endpoints, that match the current node implementation. I think I would use something like: https://docs.python.org/2/library/simplehttpserver.html.

I don't have any experience with the pypi packages available in kodi. So I don't know what's usable.

We'd also need to find something for the fuzzy search.

Beside that, I don't see allot of challenges. I think this would be a nice first step. And later we could look into replacing IFTTT with api.ai.
Reply
#47
Just FYI, we over at Kodi-Alexa tried putting all of this into an addon already and there's one big problem: the library query + fuzzy search can be really slow, especially on lighter hardware such as the various Android boxes commonly used.
Reply
#48
(2017-08-30, 14:28)jingai Wrote: Just FYI, we over at Kodi-Alexa tried putting all of this into an addon already and there's one big problem: the library query + fuzzy search can be really slow, especially on lighter hardware such as the various Android boxes commonly used.

depends how it's written, large json queries can stall. IMO if this is the case I would probably create my own SQL, populate it when idle and use a thread pool to handle sql queries.

It's a little extra work, and some data won't be fresh... but it beats RPC wait times.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#49
(2017-08-30, 14:28)jingai Wrote: Just FYI, we over at Kodi-Alexa tried putting all of this into an addon already and there's one big problem: the library query + fuzzy search can be really slow, especially on lighter hardware such as the various Android boxes commonly used.

Out of curiosity. Amazon offers hosting part of your logic, in the cloud right? Using lambda? Did you try using that. That's the first thing I would look into when writing something like this for alexa. Then at least you could use that to do the fuzzy search and communication with the kodi api.
Reply
#50
That is what we do. Well, that's one option we offer -- Heroku and self-hosted being the other two.

I was only pointing out that trying to move that code to an addon was unacceptably slow on hardware such as the Fire TV Stick.

As Lunatixz said, there are other things to try, but honestly it seemed not worth the extra effort for us.
Reply
#51
Finally got around to getting a google home and ONLY because this looks pretty damn cool. I'm in the process of setting it up currently. Quick question, since I've got a AVR (and it's networked) would there be any way to control the volume? The volume in Kodi doesn't work as it's set to "passthrough" so the only way I control the volume is either with the AVR remote or via YATSE.

Also, if I am using the HDHomeRUN, there is probably no way to change the channels?

Got it to play a movie so far. When I try the "pause" command, it tells me there is nothing currently playing.. .even though something is, indeed, playing.
Reply
#52
I havent heard anything yet from the omertu, so i'm continuing my changes in my fork: https://github.com/p0psicles/GoogleHomeK...ee/develop

For now i've made the following changes:
- [x] Cleaned up js code, added .eslintrc
- [x] Separated server.js (routes) and kodi helper methods (into helpers.js). Moved config related code into config.js.
- [x] Used ES6 with promises, instead of passing callback functions. Makes the code cleaner, and some of the helper functions are reusable now.
- [x] Added kodi open "show". This will open the show in the GUI, allowing you to navigate into the seasons from there.
- [x] Added kodi-hosts.config.js.dist (rename to kodi-hosts.config.js) to run the node server locally instead of in Glitch.com. If the file is not renamed, it will look after the Glitch env variables.
- [x] Fix searching PVR (at least tvheadend) by channel number. Removed searching channels per channelgroup, as we can also use the "alltv" group.
- [x] Added shuffling (playing a random episode) for a specified show.
- [ ] Control multiple kodi instalations.
- [x] Search and play youtube video's.
- [x] Update the docs.
Reply
#53
Hello.

First it all. Thank you ! Great script

But is there a way for shutdown system ?
Reply
#54
(2017-09-03, 21:41)Usafle Wrote: Finally got around to getting a google home and ONLY because this looks pretty damn cool. I'm in the process of setting it up currently. Quick question, since I've got a AVR (and it's networked) would there be any way to control the volume? The volume in Kodi doesn't work as it's set to "passthrough" so the only way I control the volume is either with the AVR remote or via YATSE.

Also, if I am using the HDHomeRUN, there is probably no way to change the channels?

Got it to play a movie so far. When I try the "pause" command, it tells me there is nothing currently playing.. .even though something is, indeed, playing.

How can you control the volume through yatse if you can only change it in your amplifier? If there is any app that you can use to change volume of your Amp, it could be automated. Last solution could be is using the logitech harmony hub.

Regarding HD homerun. I also have one. I believe there is a Pvr addon for HD homerun. If there isn't you can always use TV headed. Then you switch channels using kodi and use this application.
Reply
#55
(2017-09-04, 19:38)Noexicaise Wrote: Hello.

First it all. Thank you ! Great script

But is there a way for shutdown system ?

Shutdown hasn't been added yet. But that should be possible. I can take a look at it if you want?

I've implemented it into my fork.
If you want to add it to you own code. You could do something like this:

Code:
// Parse request to Shutdown the kodi system
// Request format:  http://[THIS_SERVER_IP_ADDRESS]/shutdown
app.get('/shutdown', function(request, response) {
    validateRequest(request, response).then(() => {
        kodi.System.Shutdown();
        response.sendStatus(200);
    });
});
Reply
#56
I'm kinda stuck on having the IFTTT actions send an action where it can also differentiate in the kodi instances. As the IFTTT rules can only have one text ingredient, one number ingredient or a combination. But something like "Hey Google, kodi $ play $" is not possible. I was planning on translating it to "Kodi living room play $" and Kodi bed room play $". Any ideas?

Edit: never mind. I've already made some progress using api.ai. I think i'll have something ready not long from now.
api.ai is working really nice. Utilizing conversations. It should also be publishable. Meaning users don't need to add all the conversations.
Reply
#57
I'm getting the following error when i try to set up glitch and i don't know what to do

SyntaxError: Unexpected token s in JSON at position 4
5:54 PM
at Object.parse (native)
5:54 PM
Jump to
at IncomingMessage.<anonymous> (/app/server.js:43:23)
5:54 PM
at emitNone (events.js:86:13)
5:54 PM
at IncomingMessage.emit (events.js:185:7)
5:54 PM
at endReadableNT (_stream_readable.js:974:12)
5:54 PM
at _combinedTickCallback (internal/process/next_tick.js:80:11)
5:54 PM
at process._tickCallback (internal/process/next_tick.js:104:9)
Reply
#58
(2017-09-05, 10:19)konti Wrote: How can you control the volume through yatse if you can only change it in your amplifier? If there is any app that you can use to change volume of your Amp, it could be automated. Last solution could be is using the logitech harmony hub.

Regarding HD homerun. I also have one. I believe there is a Pvr addon for HD homerun. If there isn't you can always use TV headed. Then you switch channels using kodi and use this application.

Yatse has a "plug in / addon" that allows you to control a networked based AVR located here. It's not a deal breaker as far as the Google Home integration is concerned, just curious if it could be possible to "expand" the functionality here?

Thanks for the Homerun info. I was informed on a different thread that only the official HDH plug in would work in Kodi, nothing else would.
Reply
#59
Comparing this to Amazon echo which i was using to control kodi this has a faster response....Cool Anyone know the command for turn on and off subtitle? I search the thread and there is nothing on subtitle. Thanks
Reply
#60
Is there any way to use this without going through external IP? My ISP only allows dynamic IPs, I would have to change my ip quite often which defeats the whole "automation" purpose. If there isnt a way, Im sure I can live without this, but if there is, I would be willing to donate to someone to show me how.
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 16

Logout Mark Read Team Forum Stats Members Help
Control Kodi with your Google Home4