Allow multiple RF modules simulatenously #2130
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
So this is how I've been successfully using the Pilight and RF modules simultaneously on the same OMG installation. I have a normal RXB6 receiver, and its same data pin goes to 2 different pins on the ESP8266 (presumably to take advantage of the hardware interrupts thereof).
The code change is dead simple: just enable all the RF modules you want instead of only enabling one.
I use a bitfield for setting the active receiver (0000), so you can set multiple receivers at the same time with e.g. 0011, meaning {"active": 3} for Pilight + RF.
There are obviously some things that might not work that I haven't tried, like CC1101 using Pilight + RF or HA discovery, but I'm just a simple man, I use the old fashioned RXB6 variants for most OOK things like this. The code will need adjustment and sanity checks like this. Since I'm not sure how you'd want to implement configurations and etc, this is a draft, but it works perfectly for my purposes, so I wanted to share it in hopes of getting a variation of it merged for others' benefit. (see #450)
Thanks @1technophile for your efforts and openminded kindness through the years.
Checklist: