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

Improve handling of greenpower devices on larger networks #488

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

pklokke
Copy link
Contributor

@pklokke pklokke commented Jan 5, 2022

  • Allow forwarding of unicast encapsulated GPDF if permitjoin is used on single
    router/proxy
  • This allows GPDs to not spam broadcast traffic in larger networks, which
    can bog down certain lighting scenarios
  • Permit join using all routers retains existing behaviour
  • Remove GPD proxy entries from routers when removed
  • Extended frames, and added mechanism for optional attributes

// Process gpDevice as actual device in event of encapsulated notification via unicast
if (gpDevice) {
gpDevice.updateLastSeen();
gpDevice.implicitCheckin();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have to call implicit checking for gp devices, this is only relevant for devices where commands can be send to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove this, no problem.

@Koenkk
Copy link
Owner

Koenkk commented Jan 5, 2022

CI is failing because of the test coverage.

You can check it locally by running npm run test-with-coverage, coverage report can be found in coverage/lcov-report/index.html. Some existing green power tests:

it('Green power', async () => {

@pklokke
Copy link
Contributor Author

pklokke commented Jan 16, 2022

Still chipping away at this, but a little time-poor right now, I'll let know once I've completed the new test cases

@pklokke pklokke force-pushed the greenpower_unicast branch 2 times, most recently from 0b4d025 to bfa3a7d Compare January 21, 2022 13:47
- Allow forwarding of unicast encapsulated GPDF if permitjoin is used on single
router/proxy
- This allows GPDs to not spam broadcast traffic in larger networks, which
can bog down certain lighting scenarios
- Permit join using all routers retains existing behaviour
- Remove GPD proxy entries from routers when removed
- Extended frames, and added mechanism for optional attributes via 'BitMaskSet' and 'BitFieldEnum'
@pklokke
Copy link
Contributor Author

pklokke commented Jan 21, 2022

Took a bit longer than expected, needed to refactor some of the optional attribute things, and had to develop the test cases more. Now it works in theory and in practice I believe.

Whenever you're ready @Koenkk , I'd appreciate a review. :-)

@Koenkk
Copy link
Owner

Koenkk commented Jan 21, 2022

Looks good, big thanks!

@Koenkk Koenkk merged commit 92f77cc into Koenkk:master Jan 21, 2022
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