Skip to content

Commit

Permalink
Fix cluster 0x0101 binding
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Jun 10, 2020
1 parent cff52d3 commit e247790
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions zigate/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2579,13 +2579,13 @@ def _bind_report(self, enpoint_id=None):
for endpoint_id, endpoint in endpoints_list:
# if endpoint['device'] in ACTUATORS: # light
LOGGER.debug('Bind and report endpoint %s for device %s', endpoint_id, self)
# if 0x0001 in endpoint['in_clusters']:
# LOGGER.debug('bind and report for cluster 0x0001')
# self._zigate.bind_addr(self.addr, endpoint_id, 0x0001)
# self._zigate.reporting_request(self.addr, endpoint_id,
# 0x0001, (0x0020, 0x20))
# self._zigate.reporting_request(self.addr, endpoint_id,
# 0x0001, (0x0021, 0x20))
if 0x0001 in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x0001')
self._zigate.bind_addr(self.addr, endpoint_id, 0x0001)
self._zigate.reporting_request(self.addr, endpoint_id,
0x0001, (0x0020, 0x20))
self._zigate.reporting_request(self.addr, endpoint_id,
0x0001, (0x0021, 0x20))
if 0x0006 in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x0006')
self._zigate.bind_addr(self.addr, endpoint_id, 0x0006)
Expand All @@ -2596,20 +2596,19 @@ def _bind_report(self, enpoint_id=None):
self._zigate.bind_addr(self.addr, endpoint_id, 0x0008)
self._zigate.reporting_request(self.addr, endpoint_id,
0x0008, (0x0000, 0x20))
if 0x0009 in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x0009')
self._zigate.bind_addr(self.addr, endpoint_id, 0x0009)
if 0x000f in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x000f')
self._zigate.bind_addr(self.addr, endpoint_id, 0x000f)
self._zigate.reporting_request(self.addr, endpoint_id,
0x000f, (0x0055, 0x10))
if 0x0101 in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x0101')
self._zigate.bind_addr(self.addr, endpoint_id, 0x0009)
self._zigate.bind_addr(self.addr, endpoint_id, 0x0001)
self._zigate.bind_addr(self.addr, endpoint_id, 0x0101)
self._zigate.reporting_request(self.addr, endpoint_id,
0x0001, (0x0021, 0x20))
self._zigate.reporting_request(self.addr, endpoint_id,
0x0101, (0x0000, 0x30), 0, 0, 1, 20)
0x0101, (0x0000, 0x30))
if 0x0102 in endpoint['in_clusters']:
LOGGER.debug('bind and report for cluster 0x0102')
self._zigate.bind_addr(self.addr, endpoint_id, 0x0102)
Expand Down

0 comments on commit e247790

Please sign in to comment.