-
Notifications
You must be signed in to change notification settings - Fork 665
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
Decode Smartwares SH5-TDR-F remote #360
Comments
Hello there! |
Looks like simple Intertechno on 64 bits in the end... |
Hi Cilyan, thank you very much for the valuable hints! From what I've seen so far I fully agree with you. Two things I didn't have in mind so far were:
With this in the end also this remote might use a flavor of the Intertechno V3 protocol, as described in FHEM post. Thx |
Good, so I was able to confirm that the protocol is very like the one describe on the domadoo website, and that they call "HomeEasy" protocol. The frames are coded like this:
Then, there is a "second pass", where 0 is converted to 01 and 1 to 10. Decoding a received frame is done backward, but the most valuable information is the remote ID, which is the same in every frames. Now, however, I still need to workout the protocol timings. For the moment, that doesn't work. I used the branch from @atsage (https://github.com/atsage/rc-switch) to be able to send 32 bits of code (64 pulses) and the two protocol timings I tested were
and
but neither work well. On some very rare occasions, when there is noise on the frequency, I manage to switch off the plug, which lets me think I'm not far away, but this is totally unreliable. |
@akemper If I try to match your graph (by eye, it's not easy), these are the parameters I find:
I hope it matches something on your side. |
Some more good news.
Some bad news... RCSwitch is unable to send such a protocol. First, because the delay between retries cannot be modified, second because RCSwitch sends the sync bit after the code, not before, and finally because we need to send 65 pulses in addition to sync pulse, which is larger than even what the unsigned long long allows. To support this protocol, one would first need to change RCSwitch to allow more than 64 pulses to be sent (there is code lying around with implementation over an array of bytes, but not always very tidy), then have an option to send the sync pulse at the beginning of the frame, and finally have an option to introduce delay between retries. I'll think about that, but seeing how the project deals globally with PRs, I will probably stay on a solution tailored to my needs, which will probably be to pre-compute the pulses on the computer and send then to the arduino over serial, which the arduino will then apply. Here is a basis ready to be modified for such a job: https://github.com/raimohanska/intertechno-433-on-off/blob/master/intertechno-433-on-off.ino |
I have two of these remotes and also took traces from different keys there. When I have some more time (most likely during next weekend) I will further verify this, while I'm pretty sure these general assumptions are correct from what I've seen already.
Yes, this is a bit tricky. I started using https://github.com/1technophile/rc-switch as being part of OpenMQTTGateway, It does not yet seem to support a second pass, but at least looks like being 64bit-enabled from what I've seen so far.
I spent some time during the afternoon to further drilldown into my traces. From there my "decoding string" would be finally { 260, { 1, 10 }, { 1, 1 }, { 1, 5 }, false } |
Could well be, but unfortunately I don't remember which trace I attached. What kind of encoding did you choose for the remote ID? 26bits to eight digits suggests octal base? |
This is just decimal. If corresponds to "11101100100101110000000000" in binary. But maybe I made a mistake while reading the bits from the trace. |
Very good point, which I noticed during the afternoon as well, due to counting a total of 66 pulses. What I did not yet check / understand if this might be some kind of preamble or extended sync. Mentioning the idea of a preamble is mainly due to additional functionality in the above mentioned rc-switch fork for the gateway. I did not yet understand what this is about, but could well be that this belongs to the Keeloq routines included in the fork.
I didn't test this myself yet, but just saw sometimes a bit of jitter in my traces. Especially the sync was not always a clear {1,10} but sometimes at least closer to {1,9}. However, from comparing sample and averaging over all bursts I'm quite confident regarding the schema / timing posted below.
In total I've always seen eight identical bursts. Furthermore, I found that the low interval between two bursts is 41 times low level, i.e. from the falling edge of the 65th bit to the rising edge of the sync pulse. The mentioned fork of rc-switch supports in addition a guard interval, hoping that this can be used to separate repetitive bursts.
As mentioned I want to go into more detail there with the enhanced version of rc-switch, hoping that most of the points might be covered there. Thus good to have at least a more detailed understanding what is required in addition.
I have a similar thinking there, i.e. I would prefer to merge this into the official repo. But let's see how to get it working at all.
|
Very good point, which I noticed during the afternoon as well, due to counting a total of 66 pulses. What I did not yet check / understand if this might be some kind of preamble or extended sync. Mentioning the idea of a preamble is mainly due to additional functionality in the above mentioned rc-switch fork for the gateway. I did not yet understand what this is about, but could well be that this belongs to the Keeloq routines included in the fork.
I didn't test this myself yet, but just saw sometimes a bit of jitter in my traces. Especially the sync was not always a clear {1,10} but sometimes at least closer to {1,9}. However, from comparing sample and averaging over all bursts I'm quite confident regarding the schema / timing posted below.
In total I've always seen eight identical bursts. Furthermore, I found that the low interval between two bursts is 41 times low level, i.e. from the falling edge of the 65th bit to the rising edge of the sync pulse. The mentioned fork of rc-switch supports in addition a guard interval, hoping that this can be used to separate repetitive bursts.
|
I made it work, at least for my plugs, it could be nice if you can confirm this works for you too. You can check integration of the feature in 1technophile#2 (if Florian does answer, I don't know if he is willing to/has time to work on this), or the feature is already available in https://github.com/Cilyan/rc-switch (be sure to be on dev branch, I followed 1technophile's branching). |
Thanks for going ahead there. Hopefully I will find time again to verify during the upcoming weekend. |
I saw you edited away your questions but anyway, here are some answer. Someone may find them useful as they are legitimate
|
I've added your proposed timing to the rc-switch library included in latest OpenMQTTGateway 0.9.5 Unfortunately for receiving at least it does not work yet, i.e it randomly decodes to either protocol version 25 or 29, but not 35 as it should. Will continue with this during the week and compare transmitted signals from hand transmitter to the ones from rc-switch. |
I have to admit, I did not test the reception as the library and examples were not yet configured to do that. |
Receiving for me is even more interesting, since to my knowledge at least my shutter switches can learn also other (simpler) codes transmitted. But I try to go into more detail during the week and keep you updated. |
I will have to give it a try also in the coming weeks (yeah, unfortunately not sooner). But my guess is that at the moment the decoding logic is too trivial. It was okay to decode a few protocols that were distinct from each other. But now that it handles many more protocols, it needs a better heuristic to decide which protocol suits the best. At the moment, apart from some special paths, the first protocol that matches the first pulses is used. I would recomand to at least change the logic to try all protocols so your receiving logic behind can pickup the one that suits its needs. But this will not be done with just a few lines changed. |
Thanks for the hints regarding further code changes. I fully agree there with you and plan to continue in the evening. During this week at least I will focus on just getting Smartwares packets sent by the gateway. Soon as I find time in the future I'll dig deeper into receiving as well and potentially hack rc-switch specifically for this purpose. |
I suspect that the uC as difficulty with this numerous protocols or maybe there is an issue in the code, it would be interesting to remove a part of them for your tests. |
Couple of minor updates after spending additional hours during the weekend. The proposed timing |
Hi! I've read this thread and noticed that success has been limited. Being a noob, I don't think I'd be able to replicate all the code changes that have been discussed here and the limitations would be showstoppers for me anyway. But perhaps I can help in a different way. I found a reference on a German forum to this thread from another (dead) forum (wayback machine link): At some point in the thread, someone makes this comment (Google translate)
Could this help? Apologies if this is info that has already been known here. |
Hi,
I want to expand sources to decode also signals from SH5-TDR-F remote with self-learning receivers. I started capturing the received signal. It consists of eight identical, sequential bursts as illustrated in the attached picture. While the overall timing and leading sync pulse are pretty obvious, I don't understand how the individual bits itself are encoded.
The total of 32, constant-length low periods suggest 32 bits being encoded in every burst, but I have no clue how this maps to either one, two or three toggling pulses in-between these. Furthermore, there is always one more "one-toggle" as compared to the "three-toggles", thus ensuring a constant length of the overall burst. Anybody having either a good hint or even better understanding how the individual bits might be encoded?
Thx
Andreas
The text was updated successfully, but these errors were encountered: