npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pimatic-kodi

v0.1.9

Published

Pimatic plugin for XBMC/Kodi

Downloads

40

Readme

Pimatic-Kodi plugin

Kodi Setup

To be able to use this plugin, the JSON-RPC remote control service via TCP (port 9090 by default) must be enabled. This can be enabled by navigating to Settings / Services / Control and turning on the option "Allow remote control from applications on other systems". Note, if pimatic is run on the kodi host and the option "Allow remote control from applications on this system" is used instead, this may cause an error if the pimatic KodiPlayer device is setup using the IPv4 loop-back address or "localhost". This is, as kodi only listens on the IPv6 loop-back address in this mode. On Raspbian you can try to use hostname "ip6-localhost or use "Allow remote control from applications on other systems" instead.

Device Config Example

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

Device Rules Examples

Play music

WHEN smartphone is present THEN play Kodi

Pause music

WHEN smartphone is absent THEN pause Kodi

Next song

WHEN buttonNext is pressed THEN play next song on Kodi

Previous song

WHEN buttonPrev is pressed THEN play previous song on Kodi

Save yourself!

WHEN currentArtist of Kodi = "Justin Bieber" THEN play next song on Kodi

Predicates examples

WHEN Kodi is playing THEN switch speakers on and dim lights to 30
WHEN Kodi is not playing THEN switch speakers off and dim lights to 100

To make sure lights only dim if you are watching a movies/series:

WHEN Kodi is playing and kodi.type != "song" THEN dim lights to 30

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

WHEN <condition> 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.

Show Toasts

You can show toast messages on a Kodi player. Example rules:

WHEN doorbell reports present
THEN show Toast "Doorbell" on kodiplayer and pause kodiplayer

WHEN doorbell reports present
THEN show Toast "Some Notification" with icon "error" on kodiplayer

WHEN doorbell reports present
THEN show Toast "You have been informated" with icon "http://url.to/some_icon.png" on kodiplayer

WHEN doorbell reports present
THEN show Toast "Short notice" with icon "info" for 1 second on kodiplayer

WHEN doorbell reports present
THEN show Toast "Long notice" for 10 seconds on kodiplayer

Notes

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 on music player)