Xbox Live Friend Notifications
#16
No need, everything is pulled from your public profile
Reply
#17
Got it thanks for the help
Reply
#18
Bstrdsmkr, I just had everything working. I got voice control working so I could force run the script (so i could manually find out who all was on once, not just who long on since) but then script stopped working. I looked at log and realized URL not reachable, in browser got message my IP blocked as spam for over 2x allowed requests
Whenever you make an API request, always check that 'Success' is TRUE, if not please look at the 'Error'.
Please note that the API has a limit of 150 requests per hour. This is returned within the API under 'API_Limit'.

Any idears? was loving script!


00:25:34 T:3026164592 NOTICE: StorageClient-1.1.0 Starting server
00:25:34 T:3026164592 NOTICE: StorageServer-1.1.0 Storage Server starting /home/xbmc/.xbmc/userdata/Database/commoncache.db
00:25:34 T:3017771888 NOTICE: XBLFriends: Loading sqlite3 as DB engine
00:25:34 T:3017771888 NOTICE: XBLFriends: Notification service starting...
00:25:35 T:3017771888 NOTICE: XBLFriends: API call failed. Data: {'Reason': 'Failed to connect to url', 'Success': False}
00:41:48 T:2908666736 NOTICE: Previous line repeats 568 times.
00:41:48 T:2908666736 WARNING: JpegIO: Error 27: Unsupported color conversion request
00:41:49 T:3017771888 NOTICE: XBLFriends: API call failed. Data: {'Reason': 'Failed to connect to url', 'Success': False}
03:26:59 T:2908666736 NOTICE: Previous line repeats 6529 times.
03:26:59 T:2908666736 WARNING: JpegIO: Error 27: Unsupported color conversion request
03:27:01 T:3017771888 NOTICE: XBLFriends: API call failed. Data: {'Reason': 'Failed to connect to url', 'Success': False}
04:50:33 T:2908666736 NOTICE: Previous line repeats 3286 times.
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#19
Yeah, sorry I forgot to check a few things and since I had the rate limit hardcoded I made an ASSumption that we could never reach the limit. Well, turns out if you have the service enabled, but don't have a gamertag entered, it goes nuts and tries to reach a non existent url every minute... Needless to say, hammering the api server is bad for everyone.

I've been in contact with the developer at xboxapi.com and he's been SUPER cool about it and even provided code examples. I'll have a fixed version up on github soon. Once I'm sure it's not going to go rogue again you should be able to install the new version and email them to get unblocked.
Reply
#20
cool great script(albiet apparently slightly flawed) , yeah he is a REALLY cool azz bloke and he unblocked me.

I've got some other ideas as well that I may try cause I want to learn, espeically in conjunction with my use with the voice recognition app I'm using.
I may as well ask....if I call your script directly the (service.py) would that advserely effect the 'service' aspect how it runs?
I liked the fact that it runs like a service mimicking the experience if on your XBOX, but at times I wanted to know the real time current state of anyone on, in case I was away from screen, eating or restroom or whatever. So when I said ("XBMC any friends on XBOX") i would get all four friends still online.
If not, i respectfully add that as a potential enhancement request?Smile maybe I'll work on that approach if no one else is interested in the non service call.
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#21
Ok finally got everything tested and updated, Fixed version is up on Github.

