Skip to content
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

rfb: rework both efm8bb1 & rcswitch implementations #2335

Merged
merged 31 commits into from
Aug 26, 2020

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Aug 23, 2020

  • build flags RF_... are renamed to RFB_...
  • drop RFB_DIRECT boolean in favor of RFB_PROVIDER=..., adds RFB_PROVIDER_EFM8BB1 and RFB_PROVIDER_RCSWITCH
  • rework rfbridge parser. drop serial buffering and combined processing of rcswitch / rfb data in favor of state-full parsing
  • rework rcswitch integration, support variable length payload via bitlength and allow to output 64bit data via rc-switch fork from open-mqtt-gateway.
  • apply bit-length comparison for the old rcswitch codes, bump cfg version to 5 to allow 1.14.1 config updates (broken on dev, since cfg setting was never updated on clean installations 😞)
  • optional relay support for both, independent of mqtt
  • rework settings scanning routine when trying to match rf payload with the relay ID, scan settings only once instead of relayCount()2 times if we want to find something for relayCount()-1'th relay
  • add broker callbacks list with proto id + stringified code. default rfbridge does not support more than one protocol, so send out ID 0 as default (which matches with what 0xa6 will show, supposedly as it does not work for me :?)
  • send out 0xa6 and 0xb0 sniffer data from https://github.com/Portisch/RF-Bridge-EFM8BB1/ to the MQTT and internally via broker callback
  • update receiver callback 'locking' to make sure specific relay ID is tracked instead of all at once
  • update build tests and deprecation notices

re @Sag06, please test :)
https://gitter.im/tinkerman-cat/espurna?at=5f400f3049148b41c963527e
CI here seem to have died for some reason, I need to fix that before nightlies are up again. But, I noticed you mentioned esphome, so you should have all required stuff already since we also use PlatformIO build tools.

Either build works

Mind the size requirements

mcspr added 30 commits August 23, 2020 11:48
- RF_... -> RFB_...
- rework rcswitch integration, support variable length payload
- rework rfbridge parser (not tested)
- rework settings scanning routine when trying to match rf payload
  with the relay ID
- update build tests
- for some reason we were never checking it's output
no need to increase +1 since we write the exact number
- allow hexEncode output be decoded, enforce even-ness
- raw msg must have at least 3 bytes - start+code+end
- queueing efm8bb1 msg, pass around array as reference since the size is fixed
- make use of learn timestamp
- no need in template when size set as constexpr
- remove size param completely, deduce size based on buffer
ref.
https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/0xA2 (desc: Learning OK)
https://github.com/Portisch/RF-Bridge-EFM8BB1/wiki/0xA3 (desc: Learning failed)
were used, but the pages did not reflect the actual implementation:

https://github.com/Portisch/RF-Bridge-EFM8BB1/blob/af1bddb3d81c79d67063184219ec21f8249dffd0/inc/uart.h
...
RF_CODE_LEARN_KO = 0xA2
RF_CODE_LEARN_OK = 0xA3
...
@mcspr mcspr changed the title WIP: rfbridge refactoring, plus rfb: rework both efm8bb1 & rcswitch implementations Aug 26, 2020
@mcspr mcspr merged commit 82d5de0 into xoseperez:dev Aug 26, 2020
@mcspr
Copy link
Collaborator Author

mcspr commented Aug 26, 2020

re: 82d5de0

Merge vs. Squash 'issue' submitted as ticket to Github, at this point it is definitely some kind weird interaction with their servers.
A lot of useless commits in the history now :(

@mcspr mcspr mentioned this pull request Aug 26, 2020
@mcspr mcspr deleted the rfb/refactoring branch August 27, 2020 07:37
This was referenced Aug 27, 2020
mcspr added a commit that referenced this pull request Aug 27, 2020
* rfb: fix unused repeats setting
* rfb: rename TIMES -> REPEATS
* rfb: use out as first arg
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.

1 participant