Plex Plugin

Posted on
Mon Feb 22, 2010 4:36 am
kpfriedberg offline

Re: Plex Plugin

jay wrote:
Found a bug, but I can't seem to reproduce it - I was sitting on the list with a light highlighted (the light was off). I then turned the light on via the Mac client (was just curious if you checked for on state), the hit return in Plex. It got into some odd infinite loop that continually tried to turn the light on (saw repeated requests to turn the light on in the event log) and kept popping up the "Waiting for response" dialog. The odd thing is that I didn't actually hit return twice, so the "Menu" window with "Turn on" came up, then the "Waiting for response" dialog came up in it's place.

I also notice that sometimes the list selection changes after you change the device state. Can't specifically reproduce it, but it seems to happen when you change different lights.

Anyway, great first effort.

I see both bugs too. The second one is an odd one. Seems to only do it for certain devices. So in some cases when you turn on/off a device, the list 'updates' and you are returned to top of list, sometimes not. I seem to notice that sometimes the Plex Media Server waiting for response box comes up when turning on/off a device - that's when you are popped to top of list. sometimes not, that's when it stays on same device. also, sometimes the plugin 'remembers' which device you are on in the list after exiting out of the plug in and returning, sometimes not.

Posted on
Mon Feb 22, 2010 4:38 am
kpfriedberg offline

Re: Plex Plugin

kenjon wrote:
I did the same test as Jay did, ran the Indigo client side-by-side with Plex.
Your plug-in is working perfectly, the device turns on almost instantly. But then Plex is sitting with a small window saying Plex Mediaserver, waiting for respons. And it takes more than one minute before it disappears.


my response time is much faster than that, 5 seconds or so with the pop up box.

Posted on
Mon Feb 22, 2010 5:18 am
kenjon offline
Posts: 96
Joined: Dec 04, 2005
Location: Sweden

Re: Plex Plugin

kpfriedberg wrote:
kenjon wrote:
I did the same test as Jay did, ran the Indigo client side-by-side with Plex.
Your plug-in is working perfectly, the device turns on almost instantly. But then Plex is sitting with a small window saying Plex Mediaserver, waiting for respons. And it takes more than one minute before it disappears.


my response time is much faster than that, 5 seconds or so with the pop up box.


Sounds good, then it is my slow Internet connection that takes a long time to update the list.

Posted on
Mon Feb 22, 2010 5:19 am
kenjon offline
Posts: 96
Joined: Dec 04, 2005
Location: Sweden

Re: Plex Plugin

kalisphoenix wrote:
kenjon wrote:
You are working fast.... :-)


Thanks.

The plugin now supports display and editing of variables.


Devices, Variables and Preferences works, but Actions takes me back to the Program menu (where I can choose Indigo again)....

Posted on
Mon Feb 22, 2010 11:56 am
kalisphoenix offline
User avatar
Posts: 50
Joined: Feb 01, 2010

Re: Plex Plugin

kenjon wrote:
kalisphoenix wrote:
kenjon wrote:
You are working fast.... :-)


Thanks.

The plugin now supports display and editing of variables.


Devices, Variables and Preferences works, but Actions takes me back to the Program menu (where I can choose Indigo again)....


Does /Applications/Utilities/Console say anything interesting? Something is causing the plugin to die -- some assumption that the code makes, most likely -- and it'll show up in "system.log".

Posted on
Mon Feb 22, 2010 12:07 pm
kenjon offline
Posts: 96
Joined: Dec 04, 2005
Location: Sweden

Re: Plex Plugin

