-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Fix telegram for switching off in light.py #135410
base: dev
Are you sure you want to change the base?
Conversation
For switching of the dimmer like Eltako FUD61… or FD62…, the data byte 0 bit 0 should be 0. Accordingly, change the last byte in the telegram to 0x08. Further information is available in the Eltako reference document https://www.eltako.com/fileadmin/downloads/en/_main_catalogue/Gesamt-Katalog_ChT_gb_highRes.pdf
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.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @bdurrer, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
I personally have no clue if this PR is good or not. So I would like some more eyes from people who know about enocean. @andreas-bulling, can you maybe shine a light as you also have a PR open for this integration? |
The fix of this PR is included in PR #134594 |
that PR won't be merged as is, as it changes the configuration structure. So in order for me to know if this PR is good, I think I want to know if this work with all the devices this integration supports? Because I have a hard time thinking that this is broken since the start and never caused a problem for anyone, and I don't feel like fixing it for a few people to break it for the others. :) |
The Eltako documentation tells the same for the FUD61 type (referred as working with HASS EnOcean) and FD62 typ (not working w/o fix):
Maybe the FUD61 type still turns off as the dimming value in the existing telegram is set to 0:
The third hex block (Data byte 2) contains the dimming value (00…FF), the last hex block (Data byte 0) contains the telegram type on bit 3 (1 = data telegram) an the switching command on bit 0 (see above). According to the Eltako documentation, the last bit has to be 0 (0x08) for switching off. This applies to all Eltako devices. |
I am afraid I am by no means an EnOcean expert. I found a working solution in #134594 by looking at the official documentation as well as trial and error. As you can see in the code that I proposed, I am using the "old" way in which a |
That is the case, from encocean/protocol/EEP.xml
The most valid testing I and possibly @andreas-bulling could provide are the actually generated EnOcean telegrams. Regarding this PR, the telegrams are as follows:
Conclusion: All packets are well-formed and working. |
Is there a more advanced approach? Using the packet generation from Python EnOcean – from my point of view – is clearly an improvement. [Edit] Read your comment regarding the other PR. I am going to move the discussion to discord as offered by joostlek. |
It seems the EnOcean integration was updated at some point. I do this
The newest version of the integration code uses something like
|
@andreas-bulling if you feel like it, you can find a chat about at discord at. https://discord.com/channels/330944238910963714/1328816932408922142. Be sure to select the developer role when joining the server |
This single bit is definitely broken in the current version. I had to fix it again in my local installation to get the device working after the update to 2025.1. Considering that the PR is also compliant with the manufacturer documentation, there is no reason from my point of view why the fix could break anything. |
Proposed change
For switching off the dimmer like Eltako FUD61… or FD62…, the data byte 0 bit 0 should be 0. Accordingly, change the last byte in the “switch off” telegram to 0x08.
The fix changes the EnOcean telegram payload only. It has been tested successfully using an Eltako FD62NPN-230V dimmer.
Further information is available in the Eltako reference document https://www.eltako.com/fileadmin/downloads/en/_main_catalogue/Gesamt-Katalog_ChT_gb_highRes.pdf
Type of change
Additional information
None
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: