Skip to content

C++ Add support for set Level for Legrand covering#7410

Merged
manup merged 1 commit intodresden-elektronik:masterfrom
Smanar:legrand_41
Dec 14, 2023
Merged

C++ Add support for set Level for Legrand covering#7410
manup merged 1 commit intodresden-elektronik:masterfrom
Smanar:legrand_41

Conversation

@Smanar
Copy link
Collaborator

@Smanar Smanar commented Dec 1, 2023

Ok, it's a long story, first Legrand firmware don't support set level request, and it need to be blocked.
Medium version don't support it too and are reversed.
New firmware now support it, so the hack can be removed, but somes users still using old firmware.

And as it's covering, not possible to do with DDF

Old firmware have as SwBuild 0xXX and new one 0xXXXXXXXX so the fonction .toUInt() just fail on the check.

See #7390

Here the full code

        else if (taskRef.lightNode->modelId() == QLatin1String("Shutter switch with neutral") ||
                 taskRef.lightNode->modelId() == QLatin1String("Shutter SW with level control"))
        {
            // Legrand invert bri and don't support other value than 0
            bool bStatus = false;
            uint nHex = taskRef.lightNode->swBuildId().toUInt(&bStatus, 16);
            if (bStatus && nHex < 28)
            {
                targetLiftZigBee = targetLift == 0 ? 100 : 0;
            }
            else if (bStatus && nHex < 44)
            {
                targetLiftZigBee = targetLift == 100 ? 100 : 0;
            }
            else
            {
                // New devices no need thoses previous hack
                targetLiftZigBee = targetLift;
            }
        }

@manup manup added this to the v2.25.0-beta milestone Dec 14, 2023
@manup manup merged commit 97acf27 into dresden-elektronik:master Dec 14, 2023
@Smanar Smanar deleted the legrand_41 branch April 30, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct support for Bticino K4027C rolling shutter switch (% not working outside Deconz Gui)

2 participants