We have moved at community.getvera.com

Author Topic: Who can further develop this Kodi XBMC add-on ?? I have it working ish..  (Read 21745 times)

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Hello

As you probably know there was an XBMC (Kodi) add-on for Vera at one point in the past. The original developer has no plans for further developing this add-on. The original add-on can be seen here.

I am not a programmer and don't have the required skills, however I have made three changes to the add-on and now its working somewhat.

1. Fixed the dependencies not met error so the add-on can now be installed in XBMC Gotham V13.X

2. I removed a line of code to fix a bug? Where none active scenes could not be run in the add-on. The original issue was described here.

What I did was I just removed one line of code from a file called scene.py located in \xbmc-vera-master\resources\lib\vera

I removed this line:    if scene['active']:

I am now able to run non active scenes OK.

3. I've managed to fix the icons! For some reason when you download this add-on from GitHub on the Internet the icons are corrupted in certain folders. I managed to find working icons in one folder and I then copied these files to another folder where the icons were corrupted. The result is I can now see the icons in XBMC!

As a result of these changes the add-on is kinda working now, however I have the following issue:

In some rooms I can see actual devices, for example in my Master bedroom I can see the "Bed Lamps" device and the "LED Lights" device.
 
However in my Living room I see no actual devices and it just lists all Scenes. I wonder if there is some view limit I have gone over? as I have a lot of scenes for the Living room. Not sure why I can't see devices in certain rooms?

You can download my modified XBMC add-on ZIP file from my Dropbox here and I've also attached some of my screen shots from XBMC Gotham V13.2

Blog post about this topic here.

Are there any XBMC users who also have the programming skills to salvage this add-on?

Many Thanks
« Last Edit: January 27, 2015, 05:36:33 am by cw-kid »

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #1 on: October 29, 2014, 10:37:13 am »
If anyone does decide to pick this up, my first feature request would be the ability to hide certain devices and scenes from the views in XBMC.   ;) Fingers Crossed!

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #2 on: October 29, 2014, 03:29:46 pm »
I have two rooms that are not showing any devices and that are only showing scenes. I suspected this was some kind of item limit.

If I count the number of scenes that are visible in each of these rooms they both have 19 scenes, which would again suggest some kind of item limit.

I've had a dig around in the add-ons files and this file seems the most likely one to be looking at:

\xbmc-vera-master\resources\skins\Default\720p\script-vera.xml

This is the section of code that affects this list of items (devices and scenes) on the right hand side of the GUI.

For example if I change the posx I can change the position of the list, or if I edit the height I can change the height of the list, but I can't seem to make the list contain more than 19 items.

Code: [Select]
<control type="grouplist" id="105">
        <posx>660</posx>
        <posy>182</posy>
        <width>400</width>
        <height>670</height>
        <itemgap>10</itemgap>
        <orientation>vertical</orientation>
        <control type="group" id="33000">
          <visible>false</visible>
          <control type="button" id="11000">
            <ondown>11001</ondown>
            <onup>9999</onup>
            <texturefocus>controls/button-focus.png</texturefocus>
          </control>

We really need someone who knows what they are doing to look in to this!

Thanks
« Last Edit: October 29, 2014, 03:35:30 pm by cw-kid »

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #3 on: October 30, 2014, 03:08:42 pm »
I emailed the original developer and he replied about this list limit issue he said:

"It's actually my code's fault:

https://github.com/gderosa/xbmc-vera/blob/master/resources/skins/Default/720p/script-vera.xml#L147

The template system is too rigid, this is what I remember now... Newer versions of xbmc may provide a better API.

So the solution to your problem is likely a deep refactoring of the view... We could think of rewriting the above file by hardcoding 100 entries or something, certainly not a clean/elegant/robust solution... That template system is in dire need of an iteration mechanism...

I'll let you know if I have something interesting..."


No idea if he plans to actually fix it?

This make sense to anyone else?

This is line 147 in the file he mentions:

<control type="button" id="1019">

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #4 on: October 31, 2014, 06:01:11 pm »
I must be the only XBMC user on the forum LOL.

Blog post here:

http://windowsmediacenter.blogspot.co.uk/2014/10/do-you-use-micasaverde-vera-are-you.html

macrho

  • Guest
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #5 on: October 31, 2014, 06:04:52 pm »
Naww, I'm an XBMC user and love the plugin. Just seems to work fine for me on 13.2

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #6 on: October 31, 2014, 06:09:50 pm »
Hi

So you haven't hit this issue with a limited number of scenes / devices in a room ?

Cheers

macrho

  • Guest
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #7 on: October 31, 2014, 06:17:56 pm »
I guess I don't use it that much. I only have it controls lights when I'm watching a video. Pause/stop, lights on -- play, lights off, that's it for me

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #8 on: October 31, 2014, 06:25:28 pm »
I dunno then, I seem to have two rooms that only show scenes and no devices can be seen, both of these rooms show a total of 19 scenes and no more items, which is presumably why I then can't see the devices in those rooms.

I suspect if I had less scenes in these two particular rooms, then I'd be able to see the devices. As I do see devices in other rooms in the house, which have less scenes in them.

Seems like there is a limit in the list view. Hopefully someone can fix it.

Also the status / feedback of devices seems a bit hit and miss, until you press that Force Refresh button at the top.

Cheers

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #9 on: October 31, 2014, 06:35:11 pm »
I guess I don't use it that much. I only have it controls lights when I'm watching a video. Pause/stop, lights on -- play, lights off, that's it for me

Your talking about the XBMCState add-on here? That's a different add-on.

I also use that for controlling lights upon the playback state of XBMC.

I wasn't aware this other XBMC add-on for Vera would do that.

Cheers
« Last Edit: October 31, 2014, 06:49:26 pm by cw-kid »

macrho

  • Guest
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #10 on: October 31, 2014, 06:51:12 pm »
Guess I got confused - what does the other plugin do that is better than XBMCState?

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #11 on: October 31, 2014, 06:54:30 pm »
Its more of a user interface in XBMC for controlling scenes and devices in Vera.

See here for more screen shots.  ;)

Download my modified add-on here and try it in XBMC, you just need to enter the IP address of your Vera unit in the XBMC add-on settings to get started.

In XBMC it will appear in the Program add-ons area and is called "Vera Home Automation".
« Last Edit: October 31, 2014, 07:05:18 pm by cw-kid »

macrho

  • Guest
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #12 on: October 31, 2014, 07:04:05 pm »
I'm not sure I have a use for this. I can control Vera from my iPhone or tablets and I have an install of VoxCommando that I can control Vera by voice

Offline cw-kid

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1612
  • Karma: +18/-2
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #13 on: October 31, 2014, 07:07:15 pm »
I have an install of VoxCommando that I can control Vera by voice

How well does this work? I've not tried VoxCommando. Think I saw a few Youtube videos showing a demo.

macrho

  • Guest
Re: Who can further develop this XBMC add-on ?? I have it working ish..
« Reply #14 on: October 31, 2014, 07:21:59 pm »
It works pretty well though there's a challenge with XBMC and WASAPI as XBMC takes over complete control of the audio output but if you don't need audio (or you use your TV as a speaker, if you have an AVR) it works pretty well. You can tell if to play a particular artist or album, same with movies and TV shows.  I tend to mumble a bit but it does pretty well picking up what I say. I'm using an Amulet Devices remote for the audio (there's a microphone at the top of the remote). I believe there's a decent Android app as well, tried headphones on iOS and it wasn't so good.