--[[ Send an Tweet when the phone rings kevint feb 2012 xap-header { v=12 hop=1 uid=FF111300 Class=xAP-OSD.display Source=mi4.switchboard.BLACK1 } Display.SLIMP3 { Line1=Incoming Call : Kevin Line2=Mobile Telephone, 07871 7946221 Duration=20 Brightness=Brightest } --]] module(...,package.seeall) require("xap") info={ version="1.0", description="Tweet Caller ID when phone rings" } function tweet(msg) local msg1 = xap.getValue("display.slimp3","line1") local msg2 = xap.getValue("display.slimp3","line2") mtime= os.date("%H:%M:%S") mtime= (mtime)..(" ") msg= (mtime)..(msg1) msg= (msg)..(" ") msg= (msg)..(msg2) xap.sendShort(string.format([[ xap-header { source=dbzoo.livebox.1.Plugboard target=dbzoo.livebox.1.Twitter class=xAPBSC.cmd } output.state.1 { id=* text=%s }]],(msg)..(" Someones calling you_O_o_O"))) end function init() local f=xap.Filter() f:add("xap-header","class","xAP-OSD.display") f:add("xap-header","source","mi4.switchboard.BLACK1") f:add("display.slimp3","line1",xap.FILTER_ANY) f:callback(tweet) end