From 4781d579e741a940173fbd32d61ac9ccea155126 Mon Sep 17 00:00:00 2001 From: Philipp Grimm Date: Wed, 22 May 2024 23:35:09 +0200 Subject: [PATCH] Added MGW support --- changes.md | 3 + eo_man/controller/serial_controller.py | 84 ++++++++++++++++++------- eo_man/data/const.py | 44 +++++++++---- eo_man/data/data_helper.py | 12 ++++ eo_man/data/device.py | 17 ++++- eo_man/data/ha_config_generator.py | 12 ++-- eo_man/view/device_details.py | 62 +++++++++++++++--- eo_man/view/filter_bar.py | 2 +- eo_man/view/serial_communication_bar.py | 4 +- requirements.txt | 3 +- setup.py | 5 +- 11 files changed, 192 insertions(+), 56 deletions(-) diff --git a/changes.md b/changes.md index 96500c3..6013d65 100644 --- a/changes.md +++ b/changes.md @@ -1,5 +1,8 @@ # Change Log +## v0.1.22 Support for MGW Gateway +* Added support for [MGW Gateway](https://www.piotek.de/PioTek-MGW-POE) (ESP3 over LAN) + ## v0.1.21 EEP representation bug fixes * Ignores unknown devices * Fixed EEP representation in dorp down diff --git a/eo_man/controller/serial_controller.py b/eo_man/controller/serial_controller.py index 0616cb7..05bc3ab 100644 --- a/eo_man/controller/serial_controller.py +++ b/eo_man/controller/serial_controller.py @@ -1,4 +1,3 @@ - from enum import Enum import sys import glob @@ -9,6 +8,7 @@ import logging import threading + import serial.tools.list_ports from serial.tools.list_ports_common import ListPortInfo @@ -16,11 +16,13 @@ from eltakobus.device import * from eltakobus.locking import buslocked, UNLOCKED from eltakobus.message import Regular4BSMessage + from esp2_gateway_adapter.esp3_serial_com import ESP3SerialCommunicator +from esp2_gateway_adapter.esp3_tcp_com import TCP2SerialCommunicator, detect_lan_gateways from ..data import data_helper from ..data.device import Device -from ..data.const import GatewayDeviceType +from ..data.const import GatewayDeviceType as GDT, GATEWAY_DISPLAY_NAMES as GDN from .app_bus import AppBusEventType, AppBus @@ -44,18 +46,23 @@ def on_window_closed(self, data) -> None: self.kill_serial_connection_before_exit() + + def get_serial_ports(self, device_type:str, force_reload:bool=False) ->list[str]: if force_reload or self.port_mapping is None: self.port_mapping = self._get_gateway2serial_port_mapping() - - if device_type == 'FAM14': - return self.port_mapping[GatewayDeviceType.GatewayEltakoFAM14.value] - elif device_type == 'FGW14-USB': - return self.port_mapping[GatewayDeviceType.GatewayEltakoFGW14USB.value] - elif device_type == 'FAM-USB': - return self.port_mapping[GatewayDeviceType.GatewayEltakoFAMUSB.value] - elif device_type == 'USB300': - return self.port_mapping[GatewayDeviceType.GatewayEnOceanUSB300.value] + self.port_mapping[GDT.LAN] = detect_lan_gateways() + + if device_type == GDN[GDT.EltakoFAM14]: + return self.port_mapping[GDT.EltakoFAM14.value] + elif device_type == GDN[GDT.EltakoFGW14USB]: + return self.port_mapping[GDT.EltakoFGW14USB.value] + elif device_type == GDN[GDT.EltakoFAMUSB]: + return self.port_mapping[GDT.EltakoFAMUSB.value] + elif device_type == GDN[GDT.USB300]: + return self.port_mapping[GDT.USB300.value] + elif device_type == GDN[GDT.LAN]: + return self.port_mapping[GDT.LAN] else: return [] @@ -89,10 +96,10 @@ def _get_gateway2serial_port_mapping(self) -> dict[str:list[str]]: # ports = [p.device for p in _ports if p.vid == self.USB_VENDOR_ID] - fam14 = GatewayDeviceType.GatewayEltakoFAM14.value - usb300 = GatewayDeviceType.GatewayEnOceanUSB300.value - famusb = GatewayDeviceType.GatewayEltakoFAMUSB.value - fgw14usb = GatewayDeviceType.GatewayEltakoFGW14USB.value + fam14 = GDT.EltakoFAM14.value + usb300 = GDT.USB300.value + famusb = GDT.EltakoFAMUSB.value + fgw14usb = GDT.EltakoFGW14USB.value result = { fam14: [], usb300: [], famusb: [], fgw14usb: [], 'all': [] } count = 0 @@ -183,14 +190,21 @@ def _received_serial_event(self, message) -> None: def establish_serial_connection(self, serial_port:str, device_type:str) -> None: baudrate:int=57600 delay_message:float=.1 - if device_type == 'FAM-USB': + if device_type == GDN[GDT.EltakoFAMUSB]: baudrate = 9600 - elif device_type == 'FAM14': + elif device_type == GDN[GDT.EltakoFAM14]: delay_message = 0.001 try: if not self.is_serial_connection_active(): - if device_type == 'USB300': + if device_type == GDN[GDT.LAN]: + baudrate=5100 + self._serial_bus = TCP2SerialCommunicator(serial_port, 5100, + callback=self._received_serial_event, + esp2_translation_enabled=True, + auto_reconnect=False + ) + elif device_type == GDN[GDT.ESP3]: self._serial_bus = ESP3SerialCommunicator(serial_port, callback=self._received_serial_event, esp2_translation_enabled=True, @@ -212,7 +226,7 @@ def establish_serial_connection(self, serial_port:str, device_type:str) -> None: self.connected_gateway_type = device_type self.app_bus.fire_event(AppBusEventType.LOG_MESSAGE, {'msg': f"Serial connection established. serial port: {serial_port}, baudrate: {baudrate}", 'color':'green'}) - if device_type == 'FAM14': + if device_type == GDN[GDT.EltakoFAM14]: def run(): asyncio.run( self._get_fam14_device_on_bus() ) @@ -223,10 +237,12 @@ def run(): t = threading.Thread(target=run) t.start() else: - if device_type == 'FAM-USB': + if device_type == GDN[GDT.EltakoFAMUSB]: asyncio.run( self.async_create_fam_usb_device() ) - elif device_type == 'USB300': + elif device_type == GDN[GDT.USB300]: asyncio.run( self.async_create_usb300_device() ) + elif device_type == GDN[GDT.LAN]: + asyncio.run( self.async_create_lan_gw_device() ) self.app_bus.fire_event( AppBusEventType.CONNECTION_STATUS_CHANGE, @@ -241,6 +257,28 @@ def run(): logging.exception(msg, exc_info=True) + async def async_create_lan_gw_device(self): + try: + self._serial_bus.set_callback( None ) + + self.current_base_id = b2s(self._serial_bus.base_id) + self.gateway_id = self.current_base_id + + await self.app_bus.async_fire_event(AppBusEventType.ASYNC_TRANSCEIVER_DETECTED, {'type': GDN[GDT.LAN], + 'base_id': self.current_base_id, + 'gateway_id': self.gateway_id, + 'tcm_version': '', + 'api_version': ''}) + + + except Exception as e: + msg = 'Failed to get information about LAN GW (TCP2ESP3)!!!' + self.app_bus.fire_event(AppBusEventType.LOG_MESSAGE, {'msg': msg, 'log-level': 'ERROR', 'color': 'red'}) + logging.exception(msg, exc_info=True) + raise e + finally: + self._serial_bus.set_callback( self._received_serial_event ) + async def async_create_usb300_device(self): try: self._serial_bus.set_callback( None ) @@ -248,7 +286,7 @@ async def async_create_usb300_device(self): self.current_base_id = b2s(self._serial_bus.base_id) self.gateway_id = self.current_base_id - await self.app_bus.async_fire_event(AppBusEventType.ASYNC_TRANSCEIVER_DETECTED, {'type': 'USB300', + await self.app_bus.async_fire_event(AppBusEventType.ASYNC_TRANSCEIVER_DETECTED, {'type': GDN[GDT.USB300], 'base_id': self.current_base_id, 'gateway_id': self.gateway_id, 'tcm_version': '', @@ -303,7 +341,7 @@ async def async_create_fam_usb_device(self): tcm_sw_v = '.'.join(str(n) for n in response.body[2:6]) api_v = '.'.join(str(n) for n in response.body[6:10]) - await self.app_bus.async_fire_event(AppBusEventType.ASYNC_TRANSCEIVER_DETECTED, {'type': 'FAM-USB', + await self.app_bus.async_fire_event(AppBusEventType.ASYNC_TRANSCEIVER_DETECTED, {'type': GDN[GDT.EltakoFAMUSB], 'base_id': self.current_base_id, 'gateway_id': self.gateway_id, 'tcm_version': tcm_sw_v, diff --git a/eo_man/data/const.py b/eo_man/data/const.py index 8052472..4127003 100644 --- a/eo_man/data/const.py +++ b/eo_man/data/const.py @@ -63,6 +63,7 @@ CONF_INVERT_SIGNAL: Final = "invert_signal" CONF_VOC_TYPE_INDEXES: Final = "voc_type_indexes" + class LANGUAGE_ABBREVIATION(StrEnum): LANG_ENGLISH = 'en' LANG_GERMAN = 'de' @@ -79,10 +80,12 @@ class LANGUAGE_ABBREVIATION(StrEnum): ] class GatewayDeviceType(str, Enum): - GatewayEltakoFAM14 = 'fam14' - GatewayEltakoFGW14USB = 'fgw14usb' - GatewayEltakoFAMUSB = 'fam-usb' # ESP2 transceiver: https://www.eltako.com/en/product/professional-standard-en/three-phase-energy-meters-and-one-phase-energy-meters/fam-usb/ - GatewayEnOceanUSB300 = 'enocean-usb300' # not yet supported + EltakoFAM14 = 'fam14' + EltakoFGW14USB = 'fgw14usb' + EltakoFAMUSB = 'fam-usb' # ESP2 transceiver: https://www.eltako.com/en/product/professional-standard-en/three-phase-energy-meters-and-one-phase-energy-meters/fam-usb/ + USB300 = 'enocean-usb300' + ESP3 = 'esp3-gateway' + LAN = 'mgw-lan' @classmethod def find(cls, value): @@ -93,19 +96,36 @@ def find(cls, value): @classmethod def is_transceiver(cls, dev_type) -> bool: - return dev_type in [GatewayDeviceType.GatewayEltakoFAMUSB, GatewayDeviceType.EnOceanUSB300] + return dev_type in [GatewayDeviceType.EltakoFAMUSB, GatewayDeviceType.USB300] @classmethod def is_bus_gateway(cls, dev_type) -> bool: - return dev_type in [GatewayDeviceType.GatewayEltakoFAM14, GatewayDeviceType.GatewayEltakoFGW14USB] + return dev_type in [GatewayDeviceType.EltakoFAM14, GatewayDeviceType.EltakoFGW14USB] @classmethod def is_esp2_gateway(cls, dev_type) -> bool: - return dev_type in [GatewayDeviceType.GatewayEltakoFAM14, GatewayDeviceType.GatewayEltakoFGW14USB, GatewayDeviceType.GatewayEltakoFAMUSB] + return dev_type in [GatewayDeviceType.EltakoFAM14, GatewayDeviceType.EltakoFGW14USB, GatewayDeviceType.EltakoFAMUSB] BAUD_RATE_DEVICE_TYPE_MAPPING: dict = { - GatewayDeviceType.GatewayEltakoFAM14: 57600, - GatewayDeviceType.GatewayEltakoFGW14USB: 57600, - GatewayDeviceType.GatewayEltakoFAMUSB: 9600, - GatewayDeviceType.GatewayEnOceanUSB300: 57600, -} \ No newline at end of file + GatewayDeviceType.EltakoFAM14: 57600, + GatewayDeviceType.EltakoFGW14USB: 57600, + GatewayDeviceType.EltakoFAMUSB: 9600, + GatewayDeviceType.USB300: 57600, + GatewayDeviceType.ESP3: 57600, +} + +GATEWAY_DISPLAY_NAMES = { + GatewayDeviceType.EltakoFAM14: "FAM14 (ESP2)", + GatewayDeviceType.EltakoFGW14USB: 'FGW14-USB (ESP2)', + GatewayDeviceType.EltakoFAMUSB: 'FAM-USB (ESP2)', + GatewayDeviceType.USB300: 'ESP3 Gateway', + GatewayDeviceType.ESP3: 'ESP3 Gateway', + GatewayDeviceType.LAN: 'MGW LAN/Wifi', +} + +def get_display_names(): + result = [] + for v in GATEWAY_DISPLAY_NAMES.values(): + if v not in result: + result.append(v) + return result \ No newline at end of file diff --git a/eo_man/data/data_helper.py b/eo_man/data/data_helper.py index e598d88..798a15f 100644 --- a/eo_man/data/data_helper.py +++ b/eo_man/data/data_helper.py @@ -45,6 +45,15 @@ {'hw-type': 'FSB14', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'PCT14-function-group': 2, 'PCT14-key-function': 31, 'description': 'Eltako cover', 'address_count': 2}, {'hw-type': 'FAE14SSR', CONF_EEP: 'A5-10-06', 'sender_eep': 'A5-10-06', CONF_TYPE: Platform.CLIMATE, 'PCT14-function-group': 3, 'PCT14-key-function': 65, 'description': 'Eltako heating/cooling', 'address_count': 2}, + + {'hw-type': 'FSR61NP', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Eltako relay', 'address_count': 1}, + {'hw-type': 'FSR61/8-24V UC', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Eltako relay', 'address_count': 1}, + {'hw-type': 'FSR61-230V', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Eltako relay', 'address_count': 1}, + {'hw-type': 'FSR61G-230V', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Eltako relay', 'address_count': 1}, + {'hw-type': 'FSR61LN-230V', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'description': 'Eltako relay', 'address_count': 1}, + + {'hw-type': 'FSB61-230V', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1}, + {'hw-type': 'FSB61NP-230V', CONF_EEP: 'G5-3F-7F', 'sender_eep': 'H5-3F-7F', CONF_TYPE: Platform.COVER, 'address_count': 1}, ] ORG_MAPPING = { @@ -96,6 +105,9 @@ def find_device_info_by_device_type(device_type:str) -> dict: return i return None +def get_known_device_types() -> list: + return sorted(list(set([t['hw-type'] for t in EEP_MAPPING]))) + def get_eep_from_key_function_name(kf: KeyFunction) -> str: pos = KeyFunction(kf).name.find('EEP_') if pos > -1: diff --git a/eo_man/data/device.py b/eo_man/data/device.py index 96ec8ad..5941dba 100644 --- a/eo_man/data/device.py +++ b/eo_man/data/device.py @@ -146,6 +146,21 @@ async def async_get_bus_device_by_natvice_bus_object(cls, device: BusObject, fam return bd + + @classmethod + def init_sender_fields(cls, device, overwrite:bool=False): + info:dict = find_device_info_by_device_type(device.device_type) + + if device.additional_fields is None: + device.additional_fields = {} + + if info.get('sender_eep', None): + if overwrite or not ('sender' in device.additional_fields and len(device.additional_fields['sender']) > 0): + device.additional_fields['sender'] = { + CONF_ID: a2s( a2i(device.address) % 128 )[-2:], + CONF_EEP: info.get('sender_eep') + } + @classmethod def set_suggest_ha_config(cls, device): id = int.from_bytes( AddressExpression.parse(device.address)[0], 'big') @@ -157,7 +172,7 @@ def set_suggest_ha_config(cls, device): if info.get('sender_eep', None): device.additional_fields['sender'] = { - CONF_ID: a2s( SENDER_BASE_ID + id ), + CONF_ID: a2s( a2i(device.address) % 128 )[-2:], CONF_EEP: info.get('sender_eep') } diff --git a/eo_man/data/ha_config_generator.py b/eo_man/data/ha_config_generator.py index 202470a..ad88b52 100644 --- a/eo_man/data/ha_config_generator.py +++ b/eo_man/data/ha_config_generator.py @@ -34,13 +34,13 @@ def get_description(self) -> str: def get_gateway_by(self, gw_d:Device) -> GatewayDeviceType: gw_type = None if gw_d.is_fam14(): - gw_type = GatewayDeviceType.GatewayEltakoFAM14.value + gw_type = GatewayDeviceType.EltakoFAM14.value elif gw_d.is_fgw14_usb(): - gw_type = GatewayDeviceType.GatewayEltakoFGW14USB.value + gw_type = GatewayDeviceType.EltakoFGW14USB.value elif gw_d.is_fam_usb(): - gw_type = GatewayDeviceType.GatewayEltakoFAMUSB.value + gw_type = GatewayDeviceType.EltakoFAMUSB.value elif gw_d.is_usb300(): - gw_type = GatewayDeviceType.GatewayEnOceanUSB300.value + gw_type = GatewayDeviceType.USB300.value return gw_type def generate_ha_config(self, device_list:list[Device]) -> str: @@ -63,8 +63,8 @@ def generate_ha_config(self, device_list:list[Device]) -> str: out += f" {CONF_GATEWAY}:\n" out += f" - {CONF_ID}: {global_gw_id}\n" - gw_fam14 = GatewayDeviceType.GatewayEltakoFAM14.value - gw_fgw14usb = GatewayDeviceType.GatewayEltakoFGW14USB.value + gw_fam14 = GatewayDeviceType.EltakoFAM14.value + gw_fgw14usb = GatewayDeviceType.EltakoFGW14USB.value gw_type = self.get_gateway_by(gw_d) out += f" {CONF_DEVICE_TYPE}: {gw_type} # you can simply change {gw_fam14} to {gw_fgw14usb}\n" diff --git a/eo_man/view/device_details.py b/eo_man/view/device_details.py index 9565906..22dec75 100644 --- a/eo_man/view/device_details.py +++ b/eo_man/view/device_details.py @@ -84,11 +84,11 @@ def show_form(self, device:Device): l = Label(f, text="Base Id") l.grid(row=c_row, column=0, sticky=W, padx=3) - self.text_address = ttk.Entry(f) - self.text_address.insert(END, "00-00-00-00") - self.text_address.config(state=DISABLED) - self.text_address.grid(row=c_row, column=1, sticky=W+E) - self._update_text_field(self.text_address, device.base_id) + self.text_base_id = ttk.Entry(f) + self.text_base_id.insert(END, "00-00-00-00") + self.text_base_id.config(state=DISABLED) + self.text_base_id.grid(row=c_row, column=1, sticky=W+E) + self._update_text_field(self.text_base_id, device.base_id) # self.text_address.bind('', lambda e, d=device: self.update_device(d)) # external address @@ -122,7 +122,7 @@ def show_form(self, device:Device): l.grid(row=c_row, column=0, sticky=W, padx=3) self.cb_device_type = ttk.Combobox(f, width="20") - self.cb_device_type['values'] = list(set([t['hw-type'] for t in data_helper.EEP_MAPPING])) + self.cb_device_type['values'] = data_helper.get_known_device_types() self.cb_device_type.grid(row=c_row, column=1, sticky=W+E) self.cb_device_type.set(device.device_type if device.device_type else '') if device.is_gateway(): @@ -261,8 +261,12 @@ def update_device(self, device:Device): device.use_in_ha = self.cb_export_ha_var.get() == 1 device.ha_platform = self.cb_ha_platform.get() + Device.init_sender_fields(device) + self.data_manager.update_device(device) + self.selected_device_handler(device, force_update=True) + def add_additional_fields(self, device:Device, add_fields:dict, f:Frame, parent_key:str='', _row:int=0, spaces:int=0): for key, value in add_fields.items(): @@ -274,8 +278,19 @@ def set_additional_field_value(af, k, t): af[k]=t.get() if key == 'id' and parent_key == 'sender': - l = Label(f, text="BaseId + "+value.split('-')[-1]) - l.grid(row=_row, column=1, sticky=W) + cb_s = ttk.Combobox(f, state="readonly", width="3") + cb_s['values'] = [data_helper.a2s(i,1) for i in range(0,256)] + cb_s.bind('', self.on_focus_combobox) + cb_s.bind('', self.select_by_entered_keys) + cb_s.bind('', lambda e, af=add_fields, k=key, t=cb_s, d=device: [set_additional_field_value(af,k,t), self.update_device(d)]) + cb_s.set(str(value)) + cb_s.grid(row=_row, column=1, sticky=W) + # entry = Entry(f) + # entry.insert(END, str(value) ) + # entry.bind("", lambda e, af=add_fields, k=key, t=entry: set_additional_field_value(af,k,t))# set_additional_field_value(e,af,k,t)) + # entry.bind('', lambda e, af=add_fields, k=key, t=entry, d=device: [set_additional_field_value(af,k,t), self.update_device(d)]) + # if device.address.startswith('00-00-00-'): entry.config(state="readonly") + # entry.grid(row=_row, column=1, sticky=W) elif 'eep' in key: cb = ttk.Combobox(f, width="20") cb['values'] = data_helper.get_all_eep_names() @@ -300,9 +315,38 @@ def set_additional_field_value(af, k, t): return _row + def on_focus_combobox(self, event=None): + self.entered_keys = '' + + def select_by_entered_keys(self, event=None): + + if event.char.upper() not in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']: + return + + if event is not None: + if len(self.entered_keys) < 2: + self.entered_keys += event.char.upper() + else: + self.entered_keys = event.char.upper() + + cb:ttk.Combobox = self.popup.focus_get() + if len(self.entered_keys) == 2: + cb.set(self.entered_keys) + elif len(self.entered_keys) == 1: + for v in cb['values']: + if v[0] == self.entered_keys: + cb.set(v) + break + + self.show_message() + def clean_and_disable(self, frame:Frame) -> None: for widget in frame.winfo_children(): - widget.destroy() + if isinstance(widget, Frame): + self.clean_and_disable(widget) + widget.destroy() + else: + widget.destroy() def _update_text_field(self, text_field:Entry, value:str, state:str=DISABLED): try: diff --git a/eo_man/view/filter_bar.py b/eo_man/view/filter_bar.py index 363abda..704dc9f 100644 --- a/eo_man/view/filter_bar.py +++ b/eo_man/view/filter_bar.py @@ -77,7 +77,7 @@ def __init__(self, main: Tk, app_bus:AppBus, data_manager:DataManager, row:int): l = Label(f, text="Device Type:") l.grid(row=0, column=col, padx=(0,3), sticky=W) - values = sorted(set([info['hw-type'] for info in data_helper.EEP_MAPPING])) + values = data_helper.get_known_device_types() self.cb_device_type = ChecklistCombobox(f, values=values, width="14") self.cb_device_type.grid(row=1, column=col, padx=(0,3) ) self.cb_device_type.bind('', self.apply_filter) diff --git a/eo_man/view/serial_communication_bar.py b/eo_man/view/serial_communication_bar.py index cc86b5d..64b2a4e 100644 --- a/eo_man/view/serial_communication_bar.py +++ b/eo_man/view/serial_communication_bar.py @@ -15,6 +15,8 @@ from eltakobus.eep import * from eltakobus.util import * +from ..data.const import get_display_names + class SerialConnectionBar(): def __init__(self, main: Tk, app_bus:AppBus, data_manager:DataManager, serial_controller:SerialController, row:int): @@ -36,7 +38,7 @@ def __init__(self, main: Tk, app_bus:AppBus, data_manager:DataManager, serial_co self.cb_device_type = ttk.Combobox(f, state="readonly", width="12") self.cb_device_type.pack(side=tk.LEFT, padx=(0, 5), pady=5) - self.cb_device_type['values'] = ['FAM14', 'FGW14-USB', 'FAM-USB', 'USB300'] + self.cb_device_type['values'] = get_display_names() # ['FAM14', 'FGW14-USB', 'FAM-USB', 'USB300', 'LAN Gateway'] self.cb_device_type.set(self.cb_device_type['values'][0]) self.cb_device_type.bind('<>', self.on_device_type_changed) diff --git a/requirements.txt b/requirements.txt index 4249f7d..3310bce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,5 @@ termcolor==2.4.0 tkinterhtml==0.7 requests==2.31.0 enocean==0.60.1 -esp2_gateway_adapter>=0.1 \ No newline at end of file +esp2_gateway_adapter>=0.2.1 +zeroconf==0.132.2 \ No newline at end of file diff --git a/setup.py b/setup.py index 0d9b7f6..aab1fe8 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,9 @@ license = f.read() required = ['eltako14bus==0.0.53', 'requests==2.31.0', 'enocean==0.60.1', 'pyserial', 'pyserial-asyncio', 'aiocoap', - 'esp2_gateway_adapter==0.1', + 'esp2_gateway_adapter==0.2.1', # 'homeassistant', + 'zeroconf==0.132.2', 'pyyaml', 'termcolor', 'strenum', 'pillow', 'numpy', # 'tzlocal', @@ -26,7 +27,7 @@ setup( name='eo_man', - version='0.1.21', + version='0.1.22', package_dir={'eo_man':"eo_man"}, # packages=find_packages("./eo-man"), #package_data={'': ['*.png']},