Skip to content

Inclusion Mode timeout #2017

@apella12

Description

@apella12

While testing the Controller Thing actions PR #2015 I noticed that the Config parameter Inclusion mode timeout is not used and probably hasn't been for some time. Options include, do nothing, eliminate the config related code, or bring the config into the ZWaveInclusionController. My 2 cents would be to eliminate the parameter but reduce to 60 seconds. Most times I find I manually stop the scan after the device is discovered.

There is a separate timer if the controller reports a failure (inclusion or exclusion) or if an included node is found but will run the full 90 seconds otherwise. At least it looks that way to me.

Image

private final int TIMER_MAIN = 90000;

    public void startInclusion(boolean highPower, boolean networkWide) {
        if (inclusionState != ZWaveInclusionState.Unknown) {
            logger.debug("ZWave controller unable to start inclusion - state is {}", inclusionState);
            return;
        }
        inclusionState = ZWaveInclusionState.IncludeSent;
        controller.addEventListener(this);
        logger.debug("ZWave controller start inclusion");
        startTimer(TIMER_MAIN);
        controller.enqueue(new AddNodeMessageClass().doRequestStart(highPower, networkWide));
    }

    /**
     * Starts a network exclusion process
     */
    public void startExclusion() {
        if (inclusionState != ZWaveInclusionState.Unknown) {
            logger.debug("ZWave controller unable to start exclusion - state is {}", inclusionState);
            return;
        }
        inclusionState = ZWaveInclusionState.ExcludeSent;
        controller.addEventListener(this);
        logger.debug("ZWave controller start exclusion");
        startTimer(TIMER_MAIN);
        controller.enqueue(new RemoveNodeMessageClass().doRequestStart());
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions