summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--bot_backend.py24
-rw-r--r--ethcan.py7
-rw-r--r--ethcansend.py2
-rw-r--r--subbot.py4
5 files changed, 27 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 7471d8a..78a5c75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.pyc
settings.py
subcan.json
+subcan.svg
diff --git a/bot_backend.py b/bot_backend.py
index 6a2adfa..adf52a8 100644
--- a/bot_backend.py
+++ b/bot_backend.py
@@ -4,19 +4,27 @@ import urllib2
# Known lights, terminal symbols
lights_terminal = {}
-for i in range(1,5):
+for i in range(1,12):
ident = '%02d' % i
lights_terminal[ident] = 'osc.udp://172.22.83.5:4243/dali/lamps/%s/bright' % ident
# Production Rules/Aliases
lights_production = {
- u'lounge-stage': [u'01'],
- u'lounge-office': [u'02'],
- u'lounge-bar': [u'03'],
- u'lounge-clock': [u'04'],
- u'lounge-west': [u'lounge-bar', u'lounge-clock'],
- u'lounge-east': [u'lounge-stage', u'lounge-office'],
- u'lounge': [u'lounge-east', u'lounge-west'],
+ u'lounge-stage': [u'01'],
+ u'lounge-office': [u'02'],
+ u'lounge-bar': [u'03'],
+ u'lounge-clock': [u'04'],
+ u'hacklab-east-outer': [u'05'],
+ u'hacklab-east-middle': [u'06'],
+ u'hacklab-west-inner': [u'07'],
+ # hacklab 08
+ # hacklab 09
+ # hacklab 10
+ u'hallway': [u'11'],
+ u'lounge-west': [u'lounge-bar', u'lounge-clock'],
+ u'lounge-east': [u'lounge-stage', u'lounge-office'],
+ u'lounge': [u'lounge-east', u'lounge-west'],
+ u'hacklab': [u'hacklab-east-outer', u'hacklab-east-middle', u'hacklab-west-inner'],
}
class OSCMessage(object):
diff --git a/ethcan.py b/ethcan.py
index dad8d6f..23bb0dc 100644
--- a/ethcan.py
+++ b/ethcan.py
@@ -76,6 +76,13 @@ devices = [
SubCANDALI(0x442, 'dali.lounge_buero'),
SubCANDALI(0x443, 'dali.lounge_bar'),
SubCANDALI(0x444, 'dali.lounge_durchreiche'),
+ SubCANDALI(0x445, 'dali.hacklab.east.outer'),
+ SubCANDALI(0x446, 'dali.hacklab.east.middle'),
+ SubCANDALI(0x447, 'dali.hacklab.west.inner'),
+ SubCANDALI(0x448, 'dali.hacklab.west.middle'),
+ SubCANDALI(0x449, 'dali.hacklab.east.inner'),
+ SubCANDALI(0x44a, 'dali.hacklab.west.outer'),
+ SubCANDALI(0x44b, 'dali.flur'),
# SubCANDALI(0x47f, 'dali.lswitch'),
]
def find_dev(addr):
diff --git a/ethcansend.py b/ethcansend.py
index 9aaaebd..7f0e667 100644
--- a/ethcansend.py
+++ b/ethcansend.py
@@ -48,7 +48,7 @@ data += dgst.digest()
data = pack('>6s6sH3sH', dst, src, proto, oui, subp) + data
-s.sendto(data, ('bond0.4', 0))
+s.sendto(data, ('eth0', 0))
#sleep(0.1)
#s.sendto(data, ('bond0.4', 0))
#sleep(0.1)
diff --git a/subbot.py b/subbot.py
index 8dc095f..7e90c56 100644
--- a/subbot.py
+++ b/subbot.py
@@ -86,7 +86,7 @@ class TestBot(irc.bot.SingleServerIRCBot):
def refresh(self):
curtime = time.time()
try:
- with contextlib.closing(urllib2.urlopen('http://taifun.local.sublab.org/subcan.json')) as json_stream:
+ with contextlib.closing(urllib2.urlopen('http://argonaut.local.sublab.org/subcan.json')) as json_stream:
sdata = json.load(json_stream)
door = sdata[u'door.lock']
@@ -107,7 +107,7 @@ class TestBot(irc.bot.SingleServerIRCBot):
self.ircobj.execute_delayed(5, self.refresh)
def main(nickname, channel):
- bot = TestBot(channel, nickname, '172.22.24.1', 6667)
+ bot = TestBot(channel, nickname, 'irc.hackint.org', 6667)
bot.start()
if __name__ == "__main__":