i would attempt this myself but i'm not very good with python and this will take someone with much more time or experience then i have.
xap would be perfect for xbmc... it would add true integration ability to xbmc across os platforms, applications, and hardware.
there are already several plug-ins for software and hardware like homeseer (home automation software), girder, palm, tivo, microsoft outlook, xlobby (home theatre front end), temperature sensors, email, internet services like weather, and many more!
xap easily extends functionality and interoperability with apps that support xap. it enables exchange of status and display data as well as controling devices (software and hardware).
here's some info...
xap, (pronounced zap) is an open protocol intended to support the integration of telemetry and control devices primarily within the home - it is the glue that supports the interconnectivity of home automation devices.
the primary design objectives are:
simple, easy to implement/retrofit
suitable for use with a wide range of processing capabilities, from embedded controllers to fully fledged pc's
operating system agnostic
programming language agnostic
network agnostic
see these links...
http://www.xapautomation.org
http://www.xapframework.net
http://www.mi4.biz
http://www.bazautomation.com