mercredi 8 mars 2017

Plugin Kodi: Automate the lights, and get your notifications on TV!


Hi guys, 'hope you're keeping well!

Today, I'm gonna tell you about one of my favorite plugins for Jeedom: Kodi =)
And there is a gift for you at the end!! =D

Kodi (formerly XBMC) is a free and open-source media player software application developed by the XBMC Foundation, a non-profit technology consortium. With this wonderful soft, you can get all your series, movies or tv channels, radios, or even your local shared videos/music (NAS)!

1) How can I get Kodi and which device could I choose?

At first, be aware that the kodi OS is available on the little NUC intel, or also the Raspberry Pi (the last one is the cheapest and the smallest solution!) or any other devices.

You will find a simple tutorial HERE.

2) Install and configure Kodi for Jeedom

 Now I hope you are familiar with the Jeedom Market, you just have to search for Kodi and click Install =) It is free!

 Then, click on the plugin configuration : you have to set your Kodi server IP, port, user and password (if set on your kodi server parameters)

Ok, now the next step is installing the Jeedom plugin on Jeedom.
Please go to parameters, extensions, find and Install "Kodi". You will need your Jeedom server IP, and your API key (you will find it on the first page of your configuration pannel).

At this point you are able to control remotely your Kodi Media Center from your Kodi Interface.
But in my opinion, it is not enough. We have a great Home Automation System, so what else should we do?


A few scenes, of course !! =D
A full automatic cinema mode, or launch automatically a music playlist as soon as you get back home!

2) Install and configure Kodi for Jeedom

The most important thing you have to know is that there are a few commands available on this plugin, which are actually very useful for a good automation:
- Status
- Play
- Pause
- Stop
- Shuffle Playlist
- Reboot
- Volume (increment or decrement)
- Shutdown
- Notifications (my favorite one!)
#BigBangTheory lol

But you can also set up your own commands (personal playlists for example)

I'm gonna give you one of my scenes (not kidding) !

It is my cinema mode : the main lights turn on/off depending on the status of the movie (Play, Pause, Stop, etc), and my ambience lights turn on smoothly (led candles, led stripes, xiaomi gateway...)

Cinema Mode:
1) Create the scene and define your trigger for this scene:
Which is? is??

Kodi's Status of course ;)

2) The first "IF" block means when the status is "Play", then you want to turn off the light, maybe send a notification on Kodi, the variable movie mode is set to 1, and at the same time I am turning on my Xiaomi Gateway in Dark Blue, just for a small light, not to be in the dark.
FYI: I am not showing you the entire if condition, it is just a simple example.

3) The second block means that if somebody ask Jarvis to Pause the movie (via a scene with the Xiaomi button in my case for example), the light's color at the floor (when the gateway is plugged) is changing to white and I notify: "Pause"

4) Finally, the third "IF" block is here to turn off the gateway, set the variable back to 0, and turn on the main light when the status is stopped, or shut.

I hope you enjoyed it, and it gave you some ideas for your own scenes.
Please feel free to leave me your comments, see you soon!

Aucun commentaire:

Enregistrer un commentaire