andrew01144 / Tasmota-SomfyRTS

Berry script to to control Somfy powered blinds using Tasmota
13 stars 1 forks source link

Using a CC1101 for easily transmitting 433.42 MHz signals #2

Closed ruedli closed 2 years ago

ruedli commented 2 years ago

In my project I used a programmable radio, the CC1101. It allows for using the Somfy required 433.42 MHz frequency without changing crystals. I achieved full range successful Somfy shade communication in my dedicated (non Tasmota based) solution using an ESP32. I believe the libraries I used could not be used in Tasmota, because it would occupy the Tasmota loop too long for sending Somfy commands.

My questions are:

See https://github.com/ruedli/SomfyMQTT for my working hardware and code.

darenkeates commented 2 years ago

Brilliant I’ll try all that tomorrow.

Regards

Daren Keates MSc Principal Project Engineer - New Technology

Siemens Mobility Limited

Station Approach, Swanley, Kent, BR8 8JD, UK. Mobile: +44 (0) 7921 247 011<tel:+44%207921%20247%20011> E @.**@.>

On 9 Oct 2022, at 20:20, Ruud Rademaker @.***> wrote:



Hope you have it working now, to help you understanding, I also provide some info.

setting up a remote within the ESP32 (you can have multiple) is done with the commands described in te README of this project. In short, the first command sets up a remote with an internal Id (123 in this example), then sending RFtxSMFY with button= 1,2,4,8 acts as if the ESP32 presses stop,up,down,prog for this remote respectively.

You can link n remotes to m sunshades. They do not need to be 1:1.

hope this helps, the readme is quite good, once you understand what needs to be accomplished.

— Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fandrew01144%2FTasmota-SomfyRTS%2Fissues%2F2%23issuecomment-1272610821&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Cfc028e6e6b0d43d5ced508daaa2b4843%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638009400116113991%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=euInL2RW%2BMeQeRAi1DxDNnTgj%2F0jgRJecv6o43xzxeY%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH7JPF2FNN627LOOD7WUREDWCMLGRANCNFSM6AAAAAAQO3SLME&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Cfc028e6e6b0d43d5ced508daaa2b4843%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638009400116113991%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=twFdb%2FJVtp%2B5qhkejcWE0NrepE6GNMVyyBe0lEYpPKA%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

andrew01144 commented 2 years ago

Now that CC1101 is included and working, I am going to close this Issue. To anyone wanting to use the CC1101 - don't read this issue - All the info should be in the README.md now. If you find any problems, or need any help - don't hesitate to open another issue. Thanks for the collaboration in getting it to work.

darenkeates commented 2 years ago
  1. I saw you updates and have successfully uploaded those latest files with cc1101=1.

  2. That makes sense, how do I teach the blind the code?

Regards

Daren Keates MSc Principal Project Engineer - New Technology

Siemens Mobility Limited

Station Approach, Swanley, Kent, BR8 8JD, UK. Mobile: +44 (0) 7921 247 011<tel:+44%207921%20247%20011> E @.**@.>

On 9 Oct 2022, at 17:14, andrew01144 @.***> wrote:



Two things:

  1. That RFtxSMFY is unknown, means the Berry script has not successfully loaded. That might be because I did a lot of tidying up today. If you download autoexec.be and RFtxSMFY.be from github now, then upload them to your Tasmota, all should be good. You will see that autoexec.be just loads() RFtxSMFY.be. Previously, I had the CC1101 support in a separate RFtxSMFY_CC1101.be file, but that's gone now. See also https://github.com/andrew01144/Tasmota-SomfyRTS/blob/main/README.md#using-a-cc1101https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fandrew01144%2FTasmota-SomfyRTS%2Fblob%2Fmain%2FREADME.md%23using-a-cc1101&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Cf016fe16757e49a3f77008daaa115323%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638009288625324986%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zvN2h0QL0bTJOmk7jQjUVUJ5PhBFxKeH%2BH2MsR7kSBo%3D&reserved=0 - you will need to edit the file to enable CC1101.

  2. The system does not know the code of the blind. It works the other way around. You tell the blind to learn the code of a new controller.

— Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fandrew01144%2FTasmota-SomfyRTS%2Fissues%2F2%23issuecomment-1272575657&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Cf016fe16757e49a3f77008daaa115323%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638009288625481205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=j4VlvurkwRUqJOCmAdT3aFDlBKsmPmryAzFH6ej9awY%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH7JPFZXJLUT4NEZ6X5HTCLWCLVNZANCNFSM6AAAAAAQO3SLME&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Cf016fe16757e49a3f77008daaa115323%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638009288625481205%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7KFvpjlx4pYOGcDrDtFeMM%2BEzXZmfu7sTTFfNAkcdp4%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

darenkeates commented 2 years ago

I’ve got a CC1101 and just ordered a ESP32 so can’t wait to try your solutions. Is there a set of instructions, .bin file and pin out so I can try it myself please?

Regards

Daren Keates MSc Principal Project Engineer - New Technology

Siemens Mobility Limited

Station Approach, Swanley, Kent, BR8 8JD, UK. Mobile: +44 (0) 7921 247 011<tel:+44%207921%20247%20011> E @.**@.>

On 8 Oct 2022, at 16:52, andrew01144 @.***> wrote:



if I configure all the SPI pins in Tasmota (module settings)

Yes, that should work. I briefly tested it. Download the latest RFtxSMFY_CC1101.be. You should see "var SCK_PIN = -1" etc. Then you just need to set the "if true" and "if false" blocks to get the block you want. I should probably remove the two hard-coded blocks and just rely on the configurable block, now.

— Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fandrew01144%2FTasmota-SomfyRTS%2Fissues%2F2%23issuecomment-1272346669&data=05%7C01%7Cdaren.m.keates%40siemens.com%7C1d457fd7edc44d69485c08daa9450cc2%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638008411269999255%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=w7vs58PJn1iY5in5oqzoXNCN42F6xMbbKPxVs2XbJ90%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH7JPF5R5QOVSL4FSCCNXMLWCGKCJANCNFSM6AAAAAAQO3SLME&data=05%7C01%7Cdaren.m.keates%40siemens.com%7C1d457fd7edc44d69485c08daa9450cc2%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638008411269999255%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MKIa2SSClEmC8EUKgX%2FcSAr0YeFY8OX6X4tOFcqwgpI%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

andrew01144 commented 2 years ago

@darenkeates Just follow the procedure https://github.com/andrew01144/Tasmota-SomfyRTS#to-demonstrate-operation. Let me know if it works.

darenkeates commented 2 years ago

Thanks mate, I will be trying it over the next few days and will report on separate thread to avoid confusion.

Regards

Daren Keates MSc Principal Project Engineer - New Technology

Siemens Mobility Limited Station Approach, Swanley, Kent, BR8 8JD, UK. Mobile: +44 (0) 7921 247 011 Email: @.**@.> @.***

From: andrew01144 @.> Sent: 11 October 2022 09:39 To: andrew01144/Tasmota-SomfyRTS @.> Cc: Keates, Daren (SMO UKI RC-GB RI PE DE ECDP 1) @.>; Mention @.> Subject: Re: [andrew01144/Tasmota-SomfyRTS] Using a CC1101 for easily transmitting 433.42 MHz signals (Issue #2)

Now that CC1101 is included and working, I am going to close this Issue. To anyone wanting to use the CC1101 - don't read this issue - All the info should be in the README.md now. If you find any problems, or need any help - don't hesitate to open another issue. Thanks for the collaboration in getting it to work.

- Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fandrew01144%2FTasmota-SomfyRTS%2Fissues%2F2%23issuecomment-1274316839&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Ccddd1747ca8a4c3c36c808daab6400a9%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638010743254222692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=j1eL9DyTFiDJxea7NiMZyXvIr2aT6q9aCc4FqKT8ul8%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAH7JPF7F4UQ2HE4CBIVTZETWCURRBANCNFSM6AAAAAAQO3SLME&data=05%7C01%7Cdaren.m.keates%40siemens.com%7Ccddd1747ca8a4c3c36c808daab6400a9%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638010743254222692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6p1YJlXHXbuH329oqaDmo43NBMeuZCOE3X5%2BiN7SkOE%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

ruedli commented 2 years ago

This will be my last comment in this thread. For those "reading" the proceedings and trying to apply it, it should be noted that all relevant infomation is now documented in the "current" (october 10th 2022) readme of the project.

I want to explicitly mention the constructive, positive and quality way in which @andrew01144 dealt with my "simple" request to review / consider CC1101 support. Not only did he add configurable support for this radio, on the way getting there he implemented "spi" for Berry and reverse engineered what a rather complex C++ library did in terms of initiation the software defined radio, the CC1101.

Then, not unimportantly he updated the project's readme to hold all gathered information.

It proved to work both for him as for me, replicating his hardware / software setup separate from him.

Thanks again!

I consider the request "implemented" and "close" my request. Further issues will be tracked with in separate issues.

andrew01144 commented 2 years ago

@ruedli - many thanks for your kind words, and you are very welcome!

FYI: I have updated RFtxSMFY.be (and README.md) to use SSPI instead of SPI GPIOs. You might want to download the new version. Remember to edit the hasCC1101 and tasmotaShutterIntegration lines to match your current configs. Upload the file to Tasmota, go to Configure Module, and change the assigned SPI pins to SSPI pins.

I did this because: