-
Notifications
You must be signed in to change notification settings - Fork 4k
Fixed fls-m from dresden-elektronik #11078
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use
zigbee-herdsman-converters/src/converters/toZigbee.ts
Line 63 in fffab6a
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when using tz.light_color the device did not change color. I had to build this custom solution for the device to accept color changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because it doesn't support x/y, can you try with just h/s:
m.light({endpointNames: ["l1", "l2", "l3", "l4", "l5"], color: {modes: ["hs"]}})There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The challenge with this product is that the endpoints are dynamic. The device has DIP switches that configure which endpoint is exposed. As far as I understand, the extend field and the m.light function are static, so I had to work around this using the exposes and configure fields. In the end, this worked perfectly and corrected the previous “simple” implementation, which was incomplete (it only exposed five static lights, but the actual behavior depends on the DIP switch configuration).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there is a different way to implement this? I am new to zigbee2MQTT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can identify using fingerprint (so a different definition is used for every mode): example:
zigbee-herdsman-converters/src/devices/gledopto.ts
Line 416 in 056279c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi everybody, the main challange are the configurations which can be made in the web based FLS-M Config Builder. This tool generates a JSON which is uploaded to the device.
From my understanding the finger prints would only work for a static set of configurations like in the Gledopto case? The FLS-M also has fixed configurations which can be set by the dip switches, but isn't limited to these:
We'd need finger prints for completely arbitrary configurations created with above tool.
This is why the PR uses the actual simple descriptors to create the exposed representation in z2m. (I think the color capabilities should also be considered to differentiate between color/color temperatur lights).
So the question is what is the best way to support arbitrary light endpoints when we don't know the finger print a priori?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that can be done through the dynamic
expose(which is already in this PR). Can you provide the debug log when changing the color when usinglight_colorinstead offlsm_color_hs? I'm curious why it doesn't work.See this on how to enable debug logging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why the custom converter was used is that the FLS-M advertises support for enhanced hue, but does not actually support it. The logs also confirm this, as the standard
tz.light_colorusesenhancedMoveToHueAndSaturation, whereas the custom solution usesmoveToHueAndSaturation.I looked through some other configurations and found the
metatag with thesupportsEnhancedHueattribute. I then applied it to the configuration to work around the need for the custom converter. I made a new commit with the updated configuration.Additionally, here are the logs for the two converters.
tz.light_color:
tzLocal.flsm_color_hs: