Skip to content

muldy/pimatic-bravia

 
 

Repository files navigation

Pimatic-Kodi plugin

Pimatic plugin for controlling Kodi (XBMC) Media player.

Device Config Example

{
  "id": "kodi-player",
  "name": "Kodi",
  "class": "KodiPlayer",
  "host": "192.168.1.2",
  "port": 9090
}

Device Rules Examples

Play music
if smartphone is present then play Kodi

Pause music
if smartphone is absent then pause Kodi

Next song
if buttonNext is pressed then play next song on Kodi

Previous song
if buttonPrev is pressed then play previous song on Kodi

Save yourself!
if currentArtist of Kodi = "Justin Bieber" then play next song on Kodi

Predictates examples if Kodi is playing then switch speakers on and dim lights to 30
if Kodi is not playing then switch speakers off and dim lights to 100

if Kodi is playing and kodi.type != "song" then dim lights to 30
To make sure lights only dim if you are watching a movies/series.

Custom Commands

You can add custom Player.Open commands to the plugin. Player.Open can execute almost anything. From opening Youtube movies, Soundcloud streams to simple opening a file.

Example configuration for a custom command:

{
  "plugin": "kodi",
  "customOpenCommands": [
    {
      "name": "nyan",
      "command": "plugin://plugin.video.youtube/?action=play_video&videoid=QH2-TGUlwu4"
    }
  ]
}

Execute the custom command if yourrule then execute Open Command nyan on Kodi

This is just one of the examples you can do with the Player.Open command to Kodi, This can also execute scripts in Kodi.

You only need to find out what the script/plugin path is, and what parameter to give.

Note's

Big thanks to the code of Pimatic. I used the pimatic-mpd plugin as a base for this project.

TO DO

  • Add volume controls
  • create new device (template)
  • better support for multimedia (now focused @ music)

About

Pimatic plugin for Kodi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 94.2%
  • JavaScript 5.8%