-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add support for extra SilverCrest remotes/sockets #95
Add support for extra SilverCrest remotes/sockets #95
Conversation
The command codes seem to be different for every different remote number, and I can't spot the pattern used to generate them. This adds support for remotes 0x5 and 0xD, leaving the default at the old 0xB codes
display_SWITCH prints with %02X, so retrieve_Switch ought to accept values made of 2 nibbles too, so make retrieve_Switch call retrieve_byte
Hello and great job @simonhyde . Can you tell me why you made a change in Plugin 4 (NewKaku)? Thank you |
Yep, that's the second commit (88e207e) that's actually unrelated to the adding extra support for extra remote controls, but simply improving the SilverCrest support. When receiving commands from RF the SilverCrest plugin uses display_SWITCH, which does roughly printf("SWITCH=%02x",switchId). When parsing commands coming in over serial/TCP the plugin uses retrieve_Switch, which used to call retrieve_nibble, which only accepted a single hex digit and would reject commands that had 2. This causes problems with Home Assistant, which expects received and transmitted commands to be the same string. Thus when receiving RF commands the driver would print: 20;xx;Silvercrest;ID=000005;SWITCH=04;CMD=ON; But, if you sent a command of the format: 10;Silvercrest;000005;04;ON; Then it would be rejected, because retrieve_nibble can't handle the 2 hex digits of SWITCH. "10;Silvercrest;000005;4;ON;" would work, but that's no good for HA because the string needs to be the same in both directions. So, I changed retrieve_Switch to call retrieve_byte instead, so that its expected format roughly matches that of display_SWITCH as it feels like the 2 should line up in their expected format. Plugin_4 is the only other plugin that uses retrieve_Switch, and it assumes that the data will only ever occupy one nibble when constructing its RF packet to send, so now needs the extra "& 0xF" to reject any extra data which receive_byte may have parsed in the additional nibble. |
this makes sense, thank you! |
@simonhyde Thank you for your work. Do you have more working remote IDs? I don't understand how to get working ones (000005 and 000000D work but 000004 doesn't....) |
Ok I see. I get messages from a different protocol when I press the remote buttons like these for A On: EV1527;ID=0e1cb1;SWITCH=0c;CMD=ON; Are they useful? EDIT: The occur in a loop |
(reposting old message from correct account) If you can get the plugin running and connected over serial, you should see "SilverCrest packet =" messages. Each button should generate 4 different packets on loop as you press it multiple times. If you can capture the set of 4 packets for each button on your remote controls then it should be fairly easy to update this plugin to support those too. If you post them here I can have a look at adding the code and building you a test release to try out. |
I don't think those would help (especially without a lot of investigation into how the EV1527 plugin works). The data I'm looking for is produced by this block of code RFLink32/RFLink/Plugins/Plugin_016.c Lines 78 to 81 in d0ce2f4
Because this uses SerialDebugPrintln the data is only sent over an RS232-style serial link, not the TCP socket. If you can only connect over TCP then this could would need to be modified to present this information over TCP too... If you are able to compile your own RFLink32 binary, you could change the code to call display_Name instead of SerialDebugPrintln, followed by another line of just display_Footer(); |
Ok got it :) Codes
|
Interesting...The code assumes the first nibble (character) of these codes uniquely identifies different remote controls, but you have 2 different remote controls that produce different codes that both have 8 as the first nibble. I've had a go at rejigging the plugin to handle this situation and distinguish between your 2 remotes which have a nominal remoteId of 8 If you can build your own image, give this a spin https://github.com/simonhyde/RFLink32/tree/silvercrest_newremote It should map Küche to ID=8 and Wohnzimmer to ID=18 This is totally untested code, but it does compile... I can hopefully do some preliminary tests to see if it still works with my existing remotes this weekend, and can provide you with compiled firmware images if you need them then. |
Thank you! :) I have never build an image so if you could build one this would be great and I could test it. |
Images built for the 4 different targets |
Did you have any luck with these images @protree ? I tested it and it seemed to work okay with my controllers and sockets |
Sorry I had no time until now, hopefully this weekend… I will give feedback, thank you :) |
Tested you build. Remotes are recognized, I get messages like
As you can see the EV1527 plugin is beein called, too When sending a command like |
Different silvercrest remotes generate different codes, this adds support for remotes 0x5 and 0xD as described at couin3/RFLink#66 and fixes a bug in parsing of requests that made this remote incompatible with Home Assistant