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

[DimmerLight] LIGHT VAR io doesn't switch off #528

Open
Dakitoo opened this issue Jul 16, 2024 · 8 comments
Open

[DimmerLight] LIGHT VAR io doesn't switch off #528

Dakitoo opened this issue Jul 16, 2024 · 8 comments

Comments

@Dakitoo
Copy link

Dakitoo commented Jul 16, 2024

Gateway: 7967
Device: Light > DimmerLight

States

LIGHT VAR io

Can be turned on and is set to 100%. If you then want to turn it off, it stays at 100% and the light stays on, even though it is displayed as off. Can this error be fixed?
Bildschirmfoto 2024-07-16 um 13 21 48

@djangopap
Copy link

SAme problem.

Can be turned on. but to turn it off, it is necessary to put manually 100% to 0% in the menu off the light.
same in HomeKit than in homebridge

@AlexFabre
Copy link

Hi all,

Dimmer light can be controlled with intensity but not with ON/OFF.
Only the setIntensity[value] actually appears in the logs.

Capture d’écran 2024-08-02 à 10 17 02

Nor ON nor OFF actually triggers any command.

My configuration:

flowchart LR
    D(Schneider wiser dimmer switch)
    T(Tahoma switch)
    H(Homebridge)
    D <-.zigbee.-> T
    T <-.wifi.-> H
Loading

@AlexFabre
Copy link

AlexFabre commented Aug 2, 2024

Hi @lukyer, digging into Light.ts I found you add this early return that looks related to our problem. Do you think there is something going on here ?

    protected async setOn(value) {
        if (this.brightness !== undefined) { // when light has brightness control, we do not set on to avoid glitches with gradual lightning up
            return
        }
        const action = await this.executeCommands(this.getOnOffCommands(value));
        action.on('update', (state, data) => {
            switch (state) {
                case ExecutionState.COMPLETED:
                    break;
                case ExecutionState.FAILED:
                    break;
            }
        });
    }

@AlexFabre
Copy link

AlexFabre commented Aug 2, 2024

@dubocr the problem indeed comes from this WIP PR.

Rolling back to v2.2.54 fixes the issue.

Capture d’écran 2024-08-02 à 11 03 40

I suggest we revert this commit to let @lukyer work on a more robust solution to the glitching problem.

dubocr added a commit that referenced this issue Sep 8, 2024
@dubocr
Copy link
Owner

dubocr commented Sep 8, 2024

Hi everyone,

Sorry I was really busy and didn't have equipments anymore to test my changes. However, I made some changes based on your comments. Hope it will fix for you.

Let me know if it seems OK.

@Br00ster
Copy link

Br00ster commented Sep 9, 2024

Just updated to the latest version and I can now turn off my lights. Fix looks like to have a good effect.

@AlexFabre
Copy link

Hi @dubocr

I just tested out release 2.2.57 this morning and I agree it fixes the switch off command, nevertheless the switch on still remains unusable...

The early return still forbid to turn on a dimmed light:

protected async setOn(value) {
         if (value && this.brightness !== undefined) {
             // when light has brightness control, we do not set on to avoid glitches with gradual lightning up
             return;
         }

Can you explain a bit more this problem:

avoid glitches with gradual lightning up

Awaiting a better fix, rolling back to v2.2.54 makes dimmed lights works with ON/OFF/VAR commands.

@dubocr
Copy link
Owner

dubocr commented Sep 14, 2024

Hi,

I don't know what is the glitch problem and as I can't test anything I have to choose between the options from user. As it seems the 'glitch' fix is more problematic than anything else I'll drop it.

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

No branches or pull requests

5 participants