Skip to content

Commit

Permalink
Merge pull request #36 from grimmpp/feature-branch
Browse files Browse the repository at this point in the history
Added FGD14 and FD2G14 Support
  • Loading branch information
grimmpp authored Aug 7, 2024
2 parents f481f66 + 883ec38 commit b14b041
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
7 changes: 7 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## v0.1.29 Added FGD14 and FD2G14 Support
* Added FGD14 and FD2G14 Support
* Fixed missing dependency for FSR14M-2x support.
* Fixed configuration generation and sender id validation.

## v0.1.28 added EEP F6-01-01

## v0.1.27 Added Support for FSR14M-2x
* Added support for FSR14M-2x. Switch/light and power meter are represented as separate entities.
* Fixed sender ids for bus gateways
Expand Down
3 changes: 2 additions & 1 deletion eo_man/data/data_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
{'hw-type': 'FUD14', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 3, 'PCT14-key-function': 32, 'description': 'Central command - gateway', 'address_count': 1},
{'hw-type': 'FUD14_800W', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 3, 'PCT14-key-function': 32, 'description': 'Central command - gateway', 'address_count': 1},

{'hw-type': 'FDG14', CONF_EEP: 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'PCT14-key-function': 32, 'description': 'Central command - gateway', 'address_count': 16},
{'hw-type': 'FDG14', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'PCT14-key-function': 32, 'description': 'Central command - gateway', 'address_count': 16},
{'hw-type': 'FD2G14', CONF_EEP: 'A5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'PCT14-key-function': 32, 'description': 'Central command - gateway', 'address_count': 16},

{'hw-type': 'FMZ14', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 1, 'description': 'Eltako relay', 'address_count': 1},
{'hw-type': 'FSR14', CONF_EEP: 'M5-38-08', 'sender_eep': 'A5-38-08', CONF_TYPE: Platform.LIGHT, 'PCT14-function-group': 2, 'PCT14-key-function': 51, 'description': 'Eltako relay', 'address_count': 1},
Expand Down
6 changes: 3 additions & 3 deletions eo_man/data/ha_config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_gateway_by(self, gw_d:Device) -> GatewayDeviceType:
return None

def perform_tests(self):
device_list = self.data_manager.devices.values()
device_list = [d for d in self.data_manager.devices.values() if d.use_in_ha]

self.test_unique_sender_ids(device_list)

Expand All @@ -50,10 +50,10 @@ def test_unique_sender_ids(self, device_list:list[Device]):
for d in device_list:
if 'sender' in d.additional_fields and 'id' in d.additional_fields['sender']:
sender_id = d.additional_fields['sender']['id']
if not sender_id.isnumeric() or int(sender_id) < 1 or int(sender_id) > 127:
if int(sender_id, 16) < 1 or int(sender_id, 16) > 127:
raise Exception(f"sender id '{sender_id}' of device '{d.external_id}' is no valid number between 1 and 127.")
if sender_id in sender_ids:
raise Exception(f"sender id '{sender_id}' is assinged more than once for at least device '{sender_ids[sender_id].external_id}' and '{d.external_id}'.")
raise Exception(f"sender id '{sender_id}' is assigned more than once for at least device '{sender_ids[sender_id].external_id}' and '{d.external_id}'.")

sender_ids[sender_id] = d

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aiocoap==0.4.7
eltako14bus==0.0.56
eltako14bus==0.0.62
numpy==1.26.3
pillow==10.2.0
pyserial==3.5
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
with open('LICENSE', encoding="utf-8") as f:
license = f.read()

required = ['eltako14bus==0.0.56', 'requests==2.31.0', 'enocean==0.60.1', 'pyserial', 'pyserial-asyncio', 'aiocoap',
required = ['eltako14bus==0.0.62', 'requests==2.31.0', 'enocean==0.60.1', 'pyserial', 'pyserial-asyncio', 'aiocoap',
'esp2_gateway_adapter==0.2.9',
# 'homeassistant',
'zeroconf==0.132.2',
Expand All @@ -27,7 +27,7 @@

setup(
name='eo_man',
version='0.1.27',
version='0.1.29',
package_dir={'eo_man':"eo_man"},
# packages=find_packages("./eo-man"),
#package_data={'': ['*.png']},
Expand Down

0 comments on commit b14b041

Please sign in to comment.