Skybot

Notes on Steve Landers Skybot talk at Tcl2008.

(... Started off demoing the skybot flying robot ...)

iomas research (a subsidiary of eolas) :

  • Internet research and development group
  • based in Wheaton, IL
  • distributed (even for those located in IL)
  • Use skype for VoIP
  • ...

Skype:

  • audio/video over the internet
  • software product
  • proprietary VoIP network
  • ...

client <-> router <-> super node <-> cloud <-> super node <-> router <-> client.

Cool... but if you are directly connected to the Internet skype might use your bandwidth/cpu; yes, you agreed to it (in EULA). Problem...

Skybot: the idea. Take Skype offline when user idle. Bring Skype back online when user active. How to detect idle?

  • pre-TIP 24
  • detect if screensaver active
  • on Windows used TWAPI

Could have used Ffidl--"like juggling a chainsaw to access" win32 dll

Version 1.0:

 if {[twapi::Screensaver_running]} {
    set id [twapi::get_process_ids -glob -name Skype.exe]
    twapi::endprocess $id -force
 }

Second version:

  • Skype API (message passing/textual API)
  • Three types of messages (commands to control Skype, directives, i.e., out of band control API, skype status messages)
  • Originally only available on Windows

Created a new winmsg extension:

  • Tcl Windows Messaging API interface
  • 140 line Critcl extension
  • register callbacks
  • send messages
  • ...

Also used winico:

  • Windows system tray / taskbar
  • Post menus (note bug workaround in the paper)

Also used Bwidget.

Deployed as a skybot.exe. Starpack (2.5mb); no installer. Delete .exe to uninstall.

Workflow. On startup: add icon to system tray. Check if skype is running. Monitors screensaver. If user is idle, take Skype offline. When user becomes active, take Skype online. Default when screensaver is idle: check every 15 seconds, skype status is online. Default when screensaver is active: check every second, skype status is invisible.

What if...?

  • extension language for rules and actions
  • state engine to evaluate rules?
  • actions access state and config info?
  • rules in database?

Skybot Rulz!

  • Rules based state engine (event recognition, actions written in Tcl, rules + actions stored in DB--extensible)
  • 3 type of rules (call rules, chat rules, watch rules)

(... showed screenshot of call rules editor GUI ...)

Things to note: database centric (rules + actions stored as data, extensible & flexible, modified using familiar paradigm). Rules can be parameterized. Call actions: accept, refuse, message, reply, mail, play, say, voice mail, log, conference, redirect and mute. Chat actions: reply, call, mail, message, proxy, etc. Watch actions: mail, play, say, call, etc.

Current status

  • Proof of concept in 2005 (state engine works, many rules defined, some even implemented)
  • In the half-bakery (waited Skype API on Linux and Mac)
  • Intention is to productize (free lite version; low-cost "pro" version)

Possibilities, if the boss calls while on the golf course:

  • direct to voice mail
  • Start chat back, connected with Eliza
  • text my iPhone informing me
  • engage boss in discussion, logged to iPhone
  • tell boss I'll call soon then terminate chat
  • call boss when back in office

(totally hypothetical of course)

Skybot demonstrates: Tcl/Tk Windows integration, Tcl as an extension language, and the flexibility/extensibility of a data centric design.

(... demoed the software with assistance from Gerald Lester and Michael Doyle ... with an impromptu unexpected appearance by DKF and others ...)


See also: