ExecBuiltIn(Notification()) and icons from web or network.
#1
Lightbulb 
Loving XBMC and have converted several friends to use it as their player of choice.

Sorry to jump straight in with this as my first post.

I'm working on a little Message server app, to monitor some folders for text messages / new content, read certain RSS feeds (http://rsslivescores.com and http://showrss.karmorra.info) for new info and also get Xbox Live friend status'.

It currently runs on my Windows XP media storage server.

While this sits and monitors these things it will communicate with my XBMC boxes via the HTTP API and ExecBuiltIn(Notification())

With the message I am also sending the path to an Icon (png image).

From my testing I'm sure that this icon file must be located on the XBMC box itself and not an external location. I'd love for this to be able to be located on a samba share, or even shown from a full web URL;
i.e.

http://User:Pass@IPAddress:PORT/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(Message Title,Message Description,Timeout,http://www.microsoft-watch.com/FamilyGuyFamilyPromo.png))

I have tried it with proper URL encoding as well and no joy.

If I've missed something, my apologies, but a little help would be great.
If it is not currently available is it something possible?

Also, if anyone has any interest in my little app, let me know and maybe it can be developed further with some input from you guys.

Thanks

RedCubed
Reply
#2
you are correct that it currently needs to be local. looking at the code it would take some fugly hacks to get it working, but i agree that it is a desired feature.
Reply
#3
for notification, images don't need to be really big, just get the image from url to local, and then display the local copy.
Reply
#4
that's the fugly hack i pointed to.

the better solution is to make it a largeimage cause then we can load directly from anything handled by our vfs.
Reply
#5
spiff Wrote:that's the fugly hack i pointed to.

the better solution is to make it a largeimage cause then we can load directly from anything handled by our vfs.

yes, as we can do for other images.

always a way to do it ugly Big Grin
Reply
#6
Thanks for the reply guys.

Seams like you are thinking along the same lines as me of additional ways to add to XBMC.

Not that I'm entirely 100% on the internals (more like 1%) but I guess largeimage is an object type in the code and changing the icon to it would open it up. If that's the case, what are the chances of it happening? Would look forward to it. Would be great for Xbox Live friends avatar pic's to show up, just one of the ways I would use it with my app. Mind you, I think that everything I'm doing could be done with a python script, if I knew any.

Anyway, rambling a bit. Thanks for the help...fingers crossed.
Reply
#7
well the copy of thumb could be done by your app server, just have to send the local path to xbmc.
Reply
#8
yes, it got put on my list. that list is rather long though, and this is nowhere near the top.
Reply
#9
I'm pretty sure you can send images as a byte stream to the event server, which seems like a better interface for you application anyway.
Reply
#10
Smile 
ppic.
I like your idea, the only issue I have is that it would require the user to setup a share on the XBMC box to enable me to copy the file over as I'm running the app on a different machine.
Might be a solution for short term though.

Spiff.
Thanks for that, I understand that there are many more important additions/fixes to go before this. I will keep my eyes on the changelogs for this.

althekiller.
I have looked around for some details on sending an image as a bytestream, sounds like it could be a very good idea, but haven't seen anything yet. Any ideas on how I would do this, would it still be via the HTTP API? Or could you point me in the direction of some docs for the command I need?

Again, thanks for the help guys, much appreciated.
Reply
#11
althekiller.
May have just found it looking at the event server api, rather than HTTP API. Socket based comms I see...interesting. I assume I would just be able to send the byte stream in place of the icon path.

I will have a little play and see what cooks and report back later.

Cheers
Reply
#12
xbmc have some builtin to call script if xbmc allow you to give parameter when launching that way, you could execute the script and passing it the url, the script will download it on xbox, and made it available for notifiaction windows.

maybe Spiff can answer this possibility, it would save you to make a share.
Reply
#13
Just to keep this thread up to date.

I've had a play with the event server functionality and am struggling a bit with connections.

From looking at the sample C++ apps, I guess I have to send anything as bytes rather than ascii. Just trying to decipher the correct packet construction. I'm not great in C so it's taking a while.
Reply
#14
Just a quick kick. I've been looking into this as well because I wanted a way to stream all the info I need to that info box. Think about Twitter, mail, calendar events, trains I need to catch (because I tend to forget the time when watching TV), finished downloads, etc. This because I'm a coder myself and I can't be bothered for trial and error with 20 different scripts. I've got 2 boxes here, one which runs XBMC and one which feeds XBMC so to say. Might be pointless but it just happens to be that way, and my second box is there for some other stuff as well.

Anyway, both are Windows (7 for XBMC, XP for the server) and you don't need Samba shares for this. I shared a folder (C:/externalRead) on the server which I shared read-only, but all the services on the server box can write into there. When I opened my server in the Win7 box' explorer (\\10.0.100.137) and you right click the shared folder. Enter username and password (if needed, I strongly recommend thou) and right click the shared dir. Now hit Map network drive and link it to a drive letter. In my case, I assigned M:/externalRead. XBMC takes this as a normal drive.

I can now, on the external box, put files in that shared directory and just call the commands from the HTTP API. For example, I'm workin on the Twitter part right now. It takes the user icon from there and puts it in the shared dir. For example C:/externalRead/Twitter/MartijnGP.png. Then I send this command:

http://10.0.100.125:9262/xbmcCmds/xbmcHt...tification("New tweet! ({username})", "{message}", 10000, "M:/externalRead/Twitter/{username}.png" )

Works flawlessy. It does indeed involve some dirty trick but to be honest I never saw a fully features media center without hacks. Actually half of the things I do with my HTPC involves hacks and the majority of them are pretty ugly.
Reply
#15
MartijnGP Wrote:Just a quick kick. I've been looking into this as well because I wanted a way to stream all the info I need to that info box. Think about Twitter, mail, calendar events, trains I need to catch (because I tend to forget the time when watching TV), finished downloads, etc. This because I'm a coder myself and I can't be bothered for trial and error with 20 different scripts. I've got 2 boxes here, one which runs XBMC and one which feeds XBMC so to say. Might be pointless but it just happens to be that way, and my second box is there for some other stuff as well.

Anyway, both are Windows (7 for XBMC, XP for the server) and you don't need Samba shares for this. I shared a folder (C:/externalRead) on the server which I shared read-only, but all the services on the server box can write into there. When I opened my server in the Win7 box' explorer (\\10.0.100.137) and you right click the shared folder. Enter username and password (if needed, I strongly recommend thou) and right click the shared dir. Now hit Map network drive and link it to a drive letter. In my case, I assigned M:/externalRead. XBMC takes this as a normal drive.

I can now, on the external box, put files in that shared directory and just call the commands from the HTTP API. For example, I'm workin on the Twitter part right now. It takes the user icon from there and puts it in the shared dir. For example C:/externalRead/Twitter/MartijnGP.png. Then I send this command:

http://10.0.100.125:9262/xbmcCmds/xbmcHt...tification("New tweet! ({username})", "{message}", 10000, "M:/externalRead/Twitter/{username}.png" )

Works flawlessy. It does indeed involve some dirty trick but to be honest I never saw a fully features media center without hacks. Actually half of the things I do with my HTPC involves hacks and the majority of them are pretty ugly.

For my iPhone app, I call the FileUpload(filename, contents), API call, and upload the image data in base64 (also to keep note of...I found that for some reason xbmc was very sensitive to errors in the file eventhough they could be displayed fine on windows, etc pherhaps the way the iPhone stores contact images) and put it in special://temp, and then call the Notification API call subsequently
Reply

Logout Mark Read Team Forum Stats Members Help
ExecBuiltIn(Notification()) and icons from web or network.0