Xbox Live Friend Notifications

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
TheBaron Offline
Junior Member
Posts: 7
Joined: Jun 2012
Reputation: 0
Post: #1
I was wondering is there a plugin that would notify me in xbmc when my friends log into Xbox live
i tried searching the forum but came up with nothing
find quote
TheBaron Offline
Junior Member
Posts: 7
Joined: Jun 2012
Reputation: 0
Post: #2
Anybody ConfusedConfused
find quote
artrafael Offline
Team-XBMC Forum Moderator
Posts: 4,424
Joined: Jul 2010
Reputation: 78
Location: USA
Post: #3
There was some discussion about this in a 3 year-old thread: http://forum.xbmc.org/showthread.php?tid=55765

My guess is that, no, there isn't one.
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #4
You got me thinking about this. It just wasn't right that "X"bmc didn't have an Xbox Live plugin. So here: https://github.com/bstrdsmkr/service.XBLFriends

All it does is check your friend's status every three minutes and if it changes to Online, shows a notification. Have fun.
find quote
transcender Offline
Donor
Posts: 151
Joined: Mar 2010
Reputation: 1
Post: #5
I loaded this and it worked, and then I noticed subsequent users didnt notify and then noticed the service failed.

18:38:35 T:2889874288 ERROR: Error Type: <class 'ssl.SSLError'>
18:38:35 T:2889874288 ERROR: Error Contents: The read operation timed out
18:38:35 T:2889874288 ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/bstrdsmkr-service.XBLFriends-4a437be/service.py", line 55, in <module>
XBLMonitor().runProgram()
File "/home/xbmc/.xbmc/addons/bstrdsmkr-service.XBLFriends-4a437be/service.py", line 28, in runProgram
data = json.load(urllib2.urlopen(url))
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1209, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1174, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1027, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/lib/python2.7/ssl.py", line 232, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 151, in read
return self._sslobj.read(len)
SSLError: The read operation timed out
(This post was last modified: 2012-08-13 16:59 by transcender.)
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #6
Yeah it was caused by the connection timing out. I fixed that and a couple of other small bugs. Also added the option to always notify at startup
find quote
transcender Offline
Donor
Posts: 151
Joined: Mar 2010
Reputation: 1
Post: #7
(2012-08-13 19:51)Bstrdsmkr Wrote:  Yeah it was caused by the connection timing out. I fixed that and a couple of other small bugs. Also added the option to always notify at startup

Bstrdsmkr, cheers, I tried testing new version today, but ironically no one on my list was getting online today, lol.
I tried to read the code and not familiar with python but think this could be a good learning tool. The API URL is slow.
Did notice the image icon was working sometimes. When I tested w/ my gamertag I just saw a friends online status only and NO icon, but when I tested w/ his I saw my gamer pic?
Would it be better to use https://avatar-ssl.xboxlive.com/avatar/(...rpic-s.png or the *-l.png?
(This post was last modified: 2012-08-14 08:34 by transcender.)
find quote
transcender Offline
Donor
Posts: 151
Joined: Mar 2010
Reputation: 1
Post: #8
I've been testing and added some logging and a delay. Seems to working great now and the delay I think his helping some of the icons to load fast enough.
I'd like to get the gamertag notification for the user to show up red w/ [color red] [/color] but think I'm missing the syntax somewhere. Excited about this addon, thanks!
find quote
Bstrdsmkr Offline
Fan
Posts: 648
Joined: Oct 2010
Reputation: 12
Post: #9
Xbmc has to cache the icon before it'll show up. Unfortunately, the notification is usually give by the time it finished. It should show it the next time it's needed though.

To change the color, add the tags around the appropriate %s where the builtin string is being assembled. Hope that helps!
find quote
transcender Offline
Donor
Posts: 151
Joined: Mar 2010
Reputation: 1
Post: #10
haha I'm playing on XBOX now. Seems to work. I added some logging to know if I could see it working for sure in case i just happened to miss it. I added a sleep just to be sure it gave me some time to read it. Yep the icons seem to be working. Your code is amazingly pithy and efficient, the scripts pretty short. I tried to put the tags for the color but when i logged it, i think it looked good, I use it in a batch script I run, but I think maybe something with URL encoding or just not 'escaping' something quite right when I tried to get to work. I tried to manually URL encode the string with %5B and %5D and %20...etc but again not sure its escaping or perhaps the encode already in the script is messing with me. Ill try to play more later. Again can't believe never thought of this plugin and this request just came in so good job again this is super handy
(This post was last modified: 2012-08-29 04:52 by transcender.)
find quote
Post Reply