Difference between revisions of "Spacemon"

From Pumping Station One
Jump to navigation Jump to search
(config update)
Line 29: Line 29:
 
     "role" : "work1",
 
     "role" : "work1",
 
     "type" : "camera",
 
     "type" : "camera",
     "name" : "space",
+
     "name" : "electronics",
 
     "url" : "http://10.100.0.61/mjpg/video.mjpg",
 
     "url" : "http://10.100.0.61/mjpg/video.mjpg",
     "zmq_url" : "tcp://127.0.0.1:7200",
+
     "zmq_url" : "tcp://*:7200",
 
     "username" : "REDACTED",
 
     "username" : "REDACTED",
 
     "password" : "REDACTED"
 
     "password" : "REDACTED"
Line 38: Line 38:
 
     "role" : "work2",
 
     "role" : "work2",
 
     "type" : "camera",
 
     "type" : "camera",
     "name" : "electronics",
+
     "name" : "shop",
 
     "url" : "http://10.100.0.62/mjpg/video.mjpg",
 
     "url" : "http://10.100.0.62/mjpg/video.mjpg",
     "zmq_url" : "tcp://127.0.0.1:7201",
+
     "zmq_url" : "tcp://*:7201",
 
     "username" : "REDACTED",
 
     "username" : "REDACTED",
 
     "password" : "REDACTED"
 
     "password" : "REDACTED"
 +
  },
 +
  {
 +
    "role" : "work3",
 +
    "type" : "camera",
 +
    "name" : "outside",
 +
    "zmq_url" : "tcp://*:7204",
 +
    "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=7&scale=100&maxfps=5&buffer=1000&auth=",
 +
    "username" : "REDACTED",
 +
    "password" : "REDACTED",
 +
    "zm_auth_hash_secret" : "REDACTED",
 +
    "snapshot" : true
 +
  },
 +
  {
 +
    "role" : "work3",
 +
    "type" : "camera",
 +
    "name" : "gantry_shop",
 +
    "description" : "shop from gantry",
 +
    "zmq_url" : "tcp://*:7205",
 +
    "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=8&scale=100&maxfps=5&buffer=1000&auth=",
 +
    "username" : "REDACTED",
 +
    "password" : "REDACTED",
 +
    "zm_auth_hash_secret" : "REDACTED",
 +
    "snapshot" : true
 
   },
 
   },
 
   {
 
   {
 
     "role" : "work1",
 
     "role" : "work1",
 
     "type" : "camera",
 
     "type" : "camera",
     "name" : "woodshop",
+
     "name" : "crafts",
 
     "url" : "http://10.100.0.63/mjpg/video.mjpg",
 
     "url" : "http://10.100.0.63/mjpg/video.mjpg",
     "zmq_url" : "tcp://127.0.0.1:7202",
+
     "zmq_url" : "tcp://*:7202",
 
     "username" : "REDACTED",
 
     "username" : "REDACTED",
 
     "password" : "REDACTED"
 
     "password" : "REDACTED"
Line 56: Line 79:
 
     "role" : "work2",
 
     "role" : "work2",
 
     "type" : "camera",
 
     "type" : "camera",
     "name" : "garage",
+
     "name" : "mystery",
 
     "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=3&scale=100&maxfps=5&buffer=1000&auth=",
 
     "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=3&scale=100&maxfps=5&buffer=1000&auth=",
     "zmq_url" : "tcp://127.0.0.1:7203",
+
     "zmq_url" : "tcp://*:7203",
 
     "username" : "REDACTED",
 
     "username" : "REDACTED",
 
     "password" : "REDACTED",
 
     "password" : "REDACTED",
Line 64: Line 87:
 
   },
 
   },
 
   {
 
   {
     "role" : "frontend",
+
     "role" : ["frontend", "announcer"],
 
     "type" : "alert",
 
     "type" : "alert",
 
     "mode" : "sustain",
 
     "mode" : "sustain",
 
     "low_level" : 20,
 
     "low_level" : 20,
 
     "duration" : 1800,
 
     "duration" : 1800,
     "message" : "I see PS:One is packed with people. Time to release the neurotoxin into the enrichment center.",
+
     "message" : "There's loads of people working in the shop. Yay, hacking!",
     "camera" : "space",
+
     "camera" : "shop",
 
     "throttle" : 9400
 
     "throttle" : 9400
 
   },
 
   },
 
   {
 
   {
     "role" : "frontend",
+
     "role" : ["frontend", "announcer"],
    "type" : "alert",
 
    "mode" : "sustain",
 
    "high_level" : 0,
 
    "duration" : 73200,
 
    "message" : "I've been sitting here in the woodshop for like a day and nobody came in. Will nobody touch my wood?",
 
    "camera" : "woodshop",
 
    "throttle" : 86400
 
  },
 
  {
 
    "role" : "frontend",
 
    "type" : "alert",
 
    "mode" : "sustain",
 
    "high_level" : 0,
 
    "duration" : 63200,
 
    "message" : "The laser is lonely. Excite a laser today.",
 
    "camera" : "electronics",
 
    "throttle" : 86400
 
  },
 
  {
 
    "role" : "frontend",
 
 
     "type" : "alert",
 
     "type" : "alert",
 
     "mode" : "sustain",
 
     "mode" : "sustain",
Line 100: Line 103:
 
     "low_level" : 4,
 
     "low_level" : 4,
 
     "duration" : 1500,
 
     "duration" : 1500,
     "message" : "The people in the main space are being so boring. Break a leg, slackers!",
+
     "message" : "The people in the electronics shop are being so boring. Break a leg, slackers!",
     "camera" : "space",
+
     "camera" : "electronics",
 
     "throttle" : 86400
 
     "throttle" : 86400
 
   },
 
   },
 
   {
 
   {
     "role" : "frontend",
+
     "role" : ["frontend", "announcer"],
 
     "type" : "alert",
 
     "type" : "alert",
 
     "mode" : "sustain",
 
     "mode" : "sustain",
Line 111: Line 114:
 
     "duration" : 43200,
 
     "duration" : 43200,
 
     "message" : "I'm so alone.  Nobody wants to hang out with me.",
 
     "message" : "I'm so alone.  Nobody wants to hang out with me.",
     "camera" : "space",
+
     "camera" : "electronics",
 
     "throttle" : 86400
 
     "throttle" : 86400
 
   },
 
   },
