diff --git a/smarthome.py b/smarthome.py index 9406c62..3499c64 100644 --- a/smarthome.py +++ b/smarthome.py @@ -32,7 +32,7 @@ class Wetation(wx.Frame): wx.Frame.__init__(self, *args, **kwds) self.SetSize((800, 600)) self.garage_oc = wx.Button(self, wx.ID_ANY, "Garage") - self.gate_position = wx.Slider(self, wx.ID_ANY, 0, 0, 100) + self.gate_position = wx.Slider(self, wx.ID_ANY, 50, 0, 100) self.__set_properties() self.__do_layout() @@ -183,18 +183,23 @@ def initiate_update(rt, frame, prot_out, prot_in, prot_garage): if __name__ == "__main__": - report.appLoggingConfigure(os.path.dirname(__file__), 'stdout', config.loggers) + report.appLoggingConfigure(os.path.dirname(__file__), config.LOGTARGET, config.loggers) # app = MyApp(0) # # Start TCP-Clients c_tcp = tcp_socket.tcp_client_stp(config.server_out_ip, config.server_out_port, rx_log_lvl=logging.DEBUG) prot_out = wetation_protocol.my_smarthome_gui_client_protocol_tcp(c_tcp, app.frame.out_temperature, app.frame.out_humidity, app.frame.out_pressure, app.frame.Layout, config.server_out_secret) + if config.server_out_secret is not None: + prot_out.authentificate() c_tcp = tcp_socket.tcp_client_stp(config.server_in_ip, config.server_in_port, rx_log_lvl=logging.DEBUG) prot_in = wetation_protocol.my_smarthome_gui_client_protocol_tcp(c_tcp, app.frame.in_temperature, app.frame.in_humidity, app.frame.in_pressure, app.frame.Layout, config.server_in_secret) + if config.server_in_secret is not None: + prot_in.authentificate() c_tcp = tcp_socket.tcp_client_stp(config.server_garage_ip, config.server_garage_port, rx_log_lvl=logging.DEBUG) prot_garage = garage_protocol.my_smarthome_gui_client_protocol_tcp(c_tcp, app.frame.gate_position, app.frame.Layout, config.server_garage_secret) - prot_garage.authentificate() + if config.server_garage_secret is not None: + prot_garage.authentificate() app.frame.prot_garage = prot_garage pt = task.periodic(10, initiate_update, app.frame, prot_out, prot_in, prot_garage) pt.run() diff --git a/smarthome.wxg b/smarthome.wxg index 6ae4e42..db496ad 100644 --- a/smarthome.wxg +++ b/smarthome.wxg @@ -1,5 +1,5 @@ - + @@ -416,7 +416,7 @@ 1 0, 100 - 0 + 50