2010-02-22 20.06.07 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:07.821734: com.plexapp.plugins.indigo : (Framework) Couldn't find sv strings
2010-02-22 20.06.07 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:07.822164: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.166566: com.plexapp.plugins.indigo : (Framework) Response OK
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.193686: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/icon-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.193830: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.196845: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/icon-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.196996: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.199157: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/art-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.199297: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.200035: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/art-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.200114: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.203320: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/icon-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.203429: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.206499: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/art-default.png
2010-02-22 20.06.13 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:13.206634: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in
2010-02-22 20.06.17 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:17.329219: com.plexapp.plugins.indigo : (Framework) Handling request : /applications/indigo/:/function/theActionsMenu/KGRwMApTJ3NlbmRlcicKcDEKY2NvcHlfcmVnCl9yZWNvbnN0cnVjdG9yCnAyCihjUE1TLk9iamVjdHMKSXRlbUluZm9SZWNvcmQKcDMKY19fYnVpbHRpbl9fCm9iamVjdApwNApOdHA1ClJwNgooZHA3
ClMnaXRlbVRpdGxlJwpwOApTJ0FjdGlvbiBHcm91cHMnCnA5CnNTJ3RpdGxlMScKcDEwClMnSW5kaWdvJwpwMTEKc1MndGl0bGUyJwpwMTIKTnNTJ2FydCcKcDEzCk5zYnMu
2010-02-22 20.06.17 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:17.384334: com.plexapp.plugins.indigo : (Framework) Calling named function 'theActionsMenu'
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py:1205: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:20.382335: com.plexapp.plugins.indigo : (Framework) An exception happened:
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] Traceback (most recent call last):
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] File "/Users/kent/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/1/Python/PMS/Plugin.py", line 602, in __call
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] return function(*args, **kwargs)
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] File "/Users/kent/Library/Application Support/Plex Media Server/Plug-ins/Indigo.bundle/Contents/Code/__init__.py", line 93, in theActionsMenu
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] theListing = getListingOfActions(theListing, theActionListing[1])
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] File "/Users/kent/Library/Application Support/Plex Media Server/Plug-ins/Indigo.bundle/Contents/Code/__init__.py", line 180, in getListingOfActions
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] return getListingOfActionsByType(theListing, theActionXML)
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] File "/Users/kent/Library/Application Support/Plex Media Server/Plug-ins/Indigo.bundle/Contents/Code/__init__.py", line 214, in getListingOfActionsByType
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] thisActionPath = "actions/" + urllib.quote(thisAction.text) + ".xml"
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 1205, in quote
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] KeyError: u'\xf6'
2010-02-22 20.06.20 [0x0-0xa94a94].com.yourcompany.Plex_Media_Server[19005] 20:06:20.382850: com.plexapp.plugins.indigo : (Framework) Request not handled by plug-in

Posted on
Mon Feb 22, 2010 12:34 pm
jay (support) offline
Site Admin
User avatar
Posts: 18231
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plex Plugin

Items with odd characters in names may cause the RESTful APIs to freak out...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Feb 22, 2010 12:40 pm
kenjon offline
Posts: 96
Joined: Dec 04, 2005
Location: Sweden

Re: Plex Plugin

jay wrote:
Items with odd characters in names may cause the RESTful APIs to freak out...


Thanks, Jay. I didn't think I had that (changed all Devices names a few years ago), but missed that one.
Thanks for spotting it, now it works.

Posted on
Mon Feb 22, 2010 1:02 pm
kalisphoenix offline
User avatar
Posts: 50
Joined: Feb 01, 2010

Re: Plex Plugin

Wow. Okay, that's something I haven't seen before... a unicode error. There is an ö that is causing all of this, apparently :P

It's not a bug in my code (whew) so much as a problem with Python.

Okay, I'm posting an updated version here. That should fix all issues with devices/actions/etc with unicode-only characters in their names. Hopefully.

jay wrote:
Items with odd characters in names may cause the RESTful APIs to freak out...


Nawp, didn't even get as far as sending Indigo the request :)

Posted on
Mon Feb 22, 2010 1:06 pm
kalisphoenix offline
User avatar
Posts: 50
Joined: Feb 01, 2010

Re: Plex Plugin

kpfriedberg wrote:
I see both bugs too. The second one is an odd one. Seems to only do it for certain devices. So in some cases when you turn on/off a device, the list 'updates' and you are returned to top of list, sometimes not. I seem to notice that sometimes the Plex Media Server waiting for response box comes up when turning on/off a device - that's when you are popped to top of list. sometimes not, that's when it stays on same device. also, sometimes the plugin 'remembers' which device you are on in the list after exiting out of the plug in and returning, sometimes not.


Good observations... they might make it a lot easier for me to find and squash those bugs.