Line 120: Line 123:
 
       "space" : "Pumping Station: One",
 
       "space" : "Pumping Station: One",
 
       "url" : "http://pumpingstationone.org",
 
       "url" : "http://pumpingstationone.org",
       "address" : "3354 N Elston, Chicago IL 60618, USA",
+
       "address" : "3519 N Elston, Chicago IL 60618, USA",
 
       "contact" : {
 
       "contact" : {
 
         "twitter" : "@pumpingstation1",
 
         "twitter" : "@pumpingstation1",
Line 128: Line 131:
 
       },
 
       },
 
       "logo" : "http://wiki.pumpingstationone.org/thumb.php?f=Psone-logo-w-name.svg&width=576",
 
       "logo" : "http://wiki.pumpingstationone.org/thumb.php?f=Psone-logo-w-name.svg&width=576",
       "lat" : 41.942387,
+
       "lat" : 41.945321,
       "lon" : -87.702911,
+
       "lon" : -87.706631,
 
       "cam" : "http://apps.pumpingstationone.org/space-activity/"
 
       "cam" : "http://apps.pumpingstationone.org/space-activity/"
 
     },
 
     },
 
     "cameras" : {
 
     "cameras" : {
       "space" : 10,
+
       "shop" : 7,
       "woodshop" : 7,
+
       "electronics" : 30,
       "electronics" : 30
+
       "crafts" : 20
 
     },
 
     },
 
     "needed_activity" : 1,
 
     "needed_activity" : 1,
