• 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 16
Release Control Kodi with your Google Home
#76
Nice project and one I'm keen to use. Just ordered a Google Home and this will fit really nice with my AV setup.

I've installed it locally on my PC for now, plan is to move it onto my Synology NAS to drive my Kodi from inside rather than from Glitch. Using the API calls from curl I can get it driving Kodi superbly.

The one thing I'm keen on getting working is the CEC control. Kodi sits on a Raspberry Pi 3 and I installed the cec addon script. I can send curl commands to it and get a response.

json:
$ curl --header 'Content-Type: application/json' --data-binary '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.json-cec","params":{"command":"activate"}},"id":1}' http://192.168.0.34:8080/jsonrpc
{"id":1,"jsonrpc":"2.0","result":"OK"}

But nothing happens Sad

I've tried cycling trough ID's in the hope of hitting something. But that's the bit I don't understand. How do I know what ID to send the activate to?

The actual setup I have is everything goes through a Yamaha AV Receiver. What I'd like the CEC to do is tell the receiver to activate the port that my Raspberry Pi is connected on. Is there something I can use to debug what I should see from CEC? Not sure if I need to investigate with 'cec-client' on the Pi.

Any pointers gleefully accepted.
Reply
#77
Not able to get this to work. I tried p0psicle's fork as well, to no avail.

I'm able to get to the web server manually:

json:
http://YOUR_INTERNAL_KODI_IP:PORT/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Player.playpause","params":{"playerid":1}}
http://YOUR_EXTERNAL_IP:PORT/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Player.playpause","params":{"playerid":1}}

Both of these work fine and kodi pauses.

I tried to create a simple "Mute" command: https://my-glitch-address.glitch.me/mute, but that didn't work.  Looking at my IFTTT activity I see "Applet Failed":

xml:
There was a problem with the Webhooks service.
Ingredients
CreatedAt
(none)

Finally, I tried to create a test using Postman:

xml:
Address: https://my-glitch-address.glitch.me/mute
Type: POST
Header: Content-Type: "application/json"
Body ("Raw"): {"token":"AUTH_TOKEN_VALUE"}

I ended up with a 404. Not sure what I'm doing wrong.

Edit: Just copied the current repo and copied my .env file over and it works! I changed my pass phrase as well, the previous one had some special characters in it. I'm not sure if it was my pass phrase or the latest distribution, but it works now!
Reply
#78
(2017-11-28, 22:24)warlord0 Wrote: I've tried cycling trough ID's in the hope of hitting something. But that's the bit I don't understand. How do I know what ID to send the activate to?

The actual setup I have is everything goes through a Yamaha AV Receiver. What I'd like the CEC to do is tell the receiver to activate the port that my Raspberry Pi is connected on. Is there something I can use to debug what I should see from CEC? Not sure if I need to investigate with 'cec-client' on the Pi.

Any pointers gleefully accepted.
 Well I guess having looked at this a bit more it's more something relating to the Kodi API than the Google Home controller. If I read it right the Controller passes commands to the Kodi addon which in turn uses one of three Kodi API calls CECActivateSource, CECStandby and CECToggleState. So I think I'll probably have to look at what they do in more detail. It looks like those calls may not be sufficient to get the RPi to tell the AV receiver "Hello I'm here make me active"
Reply
#79
An outline of how to use the GoogleHomeKodi project on a Synology NAS within your own network.

https://warlord0blog.wordpress.com/2017/...-and-kodi/
Reply
#80
(2017-11-29, 16:43)warlord0 Wrote: An outline of how to use the GoogleHomeKodi project on a Synology NAS within your own network.

https://warlord0blog.wordpress.com/2017/...-and-kodi/
 This is awesome and works beautifully on my diskstation! thanks!

Is there a way to run the service automatically upon reboot?
Reply
#81
It should just run on reboot.
 
Quote:Step 3. Check the script will auto-start
If you pass step 2 OK, then this is just a formality. The script will start when you restart your box. When ready type 'shutdown -r now' and allow your NAS to reboot. When it comes up again, you will be able to see that your service is running by hitting the URL, or by checking the logs which, by default, go to /var/log/upstart - all sysout from your process will go here.
Reply
#82
Anyone know if this will work with MrMC on the Apple TV?
Reply
#83
Omertu, thank you so much for figuring this out and taking the time to show us.  I just got my google home and this was the first thing I've done.  It was also great for getting me started doing other things with it.  

