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

[freeboxos] Add FTTH and xDSL line status #17219

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

clinique
Copy link
Contributor

@clinique clinique commented Aug 8, 2024

Resolves #17073

I've tested the FTTH side and starting the coding of xDSL part.

@clinique clinique changed the title [freeboxos] Adding FTTH line status [freeboxos] Adding FTTH and xDSL line status Aug 8, 2024
@clinique clinique requested a review from lolodomo August 8, 2024 14:08
@clinique clinique self-assigned this Aug 8, 2024
@clinique clinique added the enhancement An enhancement or new feature for an existing add-on label Aug 8, 2024
@lolodomo lolodomo added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Aug 8, 2024
@lolodomo
Copy link
Contributor

One improvement to do: we should avoid calling an API if we know that this call is only to set channels and none of these channels are linked. You could start by doing it for getFtthStatus.

PS: it should be checked and if necessary fixed in all the binding. Of course not in that PR.

@lolodomo
Copy link
Contributor

@clinique : please rebase and solves the conflicts.

Signed-off-by: Gaël L'hopital <[email protected]>
Adding FTTH line status, initiating the addition of xDSL line status

Signed-off-by: Gaël L'hopital <[email protected]>
@clinique
Copy link
Contributor Author

@clinique : please rebase and solves the conflicts.

I'm on it

Comment on lines 185 to 195
if (anyChannelLinked(GROUP_FTTH,
Set.of(SFP_PRESENT, SFP_ALIM, SFP_POWER, SFP_SIGNAL, SFP_LINK, SFP_PWR_TX, SFP_PWR_RX))) {
FtthStatus ftthStatus = getManager(ConnectionManager.class).getFtthStatus();
updateChannelOnOff(GROUP_FTTH, SFP_PRESENT, ftthStatus.sfpPresent());
updateChannelOnOff(GROUP_FTTH, SFP_ALIM, ftthStatus.sfpAlimOk());
updateChannelOnOff(GROUP_FTTH, SFP_POWER, ftthStatus.sfpHasPowerReport());
updateChannelOnOff(GROUP_FTTH, SFP_SIGNAL, ftthStatus.sfpHasSignal());
updateChannelOnOff(GROUP_FTTH, SFP_LINK, ftthStatus.link());
updateChannelQuantity(GROUP_FTTH, SFP_PWR_TX, ftthStatus.getTransmitDBM(), Units.DECIBEL_MILLIWATTS);
updateChannelQuantity(GROUP_FTTH, SFP_PWR_RX, ftthStatus.getReceivedDBM(), Units.DECIBEL_MILLIWATTS);
}
Copy link
Contributor

@lolodomo lolodomo Aug 13, 2024

Choose a reason for hiding this comment

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

Move this block outside the parent block, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jlaur jlaur changed the title [freeboxos] Adding FTTH and xDSL line status [freeboxos] Add FTTH and xDSL line status Aug 13, 2024
Signed-off-by: Gaël L'hopital <[email protected]>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@lolodomo lolodomo merged commit 8f595b6 into openhab:main Aug 14, 2024
5 checks passed
@lolodomo lolodomo added this to the 4.3 milestone Aug 14, 2024
@clinique clinique deleted the freeboxos_17073 branch August 14, 2024 07:34
lolodomo added a commit to lolodomo/openhab-addons that referenced this pull request Aug 15, 2024
jlaur pushed a commit that referenced this pull request Aug 15, 2024
Follow-up #17219
Fixes #17073

* Category added
* Change ffth and xdsl group labels

Signed-off-by: Laurent Garnier <[email protected]>
digitaldan pushed a commit to digitaldan/openhab-addons that referenced this pull request Aug 29, 2024
* Adding FTTH line status, initiating the addition of xDSL line status

Signed-off-by: Gaël L'hopital <[email protected]>
digitaldan pushed a commit to digitaldan/openhab-addons that referenced this pull request Aug 29, 2024
Follow-up openhab#17219
Fixes openhab#17073

* Category added
* Change ffth and xdsl group labels

Signed-off-by: Laurent Garnier <[email protected]>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
* Adding FTTH line status, initiating the addition of xDSL line status

Signed-off-by: Gaël L'hopital <[email protected]>
Signed-off-by: Patrik Gfeller <[email protected]>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
Follow-up openhab#17219
Fixes openhab#17073

* Category added
* Change ffth and xdsl group labels

Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: Patrik Gfeller <[email protected]>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
* Adding FTTH line status, initiating the addition of xDSL line status

Signed-off-by: Gaël L'hopital <[email protected]>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
Follow-up openhab#17219
Fixes openhab#17073

* Category added
* Change ffth and xdsl group labels

Signed-off-by: Laurent Garnier <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
* Adding FTTH line status, initiating the addition of xDSL line status

Signed-off-by: Gaël L'hopital <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
Follow-up openhab#17219
Fixes openhab#17073

* Category added
* Change ffth and xdsl group labels

Signed-off-by: Laurent Garnier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[freeboxos] Channel xdsl-status not found on revolution thing
2 participants