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

Prepare to move specific ZDO requests out of Adapter #1187

Merged
merged 32 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c0ec83c
Prepare to move specific ZDO requests out of Adapter
Nerivec Sep 14, 2024
80521fe
Fix prettier.
Nerivec Sep 15, 2024
7f8b47c
Fix zstack tests.
Nerivec Sep 15, 2024
2ec6c6d
Fix ember tests.
Nerivec Sep 15, 2024
d9bceb9
More coverage.
Nerivec Sep 15, 2024
05e6fd8
Fix prettier.
Nerivec Sep 15, 2024
6380fbb
Add tests for zstack ZDO request payload alteration logic.
Nerivec Sep 15, 2024
cd3f1a7
Cleanup zstack ZDO response handling & more robust tests.
Nerivec Sep 15, 2024
c517e12
Extra zstack edge-case coverage.
Nerivec Sep 15, 2024
1c1e4ee
Update zstack to use `sendZdo`.
Nerivec Sep 16, 2024
46706e9
zstack: Match AREQ/SREQ logic, cleanup and optimize. More coverage.
Nerivec Sep 17, 2024
f7d9b0b
Better condition for IEEE vs nwk matching (avoid possible edge-cases).
Nerivec Sep 17, 2024
cd4153d
deconz
Nerivec Sep 17, 2024
2cd42bf
ezsp
Nerivec Sep 17, 2024
5ad8540
Fix prettier.
Nerivec Sep 17, 2024
4fb5471
ezsp: fix not compatible with 8.x.x.
Nerivec Sep 18, 2024
3501f77
zboss
Nerivec Sep 18, 2024
ddafff5
zboss: fix.
Nerivec Sep 18, 2024
d3b418c
deconz: fix `deviceJoined` event
Nerivec Sep 18, 2024
75567f4
zigate
Nerivec Sep 18, 2024
8dbf0a1
zigate: better zdo buffalo patch
Nerivec Sep 19, 2024
8c68efb
zboss: fix ignore response status in driver (handled upstream)
Nerivec Sep 19, 2024
59b7c92
zboss: fix non-standard ZDO response payloads
Nerivec Sep 19, 2024
49ab0cc
zboss: fix leftover
Nerivec Sep 19, 2024
824a801
zboss: fix permit join.
Nerivec Sep 19, 2024
f5bc52b
zboss: fix INDICATION payload
Nerivec Sep 19, 2024
0f8b103
zboss: fix ZDO_DEV_UPDATE_IND.
Nerivec Sep 20, 2024
1b25fdb
zstack: remove `networkAddress` event in favor of `zdoResponse`.
Nerivec Sep 20, 2024
97a278a
zboss: revert unsupported join changes.
Nerivec Sep 20, 2024
fad2751
Fix prettier.
Nerivec Sep 20, 2024
9bfbc6f
Feedback.
Nerivec Sep 21, 2024
0fe3a16
ZStack: only discover route when node descriptor request fails
Koenkk Sep 21, 2024
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
25 changes: 25 additions & 0 deletions src/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import * as Models from '../models';
import {logger} from '../utils/logger';
import {BroadcastAddress} from '../zspec/enums';
import * as Zcl from '../zspec/zcl';
import * as Zdo from '../zspec/zdo';
import * as ZdoTypes from '../zspec/zdo/definition/tstypes';
import * as AdapterEvents from './events';
import * as TsType from './tstype';

Expand All @@ -14,6 +16,7 @@ const NS = 'zh:adapter';
interface AdapterEventMap {
deviceJoined: [payload: AdapterEvents.DeviceJoinedPayload];
zclPayload: [payload: AdapterEvents.ZclPayload];
zdoResponse: [clusterId: Zdo.ClusterId, response: ZdoTypes.GenericZdoResponse];
disconnected: [];
deviceAnnounce: [payload: AdapterEvents.DeviceAnnouncePayload];
deviceLeave: [payload: AdapterEvents.DeviceLeavePayload];
Expand Down Expand Up @@ -219,6 +222,28 @@ abstract class Adapter extends events.EventEmitter<AdapterEventMap> {
* ZDO
*/

public abstract sendZdo(
ieeeAddress: string,
networkAddress: number,
clusterId: Zdo.ClusterId,
payload: Buffer,
disableResponse: true,
): Promise<void>;
public abstract sendZdo<K extends keyof ZdoTypes.RequestToResponseMap>(
ieeeAddress: string,
networkAddress: number,
clusterId: K,
payload: Buffer,
disableResponse: false,
): Promise<ZdoTypes.RequestToResponseMap[K]>;
public abstract sendZdo<K extends keyof ZdoTypes.RequestToResponseMap>(
ieeeAddress: string,
networkAddress: number,
clusterId: K,
payload: Buffer,
disableResponse: boolean,
): Promise<ZdoTypes.RequestToResponseMap[K] | void>;

public abstract permitJoin(seconds: number, networkAddress?: number): Promise<void>;

public abstract lqi(networkAddress: number): Promise<TsType.LQI>;
Expand Down
Loading