[OBSOLETE] Kodi Manager - playing status and control

No problem @toliver182 :slight_smile: What are the conditions that youā€™re using to dim the lights? I didnā€™t see the Kodi device in the rule machine.

Well I found it in switches with on/off which Iā€™m assuming translates to play/stop. What about pause? Thanks.

Thats why I use the kodi plugin reallyā€¦
I dont think the app above is really suitable, its polling too often and slowing down the smartthings system as a whole.

Iā€™m working on one in which a kodi plugin tells smartthings when it starts playing, but still at that stage you would only have playing or stopped.

iā€™m also looking at setting it up as "music playerā€™ for finer grain status but i havnt looked into it to much.
http://docs.smartthings.com/en/latest/capabilities-reference.html#music-player

this would also require the dev of rule machine to add that as an option.

Which plugin are you using? Thank you for your help with this. I do like the ability though to pause the TV if the door bell rings though thats nice.

Iā€™m using hue lights so i use the hue plugin.


When installed set it to theatre mode.

However im just about to release an update to the my app.
it will require a plugin in kodi but will still give smartthings the status etc and allow you to control it from smart things.

@jjslegacy @TheMattS @TheFuzz4

I have completely refactored the app.

It now uses a kodi plugin to get the status when it changes, no more polling and slowing down the smarthub service.

have a look at the original post and instructions and let me know how you get on

Will do and Iā€™m a happy guinea pig :smile:

Looking good. Got any easy tips on how to copy and paste the urls from your phone directly to Kodi? Also think there are any limitations to 5 installs?

Edit: One last question how about a only run in these modes section?

@TheFuzz4 i havnt been able to test multi kodi config, they should work in theory.

the last box as the bottom has all the urls in it with ## in between so you can copy and paste them in one go. maybe to an email? then you can paste them in.

and alternative would be to open the kodi plugin config when kodi is closed and update them in there.

Iā€™ll look at the only run in these modes option.

I just looked at rule machine to add a music player - i manage to add it so you can build rules of the status.
i managed to do it and it works fine, however its a bit of hack, going to keep looking at that too. hopefully get them to integrate it in their releases.

Awesome @toliver182 thank you so much for building this awesome app and device. I added you to my IDE GitHub integration so now I can just update through the IDE no more copy and paste. I wish I was a better programmer. I work in IT as a systems admin and I can do some good bash scripting but sadly no groovy yet :smile: hope to fix that in the near future.

Your very welcome.

Iā€™m in IT app support, I spend my life in power shell and bash scripts.

I never touched groovey before yesterday itā€™s been a steep learning curve. Itā€™s seems the same as most object orientated languages, slight changes in syntax and a lot of logging lol

Iā€™ve request that @bravenel add music player to rule machine, hopefully he has time

Quick test on one device has it working nicely.

I did email myself the links and just edit the settings.xml manually - wasnā€™t too bad

Nice fast rewrite and appreciate the work!

Hi All

@thildemar has advised me that the link i had for the kodi plug in was an old version designed for xbcmc.

The kodi plugin is here:

Any chance we can get a little more precise instructions with how we enter the URLā€™s in the callback add-on? I am so confused about where to even enter them! Sorry for the noob question just never used this add-on before and the documentation isnā€™t really helpful to me. Canā€™t even find an example online to go off.

2 Likes

Mine is showing ā€œNullā€ when I play videos on mine. Pause and play work correctly.

Iā€™ll add logs when I get a chance

Iā€™m using xbmc.callbacks2 instead of kodi.callbacks, but I would assume that the setup would be similar if not identical.

Go to Configure under the add-on information screen

Under the Playback tab edit the all of the options on the right to Type = http and then copy/paste the URLs into the appropriate spots.

Thanks @toliver182 for putting this together!

1 Like

Thank you @nelemansc! I think I got it setup properly but maybe there is an issue with the add-on. I am running Kodi on Windows using Jarvis RC2. Here is the error I am receiving after I setup the task and event. I am using the latest Kodi callback update as well. Any help is greatly appreciated

08:16:44 T:6692  NOTICE: $$$ [kodi.callbacks] - Task starting for onPlayBackStarted
08:16:44 T:6692   ERROR: $$$ [kodi.callbacks] - ERROR encountered for Task T1, Event onPlayBackStarted
                                            ERROR mesage: <attribute 'message' of 'exceptions.BaseException' objects>
                                            Traceback (most recent call last):
                                              File "C:\Users\shokouhi\AppData\Roaming\Kodi\addons\script.service.kodi.callbacks\resources\lib\tasks\taskHttp.py", line 106, in run
                                                u = requests.get(self.taskKwargs['http']+self.runtimeargs, timeout=20)
                                            TypeError: cannot concatenate 'str' and 'list' objects
08:16:44 T:6692  NOTICE: $$$ [kodi.callbacks] - Task finalized for onPlayBackStarted
08:16:45 T:7424   ERROR: Traceback (most recent call last):

Iā€™m trying to set this up. When you say ā€œ17. Set events to the corresponding URL you copied from the appā€ - do you mean just writing that exact url into a callbacks2 Task and then setting the corresponding event to that Task? If so, is there anything else I should be doing?

For those having issues with URLs and callbacks addon. Please take a look at my updated instructions:

Also check out the wiki page for Kodi Callbacks: http://kodi.wiki/view/Add-on:Kodi_Callbacks

And make sure you grab the latest version, I have been working with the addon author over the last week or so on fixing a few bugs, particularly in Android.

1 Like

Ah ok, well I took at look your set of instructions and I actually did follow them correctly the first time (imagine that lol). I tried to update the add-on but I still get the same error I posted above. I just now tried to perform the test under ā€œGeneralā€ Settings and I am getting an error. Seems to do with a windows installation and incorrect path so I reported a bug on Kodi forums with my logs. Hopefully that will resolve this issue.

Yeah, Ken has been pretty quick on the Kodi forums. Hopefully he will get you sorted.