Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the new zigpy radio API #117

Merged
merged 18 commits into from
Jun 26, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Set the network information source and metadata
  • Loading branch information
puddly committed May 14, 2022
commit 542e08e27b4ba04cc0a42f87fe9a486e35c55b15
7 changes: 7 additions & 0 deletions zigpy_zigate/zigbee/application.py
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
import zigpy.zdo
import zigpy.exceptions

import zigpy_zigate
from zigpy_zigate import types as t
from zigpy_zigate import common as c
from zigpy_zigate.api import NoResponseError, ZiGate, CommandId, ResponseId, PDM_EVENT
@@ -75,6 +76,7 @@ async def load_network_info(self, *, load_devices: bool = False):
epid, _ = zigpy.types.ExtendedPanId.deserialize(zigpy.types.uint64_t(network_state[3]).serialize())

self.state.network_info = zigpy.state.NetworkInfo(
source=f"zigpy-zigate@{zigpy_zigate.__version__}",
extended_pan_id=epid,
pan_id=zigpy.types.PanId(network_state[2]),
nwk_update_id=0,
@@ -89,6 +91,11 @@ async def load_network_info(self, *, load_devices: bool = False):
key_table=[],
nwk_addresses={},
stack_specific={},
metadata={
"zigate": {
"version": self.version,
}
}
)

self.state.network_info.tc_link_key.partner_ieee = self.state.node_info.ieee