Marvin P Droid
Marvin_P_Droid is the space monitoring irc bot, based upon irccat (https://github.com/RJ/irccat).
Marvin is strange, in that he is a set of xml configuration files, compiled into Java which then accepts socket connections and can execute commands from IRC that are actually scripts wrote in PHP, Perl, Bash and potentially other languages.
Marvin is mainly situated in the following folder on the old hackspace server hosted on Nav's VDSL:
/usr/local/src/irccat
Marvin is currently situated on the old hackspace server (http://wiki.leedshackspace.org.uk/index.php/People) server on the end of Nav's VDSL line, where the LeedsHackspace website also resides. Marvin then communicates via VPN to the server at the space where the monitoring equipment is.
The space monitoring is handled by a combination of Perl scripts on the server situated within the space. This then communicates back to Marvin via socket communication.
These scripts are located on "spare-gw" at the following location:
/sites/status/scripts
The scripts in the space store/read their information (and most scripts that communicate with Marvin do too) via a MySQL database stored on the server at the Hackspace.
Parts of this bot is everywhere, the code is out of date, not currently version controlled and is in a (bit of a) mess.
Marvin_P_Droid is currently setup to join #leeds-hack-space and #leedshackspace on freenode IRC, with #leeds-hack-space set as the priority channel in the irccat config xml file.
Current Commands
Commands can be run from either the irc channel #leeds-hack-space or they can be /msg sent to Marvin_P_Droid.
Commands are directly executed from their script names, this is why you have to be careful what you put in the command folder and it may be best to have a 'command' filename that just refers to other script file names that are stored in sub folders. They are stored here:
/usr/local/src/irccat/commands
They are executed by typing "?COMMAND" where COMMAND is the name of the script file without any . extension.
Current commands are:
- camera help
- directive <value>
- environmental
- fweather
- noidea
- status
- moo
- idea
The following bring up a list of commands, the list is manually created and not automated in the slightest. This could be done, but it requires that only script names in the Commands folder are to be intended to be executed as commands in the chat:
?commands ?help
There also exists a folder of broken or in development commands, with the move from old Hackspace to the new Hackspace and the fact that the mySql server that is used is actually at the Hackspace while Marvin is at Nav's has meant that some scripts need to be updated or just never worked. There is also some legacy functionality that resides in some of the perl scripts in the space.
At present a duplication of mySql database content exists on the server in the space and at Nav's so upon initial inspection it wasn't entirely clear which one was being used and updated.