Line 146: Line 149:
 
     "nick" : "spacemon",
 
     "nick" : "spacemon",
 
     "channel" : "#pumpingstationone"
 
     "channel" : "#pumpingstationone"
 +
  },
 +
  {
 +
    "role" : "announcer",
 +
    "type" : "announced",
 +
    "zmq_url" : "tcp://10.100.0.16:4503"
 
   },
 
   },
 
   {
 
   {
 
     "role" : "work1",
 
     "role" : "work1",
 
     "type" : "web",
 
     "type" : "web",
     "port" : 8001
+
     "port" : 8001,
 +
    "zmq_url" : "tcp://*:8201"
 
   },
 
   },
 
   {
 
   {
 
     "role" : "work2",
 
     "role" : "work2",
 
     "type" : "web",
 
     "type" : "web",
     "port" : 8002
+
     "port" : 8002,
 +
    "zmq_url" : "tcp://*:8202"
 +
  },
 +
  {
 +
    "role" : "work3",
 +
    "type" : "web",
 +
    "port" : 8003,
 +
    "zmq_url" : "tcp://*:8203"
 
   },
 
   },
 
   {
 
   {

Revision as of 07:34, 13 July 2012

Spacemon is our IRC bot that watches the 4 webcams in the space and shows how busy each part of the space is at any time.

IRC commands:

 <+Toba> !space
 <+spacemon> garage: 0% busy, electronics: 34% busy, woodshop: 0% busy, space: 26% busy

This shows that the electronics area and the main hangout space are busy but the rest of PS1 is empty. There is no camera in the classroom or the front lounge or the loft lounge.

Another command, !light, lets you check if the lights are on. This is a good indication that someone is either rude, present, or planning to come back...

 <+Toba> !light
 < spacemon> garage: 0% lit, electronics: 40% lit, woodshop: 2% lit, space: 27% lit

From time to time, spacemon will report that the space is unusually busy:

 <+spacemon> I see PS:One is packed with people. Time to release the neurotoxin into the enrichment center.

This alert is based on the "space" camera.

There is also a web interface, a SpaceAPI endpoint and the software, lidless is open source and is available on github.


lidless config

 [
 {
   "role" : "work1",
   "type" : "camera",
   "name" : "electronics",
   "url" : "http://10.100.0.61/mjpg/video.mjpg",
   "zmq_url" : "tcp://*:7200",
   "username" : "REDACTED",
   "password" : "REDACTED"
 },
 {
   "role" : "work2",
   "type" : "camera",
   "name" : "shop",
   "url" : "http://10.100.0.62/mjpg/video.mjpg",
   "zmq_url" : "tcp://*:7201",
   "username" : "REDACTED",
   "password" : "REDACTED"
 },
 {
   "role" : "work3",
   "type" : "camera",
   "name" : "outside",
   "zmq_url" : "tcp://*:7204",
   "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=7&scale=100&maxfps=5&buffer=1000&auth=",
   "username" : "REDACTED",
   "password" : "REDACTED",
   "zm_auth_hash_secret" : "REDACTED",
   "snapshot" : true
 },
 {
   "role" : "work3",
   "type" : "camera",
   "name" : "gantry_shop",
   "description" : "shop from gantry",
   "zmq_url" : "tcp://*:7205",
   "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=8&scale=100&maxfps=5&buffer=1000&auth=",
   "username" : "REDACTED",
   "password" : "REDACTED",
   "zm_auth_hash_secret" : "REDACTED",
   "snapshot" : true
 },
 {
   "role" : "work1",
   "type" : "camera",
   "name" : "crafts",
   "url" : "http://10.100.0.63/mjpg/video.mjpg",
   "zmq_url" : "tcp://*:7202",
   "username" : "REDACTED",
   "password" : "REDACTED"
 },
 {
   "role" : "work2",
   "type" : "camera",
   "name" : "mystery",
   "url" : "http://zm.pumpingstationone.org/cgi-bin/nph-zms?mode=jpeg&monitor=3&scale=100&maxfps=5&buffer=1000&auth=",
   "zmq_url" : "tcp://*:7203",
   "username" : "REDACTED",
   "password" : "REDACTED",
   "zm_auth_hash_secret" : "REDACTED"
 },
 {
   "role" : ["frontend", "announcer"],
   "type" : "alert",
   "mode" : "sustain",
   "low_level" : 20,
   "duration" : 1800,
   "message" : "There's loads of people working in the shop. Yay, hacking!",
   "camera" : "shop",
   "throttle" : 9400
 },
 {
   "role" : ["frontend", "announcer"],
   "type" : "alert",
   "mode" : "sustain",
   "high_level" : 10,
   "low_level" : 4,
   "duration" : 1500,
   "message" : "The people in the electronics shop are being so boring. Break a leg, slackers!",
   "camera" : "electronics",
   "throttle" : 86400
 },
 {
   "role" : ["frontend", "announcer"],
   "type" : "alert",
   "mode" : "sustain",
   "high_level" : 0,
   "duration" : 43200,
   "message" : "I'm so alone.  Nobody wants to hang out with me.",
   "camera" : "electronics",
   "throttle" : 86400
 },
 {
   "type" : "spaceapi",
   "name" : "ps1",
   "metadata" : {
     "space" : "Pumping Station: One",
     "url" : "http://pumpingstationone.org",
     "address" : "3519 N Elston, Chicago IL 60618, USA",
     "contact" : {
       "twitter" : "@pumpingstation1",
       "irc" : "irc://irc.freenode.net/#pumpingstationone",
       "email" : "[email protected]",
       "ml" : "http://groups.google.com/group/pumping-station-one-public"
     },
     "logo" : "http://wiki.pumpingstationone.org/thumb.php?f=Psone-logo-w-name.svg&width=576",
     "lat" : 41.945321,
     "lon" : -87.706631,
     "cam" : "http://apps.pumpingstationone.org/space-activity/"
   },
   "cameras" : {
     "shop" : 7,
     "electronics" : 30,
     "crafts" : 20
   },
   "needed_activity" : 1,
   "status_note" : "Check http://pumpingstationone.org/events/ for public events."
 },
 {
   "role" : "frontend",
   "type" : "irc",
   "server" : "irc.freenode.org",
   "nick" : "spacemon",
   "channel" : "#pumpingstationone"
 },
 {
   "role" : "announcer",
   "type" : "announced",
   "zmq_url" : "tcp://10.100.0.16:4503"
 },
 {
   "role" : "work1",
   "type" : "web",
   "port" : 8001,
   "zmq_url" : "tcp://*:8201"
 },
 {
   "role" : "work2",
   "type" : "web",
   "port" : 8002,
   "zmq_url" : "tcp://*:8202"
 },
 {
   "role" : "work3",
   "type" : "web",
   "port" : 8003,
   "zmq_url" : "tcp://*:8203"
 },
 {
   "role" : "frontend",
   "type" : "web",
   "proxy_mode" : "auto",
   "port" : 8000
 }
 ]