Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions zigpy_deconz/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'permit_join': (0x21, t.uint8_t),
'protocol_version': (0x22, t.uint16_t),
'nwk_update_id': (0x24, t.uint8_t),
'watchdog_ttl': (0x26, t.uint32_t),
}

NETWORK_PARAMETER_BY_ID = {v[0]: (k, v[1]) for k, v in NETWORK_PARAMETER.items()}
Expand Down
7 changes: 7 additions & 0 deletions zigpy_deconz/zigbee/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ def __init__(self, api, database_file=None):
self._nwk = 0
self.discovering = False

asyncio.ensure_future(self._reset_watchdog())

async def _reset_watchdog(self):
while True:
await self._api.write_parameter(NETWORK_PARAMETER['watchdog_ttl'][0], 3600)
await asyncio.sleep(1200)

async def startup(self, auto_form=False):
"""Perform a complete application startup"""
await self._api.device_state()
Expand Down