Couple of quick questions to get me going more.  Is there a go to fullscreen on the currently playing content?  When I say play an episode of cheers is says playing of cheers.  Still plays  cheers, but it's a minor annoyance.  Any pointers on the play cheers episode #?  Other than that I'm off to a great start.  Getting ready to start digging deeper and you really got me off to a great place to start. Thanks again.
Reply
#84
I setup the Voice Kit on a raspberry pi 3 using the instructions on https://aiyprojects.withgoogle.com/voice...t-overview.    I also installed Kodi on the same raspberry pi.
Following Omertu's instructions, I still have not been successful with any voice commands to kodi.
Kodi works fine,   I can externally reach the port on my raspberry pi (8080) and the voice kit responds fine. The message I get back from the Voice Kit when trying any commands to kodi is "I can't help with that yet......."
I have not tried to implement a web server on my internal network.  What should I try next?
Thanks
Reply
#85
Fxsti, have you got it working on two different computers first?  I would try that to narrow it down.  Plenty of services no longer work when I start Kodi.  Synergy, for example. But by the response you're getting from your google, it sounds like it's not triggering IFTTT correctly either. Follow the instructions carefully.  Google has to trigger IFTTT, which points to your glitch account, which links to your router, which has port forwarding to each Kodi installation.  If you don't have a static ip address, you have to update Glitch every time it changes.  DynamicDNS ip addresses work here.    And I believe you need at least ver. 17.  Good luck!
Reply
#86
(2017-12-10, 22:18)albertstroh77 Wrote: Fxsti, have you got it working on two different computers first?  I would try that to narrow it down.  Plenty of services no longer work when I start Kodi.  Synergy, for example. But by the response you're getting from your google, it sounds like it's not triggering IFTTT correctly either. Follow the instructions carefully.  Google has to trigger IFTTT, which points to your glitch account, which links to your router, which has port forwarding to each Kodi installation.  If you don't have a static ip address, you have to update Glitch every time it changes.  DynamicDNS ip addresses work here.    And I believe you need at least ver. 17.  Good luck!
 Ok, got it working somewhat. I replaced Glitch with the git files and port forwarded tcp port 8099 to the kodi server.  Kodi starts playing the movie in the background.  I have to select Fullscreen to see the video, but happy that I have got this far.
Reply
#87
Thanks for doing this. Just set it up, got it working and then it broke after my ip changed. My ISP provides a dynamic ip, so I set up a duckdns account to keep my ip updated. I tried putting the duckdns url into the YOUR_EXTERNAL_IP field in glitch, but it didn't work. Is there any way to do this?
Reply
#88
(2017-05-10, 08:19)omertu Wrote: I've put together a solution that allow you to control Kodi with your Google Home / Google Assistant.
Eventually it allows you to perform these actions with voice commands:

Play a movie:
"Hey Google, kodi play movie [movie name]" --> will search for the given movie name and play it.

Play the next unwatched episode:
"Hey Google, kodi play tv show [tv show name]" --> will search for the given tv show and play the next unwatched episode.

Play a specific episode:new
"Hey Google, kodi play [tv show name] season 2 episode 5" --> will search for the given tv show and play episode 5 on season 2.

Pause / Resume kodi:
"Hey Google, pause kodi"

Stop kodi:
"Hey Google, stop kodi"

Setup instructions can be found here: https://github.com/OmerTu/GoogleHomeKodi


Hope it'd be helpful,
Omer
Hey is it possible to cast what is on phone to kodi on tv using google home ? maybe with use of yatse ? 

Thanks Smile
Reply
#89
Have got this working now for a single Kodi setup - thanks for putting this together, works really well!

For a Linux novice, how do I set up the node server so I can do this in multiple rooms? I installed node on my Linux machine but I don't know if it comes with a server.js or if I have to create one, or really what I need to do outside of just installing node. If someone could post slightly more specific instructions for this it would be greatly appreciated.

Thanks!
Reply
#90
(2017-12-20, 16:40)mhendu Wrote: Have got this working now for a single Kodi setup - thanks for putting this together, works really well!

For a Linux novice, how do I set up the node server so I can do this in multiple rooms? I installed node on my Linux machine but I don't know if it comes with a server.js or if I have to create one, or really what I need to do outside of just installing node. If someone could post slightly more specific instructions for this it would be greatly appreciated.

Thanks!
I think I managed to figure this out. For anyone else who's struggling, here are a couple of links that might help. I'm using Ubuntu 14.04 so the systemd init didn't work for me.

https://www.digitalocean.com/community/t...untu-14-04

https://jalada.co.uk/simple-upstart-scri...ess-alive/
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 16

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