Kodi Remote Control

I finally succeed to set this up on my Vera Edge (Ui7) and my OpenElec htpc
But after a while the add-on stops, usually after 1+ hour, so when the movie ends Vera doesn’t get any status updated from my htpc.
A quick message drops by that said the add-on stopped.
I have enabled debug logging in the add-on, should i post the “01_KODI.log” here?

If I disable/enable the add-on it works a little while again.

EDIT.
BTW, I use the “script.service.micasaverde” from this post [url=http://forum.micasaverde.com/index.php/topic,28490.msg210054.html#msg210054]http://forum.micasaverde.com/index.php/topic,28490.msg210054.html#msg210054[/url] as recommended in cw-kid’s tutorial.
Is there any difference from the add-on link in the first post?

Hi @ Andr,

I have found similar finding and have set up a PLEG solution to pause and play each time “–” is identified - this has helped this issue somewhat but is messy and of course does not always work. The app ideally needs some sort of interval updater i belie to stop this issue occurring. I have no idea how to implement this but i guess this would solve the issue.

For people on UI7 getting the “Can’t detect device” error…I was also having this problem and solved it pretty simply – after following all instructions in this forum, but with no luck.

I finally decided I had nothing to lose (at 2am…) and noticed in Advanced Settings–>Variables there is a variable called “CommFailure”. I manually changed this from 1 to 0, and now my Kodi Remote is detected.

I did do a couple of other things, but I doubt they are necessary. You can try them if the simple change above doesn’t solve your problem:

  1. Follow all other instructions in the forum to install the plugin correctly and install the addon correctly in Kodi

  2. Upgrade Kodi to 15.0 Isengaard (I was on the 14.2 Helix before)

  3. In Advanced–>Params I filled in the following:

  • Added the MAC address for my Kodi box
  • Added “Team Kodi” as the manufacturer
  • Added “Isengaard” as the model

I am 99% sure all I really had to do was follow the instructions already in the forum and then change the CommFailure variable, but I’ll never know unless someone else in the forum tries to do that and reports back before doing all these other things.

Or maybe sometime this week I’ll set up another instance for the other Kodi box in the house, and report back myself.

ps - many thanks to cw-kid for elaborating the instructions, and for that blog post, which got me thinking more about the effects of the Params and Variables

pps - many many thanks to Ron for an awesome plugin

ppps - on UI7 there is an unlabeled and mostly invisible Mute button…any chance someone can make it more obvious and/or add real volume controls? I am still very much a noob – just opened my first Vera (Edge) this morning.

Hi guys

I have recently upgraded my Windows 7 test PC to Kodi v15.0 Isengard. I have not changed any settings on the Vera UI5 box or in the KodiRemote Kodi add-on.

A quick test and it appears the KodiRemote device instance in Vera that was pointing to this Windows 7 test PC, is still working fine. It says if the the Computer is UP/DOWN. Says Video_Start and the name of the movie, Video_Pause / Video_Stop also being reported fine.

So it seems the upgrade to Isengard over the top of Helix hasn’t affected the KodiRemote from working etc.

Just thought I’d report on things…

Cheers

Actually one other thing, on the KodiRemote device instances in Vera, I still have an XBMC icon. Anyone else?

I saw a screen shot earlier in this thread showing a Kodi icon instead, maybe his was a clean install of KodiRemote with no previous XBMCState?

I’ve just noticed a big problem with KodiRemote and a particular video add-on for Kodi.

The Apple iTunes Trailers video add-on here

Whenever I start playback of a movie trailer Vera crashes and restarts. I see this in the log right before the crash:

[code]06 08/30/15 14:52:55.720 Device_Variable::m_szValue_set device: 113 service: urn:upnp-org:serviceId:KODIRemote1 variable: IdleTime was: – now: (null) #hooks: 0 upnp: 0 v:0xf09828/NONE duplicate:0 <0x2f440680>

2015-08-30 14:52:55 - LuaUPnP Terminated with Exit Code: 245

2015-08-30 14:52:55 - LuaUPnP crash
[/code]

I then tried other Kodi video add-ons for online video content such as YouTube / BBC iPlayer / ITV player / Vevo music and starting playback with any of these add-ons does NOT cause Vera to crash.

Only with the Apple iTunes Trailers add-on does it happen and it happens every time I start to play a trailer with this Kodi add-on. :frowning:

I have a VeraLite UI5.

Can anyone else replicate this??

Here is more from another instance of it crashing from the Vera log

[code]04 08/30/15 14:49:07.517 <0x2b036000>
06 08/30/15 14:49:07.641 Device_Variable::m_szValue_set device: 113 service: urn:upnp-org:serviceId:KODIRemote1 variable: PlayerStatus was: Video_stop now: Video_start #hooks: 10 upnp: 0 v:0xb228a8/NONE duplicate:0 <0x2f9aa680>
07 08/30/15 14:49:07.641 Event::Evaluate 4 KODI - Video Paused scene KODI - Lounge On is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.642 Event::Evaluate 5 KODI - Music Stopped scene KODI - Lounge On is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.642 Event::Evaluate 6 KODI - Music Paused scene KODI - Lounge On is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.642 Event::Evaluate 7 KODI - Video Ended scene KODI - Lounge On is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.642 Event::Evaluate 8 KODI - Video Stopped scene KODI - Lounge On is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.643 Event::Evaluate 9 KODI - Video Resumed scene KODI - Lounge Dim 25% is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.643 Event::Evaluate 10 KODI - Video Starting scene KODI - Lounge Dim 25% lua returned false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.643 Event::Evaluate 11 KODI - Music Starting scene KODI - Lounge Dim 25% is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.644 Event::Evaluate 12 KODI - Music Resuming scene KODI - Lounge Dim 25% is false repeat 0/-1 <0x2f9aa680>
07 08/30/15 14:49:07.644 Event::Evaluate 24 KODI - Video Starting scene KODI - Close Curtains lua returned false repeat 0/-1 <0x2f9aa680>
06 08/30/15 14:49:07.646 Device_Variable::m_szValue_set device: 113 service: urn:upnp-org:serviceId:KODIRemote1 variable: IdleTime was: – now: (null) #hooks: 0 upnp: 0 v:0xb22828/NONE duplicate:0 <0x2f9aa680>

2015-08-30 14:49:07 - LuaUPnP Terminated with Exit Code: 245

2015-08-30 14:49:07 - LuaUPnP crash[/code]

I am also using the Vera multi switch plug-in and my scenes for the KodiRemote first check to see if this “Virtual Switch” is turned on or not, for the KodiRemote to be “Linked” or “Not Linked”

Using LUUP code like this in my KodiRemote scenes:

Link_KODI_to_devices = luup.variable_get("urn:dcineco-com:serviceId:MSwitch1","Status3",128) if(Link_KODI_to_devices=="1")then luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","RunScene",{SceneNum="1"},0) end

If I turn on the Multi switch to link Kodi to the scenes then it still crashes Vera when I start to playback a trailer with the Apple iTunes Trailers video add-on for Kodi.

I am using Kodi Helix version 14.2 on OpenElec, the Apple iTunes Trailers add-on is version 0.2.2

[quote=“seanwalter, post:103, topic:184260”]For people on UI7 getting the “Can’t detect device” error…I was also having this problem and solved it pretty simply – after following all instructions in this forum, but with no luck.

I finally decided I had nothing to lose (at 2am…) and noticed in Advanced Settings–>Variables there is a variable called “CommFailure”. I manually changed this from 1 to 0, and now my Kodi Remote is detected.

I did do a couple of other things, but I doubt they are necessary. You can try them if the simple change above doesn’t solve your problem:

  1. Follow all other instructions in the forum to install the plugin correctly and install the addon correctly in Kodi

  2. Upgrade Kodi to 15.0 Isengaard (I was on the 14.2 Helix before)

  3. In Advanced–>Params I filled in the following:

  • Added the MAC address for my Kodi box
  • Added “Team Kodi” as the manufacturer
  • Added “Isengaard” as the model

I am 99% sure all I really had to do was follow the instructions already in the forum and then change the CommFailure variable, but I’ll never know unless someone else in the forum tries to do that and reports back before doing all these other things.

Or maybe sometime this week I’ll set up another instance for the other Kodi box in the house, and report back myself.

ps - many thanks to cw-kid for elaborating the instructions, and for that blog post, which got me thinking more about the effects of the Params and Variables

pps - many many thanks to Ron for an awesome plugin

ppps - on UI7 there is an unlabeled and mostly invisible Mute button…any chance someone can make it more obvious and/or add real volume controls? I am still very much a noob – just opened my first Vera (Edge) this morning.[/quote]

I was also finally able to get rid of the “Can’t detect device” from KODIRemote on UI7. I only changed the CommFailure variable for 0 to 1. No need to change the other parameters.

This thing with the Apple iTunes Trailers add-on for Kodi and starting to play a trailer making Vera crash.

It seems that the KodiRemote is detecting the video trailer playback back as Audio_Start and not Video_Start. Or after the Vera crash its just showing Audio_Start and it then also lists what ever the last played music audio track was which is strange.

However when I stop the trailer playback, KodiRemote does then correctly say Video_Stop which is also weird.

Anyone else also using the Apple iTunes Trailers add-on and KodiRemote / Vera can confirm this crashing issue?

Thanks.

Here is a Kodi debug log file whilst starting a video trailer playback using the iTunes Trailers add-on.

The name of the trailer / movie was “No Escape” can be seen in the log as noescape

There is an exception thrown relating to the Micasaverde / KodiRemote add-on.

15:18:32 T:140091875903232 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'httplib.BadStatusLine'> Error Contents: '' Traceback (most recent call last): File "/storage/.kodi/addons/script.service.micasaverde/default.py", line 79, in onPlayBackStarted urllib2.urlopen('http://%s:3480/data_request?id=variableset&DeviceNum=%s&serviceId=urn:upnp-org:serviceId:KODIRemote1&Variable=IdleTime&Value=%s' % (ip, dev, currentvideo)) File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 126, in urlopen File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 400, in open File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 418, in _open File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 378, in _call_chain File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 1207, in http_open File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/urllib2.py", line 1180, in do_open File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/httplib.py", line 1030, in getresponse File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/httplib.py", line 407, in begin File "/home/stephan/projects/openelec-5.0/build.OpenELEC-Generic.x86_64-5.0.8/Python-2.7.3/.install_pkg/usr/lib/python2.7/httplib.py", line 371, in _read_status BadStatusLine: '' -->End of Python script error report<--

Here is the full log file: (Available for 1 month from today - 01/09/15)

http://xbmclogs.com/pflkxplji

The exception refers to line #79 in the default.py file which is this code:

urllib2.urlopen('http://%s:3480/data_request?id=variableset&DeviceNum=%s&serviceId=urn:upnp-org:serviceId:KODIRemote1&Variable=IdleTime&Value=%s' % (ip, dev, currentvideo))

If in Kodi I disable the Micasaverde Kodi Event add-on and reboot the HTPC. If I then play the same trailer again in the iTunes Trailers add-on, Vera now does not crash and when I look in the Kodi debug log file again, there is no exception this time.

So certainly some conflict between the Micasaverde Kodi Event add-on and playing trailers in the Apple iTunes Trailers add-on for Kodi.

Do any of the DEVs know how to fix this?

Thank you.

The HD Trailers add-on also made by the same XBMC/Kodi developer, also makes Vera crash when running KodiRemote.

As a work around I am currently looking for a new / different Kodi movie trailers add-on with CP integration, that doesn’t use Apple.com for its trailers source.

EDIT: It seems there are not any decent movie trailers add-on for Kodi that are working, just tried some from the repo but they were broken.
Apple iTunes Trailers add-on is the best out there, so could really do with this issue with KodiRemote fixing if anyone with the skills can??

I’m having the same issue. I want my vera to WOL my pc when XBMC is opened but the scenes that are trigger by ‘Kodi State Changes’ never get triggered. Did anyone ever found a sollution?

Anybody having issue with the STOP command? It works in the UI gui, but if you have it in the automation (advance) section, nothing happens. I was trying to setup something for vacation where Kodi will play/stop a certain movie.

Is anyone able to shed some light on my issue

New to VeraEdge (UI7) but having 4 RaspberyPi2’s scattered around the house, i would like to run scenes on the report of Kodi status.

I can get Kodi to report on the TV show i am watching, but the controls are not working

i installed the script.service.micasaverde.zip a few posts down on the first page.

Any ideas where i am going wrong?
I have attached screenshots of everything i have configured

thanks
n

Anyone any ideas?

Thanks
N

So i cant get it to report whats playing but i cant seem to get the controls to work

Running 15.1 on Openelec
I get the following error
ERROR: Invalid Service

GOT IT

Thanks LightsOn

[quote=“LightsOn, post:95, topic:184260”]Hi All,

Thanks for all the hard work here. I just wanted to add my experience for other also. Any old all for XBMC State must indeed be un-istalled before the kodi add in can be installed and configured. By default you do indeed need to use 8080 with no user name or password in web server in kodi. you can get round this is you like buy downloading I_KODIRemote file - editing it to replace 8080 with the port you want - find and replace all in notpad++ works. You can also add a password by changeling “http://” … ipAddress … " to “http://<User_Name>:@” … ipAddress … "

save the file and upload it again - it will replace the original (so make a back up) - do the vera dance (f5 etc.) and all will work under the new desired port and also with a password and suer name if desired.

I also had no need for ther day and night function since i handle this with PLEG - as such the items i want reported I just select YES to and then leave the field for the day night plugin blank. I have not installed the day night plugin and all works fine for me. Logic can al be handled in PLEG. This will reduce load on Vera.

Hope this is helpfully to someone and thanks to all for the info and work on this app.[/quote]

I just noticed the Kodi video add-on for Disclose.tv is also causing Vera luup to restart when I start playback of a video stream, just like it was with the iTunes Trailers add-on.

Has no one else noticed this problem with Kodi video add-ons for online videos and Vera restarting???

Hi all,

I have now moved away from kodi remote. In theory it was great but as others have found small issues made it a pain. For me the main issues were vera restarts and also uodates somtimes timing out and status being lost in vera. For me I just needed player status and have since installed the kodi plugin callbacks2. You can send http request on all player states. For me I sent status updates in text to a single multiswitch status value. Such a Resume or Pause. I tjen kust use pleg to deal with the logic. This has worked flawlessly for my needs. Hope this helps some one else too.