Posted on
Mon Feb 22, 2010 3:32 pm
jay (support) offline
Site Admin
User avatar
Posts: 18231
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Plex Plugin

kalisphoenix wrote:
* The current icon is ugly as hell. Will fix. May ask Perceptive Automation if they mind if I use their icon, etc.
* Using "Indigo" as the name, which is sort of trademark infringement or something. Once I get some more work done, I'll make clear that this isn't affiliated, etc.


Ok, so here's what we came up with: you can use Indigo in the name, but not by itself - so maybe "Indigo Plex" or some such. Also, you can incorporate the Indigo icon into your own image design - just don't use it by itself. Maybe a plug with the Indigo icon embedded or something? If you want a higher-res version just send me an email at indigo DASH support AT perceptiveautomation DOT com.

And, thanks for contributing to the Indigo ecosystem! We're enjoying watching your progress. I don't know if you intend on putting it in the Plex App Store once you're ready to release v1, but we encourage you to post it (or a pointer to it) in the File Library.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Feb 22, 2010 3:41 pm
matt (support) offline
Site Admin
User avatar
Posts: 21418
Joined: Jan 27, 2003
Location: Texas

Re: Plex Plugin

This is very cool. Thanks a bunch for sharing this.

Buglet: when trying to connect to IndigoServer running on my local Mac "127.0.0.1" didn't work but using the Mac's LAN host name did. I tried it with no username/password defined and with defining them (same results), so I don't think it is related to authentication. It said it couldn't locate the IndigoServer.

Image

Posted on
Mon Feb 22, 2010 3:59 pm
kpfriedberg offline

Re: Plex Plugin

This plugin seriously rocks. We are definitely encouraging him to submit to the Plex App store and start a wiki over there (which Plex Apps both official and unofficial have). Plex plus Indigo is one stop total home automation using my Harmony remote through my TV (btw, this also solves the request many threads have been dedicated to about using your Harmony remote to control Indigo in a very nice, neat package, and btw, without incurring additional cost since Plex is free and kalis, although i offered, isn't accepting donations).

Posted on
Mon Feb 22, 2010 4:16 pm
Korey offline
User avatar
Posts: 814
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Plex Plugin

kalisphoenix wrote:
kenjon wrote:
Are you sure? Have you checked the weather there? A meter of snow, and below minus 20 degrees C....
Why do you think I went to Africa? 8)


Heh, I live in Las Vegas. Sin City is hot as Hell.

You can finally dim your dimmable devices by user-definable increments via a horrible UI in the latest version.



I just moved from Vegas, was there for 3.5 years, lived around Windmill & Bermuda, I actually kind of miss it now..

--
Korey

Posted on
Mon Feb 22, 2010 7:37 pm
kalisphoenix offline
User avatar
Posts: 50
Joined: Feb 01, 2010

Re: Plex Plugin

Korey wrote:
I just moved from Vegas, was there for 3.5 years, lived around Windmill & Bermuda, I actually kind of miss it now..


It's a small world :) We like it a lot more than we expected. We've been here a little less than two years, and probably will stay for a couple more. We'll leave before our first child enters school (Nevada is now 50th out of 51 for education in the US, with only Washington D.C. being worse).

Jay & Matt, I've updated the bundle and changed all references to the plugin to "Indigo for Plex." It's not a great name, but it's unambiguous :) And I'll figure out a more suitable icon (the gingerbread house is making me hungry). I'm thinking about merging the Indigo icon with the Plex icon, which is unimaginative but, again, is unambiguous.

It's weird that 127.0.0.1 caused a problem but the LAN hostname didn't. That's utterly bizarre, really... I'll check through my source and see if there's anything weird that could cause that effect.

I'm still figuring out the plugin distribution system. I figure in a couple weeks or so, after some general tightening of the code and implementation of a couple more little features/preferences, I'll tentatively declare 1.0 and submit it to the App Store. I'll do the contributed code thing now, just linking to the plugin's page on the Plex Wiki (helpfully and skillfully created by kpfriedberg).

Thanks for your support, guys :)

Who is online

Users browsing this forum: No registered users and 12 guests