diff --git a/babel/babel.py b/babel/babel.py index b7c77236456cb6014049d6374e3101a1eeb7f3cf..6450565eeec473ec5741a9368d5cdee90ad7a896 100644 --- a/babel/babel.py +++ b/babel/babel.py @@ -11,7 +11,7 @@ class Babel: loop = asyncio.get_event_loop() self.loop = loop - self.hbf = Hauptbahnhof(loop) + self.hbf = Hauptbahnhof("babel", loop) self.hbf.subscribe('/haspa/power', self.command_translate) self.hbf.subscribe('/haspa/power/requestinfo', self.command_requestinfo) self.hbf.subscribe('/haspa/power/status', self.command_requeststatus) diff --git a/babel/test.py b/babel/test.py index 7bc63e0707037c5859b3f3fb5e938345053c2621..f4b061390206a46d22e1eacfd902758bfe0c325d 100644 --- a/babel/test.py +++ b/babel/test.py @@ -11,7 +11,7 @@ async def on_message(client, message, _): async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("babel", loop=loop) testbf.subscribe("/haspa/led", on_message) await asyncio.sleep(2) diff --git a/hackerman/hackerman.py b/hackerman/hackerman.py index 415c38bfcfd4fa02dba4f363a6bc4f0f2ec52431..531fc5d684137af75cdb4c4ed76bc624358a8612 100644 --- a/hackerman/hackerman.py +++ b/hackerman/hackerman.py @@ -14,7 +14,7 @@ class Hackerman: loop = asyncio.get_event_loop() self.loop = loop - self.hbf = Hauptbahnhof(loop) + self.hbf = Hauptbahnhof("hackerman", loop) self.hbf.subscribe('/haspa/status', self.command_status) self.hbf.subscribe('/haspa/action', self.command_action) diff --git a/hackerman/test.py b/hackerman/test.py index 878807b8e31b40ade9559fc203dad20a74863bfc..9a87d225110fa82ec7fd74ea4c707b51581268ec 100644 --- a/hackerman/test.py +++ b/hackerman/test.py @@ -11,7 +11,7 @@ async def on_message(client, message, _): async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("test", loop=loop) testbf.subscribe("/haspa/power", on_message) await asyncio.sleep(2) diff --git a/haspa_web/test.py b/haspa_web/test.py index 635dd0bb2f1b8ff6a91f63082cb814ee2b8b14f4..600a890d34483432d9b6a35718971e4cc03490d3 100644 --- a/haspa_web/test.py +++ b/haspa_web/test.py @@ -4,7 +4,7 @@ from hauptbahnhof import Hauptbahnhof from haspa_web.haspa import HaspaWeb async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("test", loop=loop) await asyncio.sleep(2) # Now everythin should be set up diff --git a/hauptbahnhof/hauptbahnhof.py b/hauptbahnhof/hauptbahnhof.py index c598c30be06b133c6ec002c51f5f9719f0b9cc1c..deb8b8e601652b943dd2c216c323e0f43a96805f 100644 --- a/hauptbahnhof/hauptbahnhof.py +++ b/hauptbahnhof/hauptbahnhof.py @@ -13,7 +13,7 @@ class Hauptbahnhof: Hauptbahnhof manager with a lot of convenience methods """ - def __init__(self, loop=None): + def __init__(self, name, loop=None): try: idx = sys.argv.index('--confdir') self._configbase = sys.argv[idx + 1] @@ -38,10 +38,10 @@ class Hauptbahnhof: self._message_process_task = self.loop.create_task(self.message_processing()) self.connected = asyncio.Event(loop=self.loop) - logformat = '%(asctime)s | %(name)s | %(levelname)5s | %(message)s' + logformat = '%(name)s | %(levelname)5s | %(message)s' logging.basicConfig(format=logformat) - self.log = logging.getLogger(__name__) - self.log.setLevel(logging.DEBUG) + self.log = logging.getLogger(name) + self.log.setLevel(logging.INFO) async def teardown(self): """ diff --git a/mpd/mpd.py b/mpd/mpd.py index 2662a74a3566af9020aecd58fe06f2b8a9b83c00..d831a532bb18ac009859623e26561dd4470931f2 100644 --- a/mpd/mpd.py +++ b/mpd/mpd.py @@ -14,7 +14,7 @@ class MPD: loop = asyncio.get_event_loop() self.loop = loop - self.hbf = Hauptbahnhof(loop) + self.hbf = Hauptbahnhof("mpd", loop) self.hbf.subscribe('/haspa/music/control', self.command_control) self.hbf.subscribe('/haspa/music/song', self.command_song) diff --git a/mpd/test.py b/mpd/test.py index f4cd7a77a66d23ecce6ce315b45692c3020178cb..35803a31505bd21fef2a8e0dd4895424a47f5bcb 100644 --- a/mpd/test.py +++ b/mpd/test.py @@ -4,7 +4,7 @@ from hauptbahnhof import Hauptbahnhof from mpd.mpd import MPD async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("test", loop=loop) await asyncio.sleep(2) # Now everythin should be set up diff --git a/nsa/nsa.py b/nsa/nsa.py index 6abb44f9be34e46e09c39ae5f8968f23b79cff07..e88ac626acb5cb3d8b687ef15bd7e67c46922e62 100644 --- a/nsa/nsa.py +++ b/nsa/nsa.py @@ -12,7 +12,7 @@ class NSA: loop = asyncio.get_event_loop() self.loop = loop - self.hbf = Hauptbahnhof(loop) + self.hbf = Hauptbahnhof("nsa", loop) self.hbf.subscribe('/haspa/nsa/scan', self.command_scan) async def teardown(self): diff --git a/nsa/test.py b/nsa/test.py index 17db6ab9df88f4db37629f8b9f00e21215bd9340..1e3eeb6f59a440bdf9318f403a2e9e58600122f8 100644 --- a/nsa/test.py +++ b/nsa/test.py @@ -11,7 +11,7 @@ async def on_message(client, message, _): async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("test", loop=loop) testbf.subscribe("/haspa/nsa/result", on_message) await asyncio.sleep(2) diff --git a/rupprecht/rupprecht.py b/rupprecht/rupprecht.py index bb31da69902b7585a9759b6adea2c4c670816a59..8f0c16134e05ae5eabf87beb21455b2bb8619f58 100644 --- a/rupprecht/rupprecht.py +++ b/rupprecht/rupprecht.py @@ -29,7 +29,7 @@ class Rupprecht: loop = asyncio.get_event_loop() self.loop = loop - self.hbf = Hauptbahnhof(loop) + self.hbf = Hauptbahnhof("rupprecht", loop) self.hbf.subscribe('/haspa/led', self.command_led) self.space_is_open = False diff --git a/rupprecht/test.py b/rupprecht/test.py index 0e394d0664c488efbdd83e32fcfc1ec67194de41..48bec4170458593f223a5db8aa4b0e7548f1a36d 100644 --- a/rupprecht/test.py +++ b/rupprecht/test.py @@ -4,7 +4,7 @@ from hauptbahnhof import Hauptbahnhof from rupprecht.rupprecht import Rupprecht async def test(loop): - testbf = Hauptbahnhof(loop=loop) + testbf = Hauptbahnhof("test", loop=loop) await asyncio.sleep(2) diff --git a/util/ca.crt b/util/ca.crt new file mode 100644 index 0000000000000000000000000000000000000000..c837d66c57c52f090c8b56908027848088e59da8 --- /dev/null +++ b/util/ca.crt @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDnjCCAoagAwIBAgIJAO9THB0S5o0cMA0GCSqGSIb3DQEBCwUAMGQxCzAJBgNV +BAYTAkRFMQ8wDQYDVQQIDAZCYXllcm4xETAPBgNVBAcMCE11ZW5jaGVuMRcwFQYD +VQQKDA5TdHVTdGFOZXQgZS5WLjEYMBYGA1UEAwwPbXF0dC5zdHVzdGEubmV0MB4X +DTE4MDcyNDE2MDIwNloXDTI4MDcyMTE2MDIwNlowZDELMAkGA1UEBhMCREUxDzAN +BgNVBAgMBkJheWVybjERMA8GA1UEBwwITXVlbmNoZW4xFzAVBgNVBAoMDlN0dVN0 +YU5ldCBlLlYuMRgwFgYDVQQDDA9tcXR0LnN0dXN0YS5uZXQwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQC94frD3DvZ2QhI0YNPuOuCGTAH1q3v1OYdauLi +XfmxQ52t59nnheHO7EvYkCG0MJonUTYQZwXJFiZQnKyRNSfedyR1uokmmBvedB7A +m9v9nCOkt0FRNykluWOL4STmjT2LOTXSd/i6Ih3MwSro2BfO0w9SnLM82Yd+CsSx +6eHnFy/Mk3LCuMLyquH+RWoGBBOUNPw7TbmWJbdJgZSfYEcxUDSsHnQmVb+8mi65 +Kr8nG0pqryBwwOhqN+w6+2FWzQMKfG8clfuo1Y13rUj3snO/2A//QQ/vk3bqL1Jb +7OgHXGe2X5WKxFrFPHurjRYeMNuyuRwSqSR8r8+GQOohtEQ3AgMBAAGjUzBRMB0G +A1UdDgQWBBRWVjULwJ9UHioChI7eoijBL1f1aTAfBgNVHSMEGDAWgBRWVjULwJ9U +HioChI7eoijBL1f1aTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IB +AQCov/MUq0/HPwoOyZ0R2n46jVSoE3C4GyyZ6CMb+/e26fPHsvoDrzfVVngzeCJe +oh9cEaPqKnwoRlr9uvKudXTls+16WQb3C2zs7aZb/noPTNSPHjJmGY/kW3nv8FTR +U5PNevfYjZhr02lfp5OqmAiqJ/wb/hl5r/+RpdRU3CjDehqoM/x3ujXHeSXftRHR +P8VsDvLgljqfqn1ilZ9y2i4xZB7ZlJxMMpHIaXFPjaiTBMKFvRUM2B43mhrncD2/ +2QCpd68S0UiEH1TECOb4vLlf8JNXB8ivVO+yGVKoniqXWfv0qRTLYcOAsd39pNvO +PA6KS1PEQ4fykGtRjaPYyTPd +-----END CERTIFICATE-----