View Full Version : Growl / Mumbles notification support
unimatrixZxero
September 2nd, 2008, 04:39 AM
Hi, often you may run boxee in the background while working away. I find it would be pretty nifty if it could send a global notification via Growl(Leopard) or via Mumbles(Ubuntu) to inform me about the track change.
e.g.
Song Title
Artist
Album
Growl and Mumbles should be very easy to support since they have a simple CLI tool you can pipe text to.
Links to the notification tools.
Growl - http://growl.info/
Mumbles Project - http://www.mumbles-project.org/
Gamester17
September 2nd, 2008, 06:43 AM
FYI; XBMC and therefor Boxee features an API which you can get this information from, so you could code plugins/add-ons to Growl and Mumbles to get this from Boxee, ...which in many cases might probably better than adding hundreds if not thousands of such plugins/add-ons to Boxee: http://xbmc.org/wiki/?title=WebServerHTTP-API
;)
idan
September 3rd, 2008, 12:53 AM
hey unimatrixZxero,
i think this is a great idea, as users indeed use boxee on their pc's while working and have it minimized it indeed makes sense to get live notifications on things happening in the background.
i agree with gamester though that the best solution would be interfacing to boxee from the outside and not boxee interfacing to these services from the inside.
i have to say this is a excellent example of a solution that could come from the community. the perfect project for one of you boxee fans who have their fingers itching :)
hope to see it soon...
idan
unimatrixZxero
September 6th, 2008, 08:45 AM
Hey cool I didn't know about the API. That's great stuff. I don't know my way around Linux and Mumbles very well but I think I sure can hack up something for OS X, growl.
unimatrixZxero
October 10th, 2008, 08:02 PM
So I finally came around to hacking something up. The initial version does what I want it to do just fine. I use a ruby script to poll the web service boxee can run. You have to enable it in the Network Settings.
Requirements:
• Mac OS X Leopard, or Mac OS X with working Ruby 1.8.6 installation
• Growl (of course http://growl.info/index.php)
Currently there are small limitations:
• you must set the port to 8888
• also leave away the password(boxee will display stars even if you leave it empty)
• I haven't packaged this in a cooca app yet so for now you will have to be comfortable with running it from Terminal.app
• if boxee's webserver is not running the app will refuse to start
• if you quit boxee the script also exits
Installation:
• Extract the folder anywhere you like
• Read the included BSD License and make sure you're fine with it
• open Terminal.app and navigate to the folder you just extracted (e.g. you extracted it on your desktop type 'cd Desktop/boxee_growl_v0.1'
• give the growlnotify binary execution rights by typing in 'chmod +x lib/growlnotify'
Usage:
• Start boxee and enable its web server
• navigate to the folder you extracted and type in 'ruby boxee_client.rb'
You should now see a Growl message that BoxeeGrowl is starting up and as soon as you play video or music you should see a notification pop up.
You can download version 0.1 from my site:
http://apirate.iwasmeantto.be/software/boxee_growl_v0.1.zip
Gamester17
October 17th, 2008, 10:04 AM
Cool! but could you maybe port (convert) the code (http://en.wikipedia.org/wiki/Porting) of the script to python (http://en.wikipedia.org/wiki/Python_%28programming_language%29)?
...as then it could run under Boxee/XBMC as a python script add-on :cool:
http://xbmc.org/wiki/?title=Add-ons
http://xbmc.org/wiki/?title=Scripts
http://xbmc.org/wiki/?title=HOW-TO_build_Python_Scripts
http://xbmc.org/wiki/?title=HOW-TO_write_Python_Scripts_for_XBMC
http://xbmc.org/wiki/?title=Category:Python
http://en.wikipedia.org/wiki/Python_%28programming_language%29
http://www.python.org
More Mac specific:
http://developer.apple.com/documentation/Cocoa/Conceptual/RubyPythonCocoa/Introduction/Introduction.html
http://www.pyruby.com
http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python/doc/index.html
http://www.oreillynet.com/onlamp/blog/2007/09/learning_ruby_for_pythons_sake.html
http://www.opensourceconnections.com/2007/04/26/parsing-ruby-for-porting/
http://www.rubyinside.com/converting-ruby-19-bytecode-to-python-884.html
http://www.webmonkey.com/blog/Ruby_Becomes_Python
;)
agentlame
October 17th, 2008, 12:43 PM
i too would love to see this in python... then i could help hack it to work with mumbles (or even better: notification-daemon)
marcel
October 17th, 2008, 02:39 PM
cool guys..:)
egrep
October 17th, 2008, 07:53 PM
I run Boxee mostly on my Apple TV. It would be swell to use the network capabilities of Growl to receive growl notifications on my OSX machine from the Boxee instance running on the Apple TV.
Could you wonderful folks keep this usage in mind as you move forward with this groovy goodness?
Meanwhile I'm gonna go get Mumbles for my 'Buntus!
Thanks Muchly :)
unimatrixZxero
October 20th, 2008, 02:51 PM
I run Boxee mostly on my Apple TV. It would be swell to use the network capabilities of Growl to receive growl notifications on my OSX machine from the Boxee instance running on the Apple TV.
Could you wonderful folks keep this usage in mind as you move forward with this groovy goodness?
Meanwhile I'm gonna go get Mumbles for my 'Buntus!
Thanks Muchly :)
@egrep: if you edit the boxee_growl_adapter.rb file (BOXEE_HOST) to use the IP-address of your AppleTV and enable the web server on that instance of boxee(on your AppleTV) you wil also be able receive notifications over the network.
Thanks for the feed back. As for network support with growl/mumbles. I'm planning that feature since I also like to use multiple computers with Macs/Ubuntu while Boxee is running.
As for the python port. Don't know my way around python too well. But it would be very compelling to let the script run as an add-on. It would also mean that users wouldn't have to configure the web server.
Gamester17
October 21st, 2008, 06:03 AM
Any developers/scripter who want to help with this should checkout:
http://xbmc.org/wiki/?title=Web_Server_HTTP_API
and:
http://xbmc.org/wiki/?title=Category:HTTP_API
as well as:
http://xbmc.org/wiki/?title=HOW-TO_build_Python_Scripts
and:
http://xbmc.org/wiki/?title=Category:Python
;)
iBog
October 28th, 2008, 10:14 AM
ultimatrix,
You've figured out how to initiate action (i.e. notification via Growl) when a certain event occurs (i.e. track/media change).
How could this be done at a more generic level so I can specify a custom script to be launched when a certain event occurs?
I first got this idea after wanting to automatically launch a script when a DVD is inserted. Not that it matters, but I want the script to create an ISO of the DVD.
Since Boxee doesn't have pre-defined events all I can think of is a process running in the background monitoring for the events. I imagine this constant polling would have a performance impact. Any suggestions on how to code such a background process?
Some of the events that I can think of are:
-DVD inserted
-New media detected
-New media identified (i.e. regular expression matching complete)
-New media lookup (i.e. information lookup in online databases complete)
-New media added to Boxee library
-New media not added to Boxee library
-Media playback started (this is the event you were looking for?)
-Media playback stopped/paused
-Media playback finished
Any other kind of events? Any suggestions on creating a background process to monitor for these events?
agentlame
November 2nd, 2008, 02:32 AM
i think it's because he's hooking the webserver, not the internal python api... you could do the same, but then your code isn't running in boxee.
pwarre20
December 23rd, 2008, 07:04 PM
It seems that so far everyone is interested in getting status notifications from boxee into growl when boxee is running in the background.
I have been trying to get my growl notifications to pop up in front of boxee when running full screen. (With no luck as of yet.) Any thoughts on this?
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.