Saturday, January 14, 2017

Kodi Keymaps and shortcuts

In order to make Kodi a bit more 'wife friendly' I set some remote key shortcuts for common actions.
I used the Red/Green/Yellow/Blue buttons on my TV remote to match these up.

They keymap belows maps Red to EPG TV Guide, Green to recently added TV Episodes and Yellow to recently added Movies.
I have matched Blue to my CCTV camera using a .strm file.

Below is the keymap which goes in your  /storage/.kodi/userdata/keymaps folder.
For my CEC TV Remote I put this in 'remote.xml'

<keymap>
        <global>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </global>
        <TVGuide>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </TVGuide>
        <FullscreenVideo>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </FullscreenVideo>
</keymap>


The .strm file is on an smb share, but could be hosted locally using the special:// protocol (http://kodi.wiki/view/Special_protocol)

The .strm file contains 1 line:
    rtsp://host/path/stream

For Hikvision cameras for example this means
       rtsp://user:pwd@192.168.1.x/Streaming/Channels/1

No comments:

Post a Comment