Spacemon

From Pumping Station: One Wiki
Jump to: navigation, search

Spacemon is our IRC bot that watches the 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 (which should be at this url but it is broken at the moment), 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",
       "store" : true,
       "store_thr" : 1
     },
     {
       "role" : "work1",
       "type" : "camera",
       "name" : "lasercutter",
       "url" : "http://10.100.0.64/mjpg/video.mjpg",
       "zmq_url" : "tcp://*:7206",
       "username" : "REDACTED",
       "password" : "REDACTED",
       "snapshot" : true,
       "store" : true,
       "store_thr" : 1
     },
     {
       "role" : "work2",
       "type" : "camera",
       "name" : "shop",
       "url" : "http://10.100.0.62/mjpg/video.mjpg",
       "zmq_url" : "tcp://*:7201",
       "username" : "REDACTED",
       "password" : "REDACTED",
       "store" : true,
       "store_thr" : 1
     },
     {
       "role" : "work1",
       "type" : "camera",
       "name" : "crafts",
       "url" : "http://10.100.0.63/mjpg/video.mjpg",
       "zmq_url" : "tcp://*:7202",
       "username" : "REDACTED",
       "password" : "REDACTED",
       "store" : true,
       "store_thr" : 1
     },
     {
       "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",
         "contact" : {
       "twitter" : "@pumpingstation1",
       "irc" : "irc://irc.freenode.net/#pumpingstationone",
       "email" : "info@pumpingstationone.org",
       "ml" : "http://groups.google.com/group/pumping-station-one-public"
         },
         "issue_report_channels": [
       "twitter"
         ],
         "logo" : "pumpingstationone.org.wiki.logo.png",
         "state" : {
       "icon" : {
         "open" : "pumpingstationone.org.wiki.logo.png",
         "closed" : "pumpingstationone.org.wiki.logo.png"
       }
         },
         "location" : {
       "address" : "3519 N Elston, Chicago IL 60618, USA",
       "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.net",
       "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
     }
     ]