Skip to content

Enhancements to support many more switches and RF433 units.#201

Open
perivar wants to merge 30 commits intosui77:masterfrom
perivar:master
Open

Enhancements to support many more switches and RF433 units.#201
perivar wants to merge 30 commits intosui77:masterfrom
perivar:master

Conversation

@perivar
Copy link
Copy Markdown

@perivar perivar commented Feb 13, 2018

Hi sui77, thanks alot for a brilliant library!
I struggled to make the library work with some Everflourish and Nexa units (sold a lot here in Scandinavia) and through debugging I found out that the problems was the limitation of only having 32bit codes. Therefore I extended the functionality to include longer bitstrings. There was also a limitation related to how long a "pause" signal can be which I fixed. (you called it sync, while sync is for me the sync bits in the beginning of of a transmission). This has now been tested by myself and a few others for the ST_Anything project where I run RC-switch on a NodeMCU to act as a bridge for my SmartHome system.
I also like PlatformIO (in Visual Studio Code) alot, so that has become my IDE of choice and the projects are made to work in this IDE.
See https://github.com/perivar/ST_Anything_NodeMCU/tree/master/lib/ST_Anything_RCSwitch
and https://github.com/perivar/rcswitch-testing

Cheers,
Per Ivar

@Locke
Copy link
Copy Markdown

Locke commented Feb 16, 2018

Hello @perivar,

I'm not a maintainer but an interested user.

I noticed you point Travis (in the README.md) to yourself. This should be cleaned up before a merge here. I also noticed that you introduced a lot of style changes which makes reading the diffs hard.

I suggest you to create a separate branch for the PR, so that you can use your own master independently. Then you could clean up the branch (with an interactive git rebase) where you maybe group some related commits together and either avoid or separate the style changes.

One last thing: how does the F macro behave on other hardware than the Arduino? I guess it wouldn't make much sense on e.g. a RaspberryPi. Which reminds me of #64 as RaspberryPi builds still aren't tested by Travis.

Attila-FIN and others added 8 commits March 12, 2018 10:05
40 bits Cixi Yidong Electronics protocol support has been added.
Remote control switches are sold under brands AXXEL, Telco, EVOLOGY, CONECTO, mumbi, Manax etc.

The Cixi Yidong Electronics protocol is a bit "tricky":
it sends special sync pattern, the 40 bits message has the 16+16+8 bits pattern,
where the first 16 is the remote ID, the next 16 is the inverse of the first 16,
the last 8 is the button and command ID. Seems so that odd numbers means ON,
the inverse of that is OFF for the same button (enough to learn by the switch only the ON or OFF),
value 0b10100101/0xA5/165 measn all ON, value 0b01011010/0X5A/90 means all OFF,
assigned to the same remote ID.

Further changes:
- Protocol definition is expanded by protocol ID.
- Changed "#if not defined" to "#ifndef"
- Expanded debug messages
- More code explanation comments
Also updated the README.md file.
- New protocol (12) for CAME remotes have been added (protocol is similar to protocol 6)
- Protocol 11 and 12 has been defined with base pulse 100ms to be able to define protocol more accurately.
- Protocol recognition has been speeded up by checking the pause length first.
- Protocol decoding got more accurate by introducing different tolerance vales for different bits. (35% of tolerance against the earlier 60% is enough.)
- Few fixes, more debugging messages, variable name changes
- Shi Qiong 32+1 bit protocol is added as 13th protocol.
- Also, the Protocol struct has been expanded with changeCount for better protocol recognition.
- When captured data is tested for a protocol, the number of the timings in the array must match the one specified in the protocol definition.
- Protocol 2-10 recognition is not functional, since change count is unknown currently.
- Protocol 1, 11,12 and 13 are decoded fast.
- Tolerance value is adjusted for better decoding
Added more protocol and some other changes
- Protocol uses 1st bit "1" start bit
- README.md incudes Shi Qiong - 1+32 bit protocol description
Added protocol for Mertik Maxitrol G6R-H4T1
@jrc
Copy link
Copy Markdown

jrc commented Jul 11, 2020

Related #124

Tolerance calculation did no work on Arduino, due to the integer limitation and the floating point calculation.

The new calculations calculate the percentage first as float and then do the multiplications.
@Priva28
Copy link
Copy Markdown

Priva28 commented Nov 23, 2020

It's been a while, but it would be nice to see this merge. It adds support for countless more remotes and protocols by supporting the pause/second sync bit. In fact, due to this, I was able to support 2 of my remotes at home. I am also trying to implement these changes in the ESPHome version of RC-Switch so I can connect all my remotes there too.

Hopefully someone who maintains this can take a look and consider merging into the main project though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants