Page 1 of 1
Media Server - Split up a Event/Notification
Posted: Thursday 29 September 2016 23:02
by wizzard72
The current Events/Notifications are:
Events and notifications are triggered for:
On When the device is turned on (network connection established) or returns to an idle state.
Off When the device is turned off or network connectivity is lost.
Video When the device starts streaming Live TV, TV Shows or Movies.
Audio When the device starts streaming Music.
Photo When the device starts showing an image.
Pause When the device is streaming media and is paused.
I use Kodi also for LIve TV. For my home automation I need to distinction between LIve TV, Movies and TV Shows. If we can split Video up in 3 parts, 1) Movie, 2) Live TV, 3) TV Shows, we can adjust the lightning according our needs.
Re: Media Server - Split up a Event/Notification
Posted: Saturday 01 October 2016 15:06
by Dnpwwo
Hi Wizzard,
When I wrote the Kodi plugin I discovered that unfortunately things are not quite as simple as they should be. Not only does the player classify some media as 'unknown' but sometimes it just plain gets it wrong, I stream internet radio sometimes and the Kodi confidently tells me I'm watching video

That makes it hard to do what you are looking for.
All is not lost however.
I'm most of the way through adding a Python plugin capability to Domoticz to save everyone from writing C++ and I'm uplifting Kodi support as the 1st test case. The new plugin will map a single Kodi to multiple Domoticz devices (currently 4) and that should allow for a lot more flexibility:

- Untitled.png (61.45 KiB) Viewed 1105 times
New devices can be added with minimal code if required.
What you are after should be possible. I can distinguish Music, Photos and Live TV pretty easily, TV shows encoded with Episode details should work as well but the Kodi only knows about tags that the media contains. I use MythTV as my PVR and I don't think it tags recorded TV the correct details.
Either way this should be more useable because you will be able to Mute/Set Volume/Unmute, Pause/Resume/Jump right off the main Domoticz page. It will also allow configuration of shutdown and WOL which has been a gap previously.
Re: Media Server - Split up a Event/Notification
Posted: Monday 03 October 2016 22:03
by wizzard72
Hi Dnpwwo,
You put a lot of effort in it! Thanks for that.
That is great news

I like that you can distinguish between different states, that makes it more flexible. That is exactly what I need.
How far are you with development? Can't wait to test it out

Re: Media Server - Split up a Event/Notification
Posted: Monday 03 October 2016 22:26
by jammiejammie
I would love this!
This is my missing link in getting the movie scene to start only when watching a movie.
Re: Media Server - Split up a Event/Notification
Posted: Thursday 06 October 2016 2:11
by Dnpwwo
Development is pretty much complete of both the Python Plugin framework and the Kodi plugin itself, functionally they both seem to work just fine. I hope to wrap things up in the next week or two (I'm just polishing things a little).
That said, there are still a few things to do before it hits the Beta version which may take a while. Mainly Gizmocuz needs to be happy with the way that Python is integrated into the build process for the various platforms. Ideally Python would not be come a prerequisite for all Domoticz users although it may be unavoidable (not my area of expertise - particularly Linux).
I'm also wondering if I should develop some other Python plugins to test the framework prior to releasing it to confirm suitability. I'm trying to convince my son who knows a little Python to automate my Denon amplifier, if he can make it work then anyone can and we can slow the proliferation of C++ devices being added to the code base.
If you build from source on Windows you could Alpha test it any time you like, I would be happy to tell anyone how to do it.
Re: Media Server - Split up a Event/Notification
Posted: Thursday 06 October 2016 9:32
by wizzard72
That's great news! I love to test drive it
I never compiled on windows, but I'm eager to learn

Then I can test it on my spare raspberry pi