Added option to call on demand: RunPlugin(plugin://service.XBLFriends/?mode=ondemand)
Moved the different functions around to make things more readable
Reply
#22
(2012-08-31, 06:26)Bstrdsmkr Wrote: Ok finally got everything tested and updated, Fixed version is up on Github.

Added option to call on demand: RunPlugin(plugin://service.XBLFriends/?mode=ondemand)
Moved the different functions around to make things more readable

trying to test at work, thought was missing a friend currently online but actually went to the API and the API is not updated apparently.

ran the ondemand mode, looking at the log, script recognized it, but no notifications ever came up?
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#23
Herp derp, Forgot to tell it to forget the previous status so it was just doing the check loop again. Should be fixed on github
Reply
#24
Hey everyone, I am the developer of https://xboxapi.com.

After speaking with you guys, and getting the link to this thread from @Bstrdsmkr, I thought it would be best to sign up and make my presence known xD

Yes the response for a request averages roughly 5-6 seconds under high load, but this is due the the extensive login process to xbox.com.
If you guys have any issues with the service I provide, please 1st check xbox.com to see if the data you want is there. For example at the moment US accounts don't seem to have name/bio/location data (http://live.xbox.com/en-US/Profile?gamer...r%20Nelson). After you have looked there and the data you want is there, check if the API is online with no issues (https://xboxapi.com/status).

After all of that, email me support[at]xboxapi.com.

Also, if you are IP banned for spam abuse send me an email also and I will unblock you. Please don't forget to send me your IP address, I keep failing my psychic exams so can't do that yet Big Grin

~djekl

PS: After I do some testing, then this may well become the Official Unofficial Xbox API XBMC Plugin. <-- WOW thats a long confusing name haha
Reply
#25
(2012-09-01, 10:17)djekl Wrote: Hey everyone, I am the developer of https://xboxapi.com.

After speaking with you guys, and getting the link to this thread from @Bstrdsmkr, I thought it would be best to sign up and make my presence known xD

Yes the response for a request averages roughly 5-6 seconds under high load, but this is due the the extensive login process to xbox.com.
If you guys have any issues with the service I provide, please 1st check xbox.com to see if the data you want is there. For example at the moment US accounts don't seem to have name/bio/location data (http://live.xbox.com/en-US/Profile?gamer...r%20Nelson). After you have looked there and the data you want is there, check if the API is online with no issues (https://xboxapi.com/status).

After all of that, email me support[at]xboxapi.com.

Also, if you are IP banned for spam abuse send me an email also and I will unblock you. Please don't forget to send me your IP address, I keep failing my psychic exams so can't do that yet Big Grin

~djekl

PS: After I do some testing, then this may well become the Official Unofficial Xbox API XBMC Plugin. <-- WOW thats a long confusing name haha

Its broke for me, the script. The last variant I tried I don't think was working either way for either 'mode'. I did notice yesterday my nephew didn't show up from the API and validated that the XML was showing that. I am not sure it was just some of the delay you are mentioning or perhaps he has privacy settings enable that conflict with the approach the API uses.
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#26
Of course there's a typo, there's always a typo lol

Fixed on github. Also added configurable idle timeout to save on API hits when not in use. This will stop the service from polling if xbmc has been idle for more than the specified number of seconds. Also forced the on demand method to check the API limit before running. This will fail silently if you are over your limit.
Reply
#27
(2012-09-01, 23:00)Bstrdsmkr Wrote: Of course there's a typo, there's always a typo lol

Fixed on github. Also added configurable idle timeout to save on API hits when not in use. This will stop the service from polling if xbmc has been idle for more than the specified number of seconds. Also forced the on demand method to check the API limit before running. This will fail silently if you are over your limit.

Back to working for me now, except, I think the service part stops working correctly if ondemand is ever used? Ultimately I would like the service to always run but anytime (w/o affecting the service) being able to run the ondemand mode.
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#28
It shouldn't be stopping the service and I can't reproduce that here. Check the settings and make sure your idle timeout isn't kicking in. If that's not it, I'll need to see a debug log
Reply
#29
I don't see the new value in the script's settings screen from XBMC, but via the settings.xml I see a value of 300 set.
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply
#30
Turned up the logging, but didnt see anything the other day and got tired of the debug OSD on screen and nothing was showing up in logs. I still think if I ever call ondemand the service aspect discontinues working, from the logs, i can see no new entries come up for me.

Ondemand seemed to work regardless. Just now then just got an error, so I took the liberty of pasting here.
http://xbmclogs.com/show.php?id=7949

FYI I called the ondemand a min or so later and it ran fine, so maybe just a weird timeout hiccup?
Sorry not sure if you want troubleshoot info here or on github ...
Search first, provide details and keep forums clean. Mark things solved, to close them out and acknowledge helpful volunteers who share. If I have helped, click the plus button.
Reply

Logout Mark Read Team Forum Stats Members Help
Xbox Live Friend Notifications1