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

fix: Improve permit join #24257

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Conversation

Nerivec
Copy link
Collaborator

@Nerivec Nerivec commented Oct 7, 2024

TODO:

@Koenkk
Copy link
Owner

Koenkk commented Oct 11, 2024

Merged feat/2.0.0 into this and update homeassistant.ts

@Nerivec
Copy link
Collaborator Author

Nerivec commented Oct 11, 2024

Will have to link the various branches in package.json (or ci?) for all repos to sync up (at least for tests).

@Koenkk
Copy link
Owner

Koenkk commented Oct 11, 2024

I think it would be the best to publish pre-release packages of the deps. Npm supports installing from Git but it won't contain the compiled TS code. Shall I publish a pre-release version for zh?

@Nerivec
Copy link
Collaborator Author

Nerivec commented Oct 12, 2024

Do we want to implement the remaining TODO in Koenkk/zigbee-herdsman#1214 ? It would be the only change left in ZH I think (need zh+frontend+z2m change).
I was thinking something along these lines:

interface PermitJoinChangedPayload {
    time: number; // [0-254]
    device?: Device; // not used at this time but aligns the API
}

And this gets emitted only on open and close, frontend does the ticking logic. permitJoinTimeoutTimer becomes a setTimeout instead of setInterval.
It removes ~time * 1 mqtt publish of /bridge/info...


For the packages, for CI, I guess you could check out the various branches, compile them, and use these local folders instead of npm. But might be easier to publish pre-releases.

@Koenkk
Copy link
Owner

Koenkk commented Oct 12, 2024

I'm not sure if we should solve that one, it will also break the HA permit join timeout (

object_id: 'permit_join_timeout',
). 1 message every sec shouldn't be heavy and permit join is off most of the time anyway.

@Nerivec Nerivec force-pushed the 2.0.0-improve-permit-join branch from e0a033a to a919238 Compare October 14, 2024 20:58
@Nerivec Nerivec marked this pull request as ready for review October 15, 2024 11:01
test/homeassistant.test.js Outdated Show resolved Hide resolved
@Koenkk Koenkk merged commit 1b9e444 into Koenkk:feat/2.0.0 Oct 15, 2024
11 checks passed
@Nerivec Nerivec deleted the 2.0.0-improve-permit-join branch October 15, 2024 19:40
Koenkk added a commit that referenced this pull request Dec 1, 2024
* fix: Improve permit join

* Update Home Assistant permit join switch

* Remove `permit_join` from `settings.schema.json`

* Update zigbee-herdsman version to pre-release.

* Fix pnpm overrides

* Update test/homeassistant.test.js

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
rostwald added a commit to rostwald/zigbee2mqtt that referenced this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants