-
Notifications
You must be signed in to change notification settings - Fork 814
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
RF AND Pilight together #450
Comments
I have the same problem. I bought a temperature sensor from a list of compatible devices. and now I can not see the motion sensors and remotes. I have to choose !!! what to use is extremely uncomfortable. Thanks for your work!!!!! |
I'm in a similar situation - some of my 433 MHz devices are supported by Pilight, but others are not, and I asked a similar question in the past. Anyway, currently because of that and coverage issues I run one OMG with Pilight on one floor of my house and one OMG with RF on the other. They work ok together. |
I understand the issue, I have worked to add gs-wds07 to Pilight and now it is done, I need to integrate more devices. But it is a lot of work... |
As I pointed out above, it's a slow process because requires plenty of time and knowledge (and because there is no way to simply "transfer" support for devices from RF to Pilight) and currently it mainly relies on the author of OMG. I'm happy to do my bit as still have some 433MHz devices that are supported by OMG RF only. |
Have an idea, maybe not a new one. RF and on different Pilight receivers. Use two independent receivers on different GPIO channels. please consider this opportunity. |
Please comment on my previous post !!! |
Why not, it should be tested to confirm |
Indeed adding a protocol to Pilight was a long process, I'm going to see also as an alternative if I can add easily protocols to rcswitch, if yes I will document it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The problem is not outdated !!! We are patiently waiting !!! |
Thanks for your patience, I keep that in mind |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, did someone actually test @odis68 's idea? If not, I can try it (adding 2 receivers and test on an ESP32), but I am not a programmer. Now my setup is using Pilight. If I modify config_RF.h (adding RF_RECEIVER_GPIO2) and ZgatewayRF.ino to use RF_RECEIVER_GPIO2 then enable ZgatewayRF and ZgatewayPilight, is it worth a shot or do I need to do much more then this? |
Faced a problem - RF and Pilight do not work at the same time. They do not work, since the libraries use attachInterrupt to the same pin, which cannot be done.
the first object is processed by Pilight, the second is processed by RF |
@iWildStyle Would you share all the code/settings you changed to get this to work? Specifically ZgatewayPilight.ino and main.ino? And why splitting config_RF.h was necessary? |
I too made modifications that let me run both Pilight and RF together on my Wemos D1 mini as well, but when I connect the 433MHz receiver's DATA pin to two separate pins on the Wemos (D7 and D8, like @iWildStyle suggested), I stop receiving data on both. As soon as I make it so the receiver's DATA pin only has contact with one pin on the Wemos, I start receiving signals again. Software-wise, it should work, but I'm at a loss.
How exactly did you do this? |
I got it to work! This is incredible! Both Pilight and RF (RCSwitch) working at the same time using a single receiver. For some reason pins D3, D4, and (maybe) D8 didn't work and would simply smother the data. I tried pins D6 and D5 and they both worked. So seems you can use D5, D6, and D7 for the receiver inputs at the same time, but not D3 or D4... So in summation, I modified the code to allow the RF and Pilight modules to not be mutually exclusive (pretty trivial, including splitting the RF_RECEIVER_GPIO into multiple variables so you can assign a separate GPIO input for RF and Pilight, since like @iWildStyle said, you can't do I didn't try D8 (I use it for my transmitter) or D0 or D1 (I use it for another sensor) or D2 (I use it for another sensor). But D3 and D4 definitely don't work for some reason. I didn't try with anything other than Wemos D1 mini since I don't own anything else, so I can't test it for other microcontrollers. I can provide the code and maybe we can get a pull request going. Essentially I replaced a switch statement with multiple if statements so you can have both RF and Pilight going at the same time, split the RF GPIO variable like I mentioned above, and changed the Active Receiver Module from an integer to a bitmask so it can be ORed together to indicate multiple RF gateways running simultaneously. I also haven't tried doing the new on-the-fly gateway switching, though it should work if you provide it a bitmask integer instead of the old plain integer. I'm going to try getting RF2 to work too, but I don't have any KAKU devices to test that with. But seems like there's some more complex thing that won't let RF and RF2 work together according to the docs (?), so I don't know if that'd work. But you can probably also run RF2 and Pilight at the same time too just like this. Given how difficult it is to add new protocols to both RCswitch and Pilight though, I really think the future is with RTL_433 for 433MHz stuff. I need to get my hands on one of those builds. |
This is my code patch for now:
|
Would this potentially cause resource contention from having too many interrupts contending for cpu resources? Pro Tip - For testing of RF2/KAKU, I used a ESP32 connected to a CC1101 as a transmitter with the RF2 module enabled. And had it transmit KAKU signals for testing the receive function. Seemed to work pretty well. |
I noticed my code isn't complete for the "active receiver" thing despite me converting it into a bitmask; there is still code in But it is working flawlessly somehow on my ESP8266. I'll try to clean up the code. @1technophile Are you interested in getting this merged somehow? |
@melyux yes of course ! |
@melyux would you be able to share your ZgatewayPilight.ino file for making both Pilight and RF (RC-switch) work? I'm trying to get the same result, but since I have little experience I'm having a hard time in easily replacing my code with yours. |
@piano-thomas I'm creating a pull request to enable multi-gateway support in the next few days (hopefully). I'm updating the code to work with latest master, but the ZGatewayPilight.ino changes in the patch I posted above should still be working |
Code doesn't seem to work with RTL433 (I think the CC1101 just doesn't support multiple gateways because it's a single device over SPI and can't do multiple interrupts and you can't attach the receiver pin to multiple pins on the ESP like you can with the regular 433MHz receivers; I tried it and it didn't work), so I'm working on excluding it and just having RF and Pilight working together (and probably RF2, but don't have any RF2 devices to test with) |
@melyux that would be great! The only thing I am struggling with is implement the ZGatewayPilight.ino changes in the patch. I'm lacking a lot of experience and experimenting with everything, couldn't figure out how to use the git diff feature to create a custom .ino file. Changing everything by hand will for sure cause errors ;).. |
I have a rough Lilygo working with the other RF libraries… [“LilyGo_SSD1306”,“WebUI”,“RF”,“RF2”,“Pilight”,“rtl_433”] github.com I isolated the decoding of the libraries from the receiving by RTL_433_ESP… |
Fyi - rtl_433_esp and pilight libraries have conflicting names and can not be used together |
https://github.com/rinie/ESPiLight/tree/ZradioSX127x I modified this to fix that. If you have any clues to get transmitting working?... |
I never looked at the transmit capability of the sx127x chipset, but you need to find a mode where a pin can control the transmitter output. Similar to direct mode I use for receiving signals also the common rf functions should be placed into commonRF ( I’m not sure if you did this as I’m on mobile) |
I thought DIO2 could be used for Transmit as for Receiving... |
I tried to run your code. but for some reason I got an error "Compilation error: declaration of template parameter 'T' shadows template parameter" |
This issue is stale because it has been open for 90 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I made a draft PR where I share my code for how I implemented RF and Pilight together, simply by enabling both of them at once: #2130 |
But you still need 2 receivers instead of using 1 for different purposes?
Op wo 11 dec 2024 om 12:06 schreef melyux ***@***.***>:
… I made a draft PR where I share my code for how I implemented RF and
Pilight together, simply by enabling both of them at once: #2130
<#2130>
—
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABK33OTZTUFBX5IKAU7UQT2FAMDFAVCNFSM4ISTK5Z2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TENJTGU2TIMRSGQ4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Met vriendelijke groeten,
Rinie Kervel.
Don't walk behind me, I may not lead.
Don't walk in front of me, I may not follow.
Just walk beside me and be my friend.
|
I use a single receiver, but its data pin is connected to multiple pins on the ESP, as @iWildStyle talked about above. |
Ok, but would it not make sense to do that in software instead of hardware.
1 Physical receiver using 2 or more RF decoders?
Op wo 11 dec 2024 om 20:44 schreef melyux ***@***.***>:
… I use a single receiver, but its data pin is connected to multiple pins on
the ESP, as @iWildStyle <https://github.com/iWildStyle> talked about
above.
—
Reply to this email directly, view it on GitHub
<#450 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABK33JNCAE5PJB2SM7ADML2FCI3PAVCNFSM4ISTK5Z2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TENJTGY4TMNBUHA4A>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Met vriendelijke groeten,
Rinie Kervel.
Don't walk behind me, I may not lead.
Don't walk in front of me, I may not follow.
Just walk beside me and be my friend.
|
It is a single receiver. But you have to attach its DATA pin to multiple pins on the ESP because the ESP uses hardware interrupts per-pin, and OMG uses those hardware interrupts. Just add a second DuPont cable to another pin, that's it |
as it seems impossible to use the RF (gatewayRF) and Pilight (gatewayPilight) togther on 1 device, any chance that it would work in the future?
(combining those 2 libraries would be great... i now have devices that work with RF, but not with pilight, and the other way around)
Thanks for openmqqtGW!
The text was updated successfully, but these errors were encountered: