-
Notifications
You must be signed in to change notification settings - Fork 6
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
Validating what's sent #3
Comments
The mega should be on the receiving end. Reason being, the message is so big, you'll run out of memory before you record it all. What's the model number of your remote? |
I'll send you an example of what the message looks like. |
Here's what the values from a single message should look like. These are repeated 10 times for each button press. An explanation of the values is in the header file. 875 |
This explains how the signal works to transmit the data: |
Thanks so much Matt - really appreciate the help. Your message makes sense from what I read of the code. I put the Mega on the receiving end and changed MAX to 800. Mega has pin 2 as receiving data pin. Uno has pin 3 as sending data pin. Below is a snapshot of the output of RF_tester, with the transmitter just running fireplace.on(); in the loop. I also ran with the transmitter unplugged and the receiver in my 3-sided tinfoil box. Those results are below as well (not what I would've expected). Note - I also tried commenting out the if(printed + 1 < changes) just to make a constant receiver....I think that didn't work though because variables probably overflow.... Receiver 433MHz setup PARTIAL RESULTS WITH TRANSMITTER UNPLUGGED AND RECEIVER IN BOX |
Also - the fireplace is model RC300. FCC ID: ULE-RC300 |
It's so weird that with your RF_Tester file I seem to get the same values whether or not the first board is transmitting. Maybe I have an older version of your files, since I needed to rename the const start (in the .h file) to make it compile, and because you have constants defined as XX = 880 and OO = 380 (vs. 875 and 375 you have in your example values listed on what I should be receiving). |
The values are timings and since a lot can happen to an RF signal between TX and RX, they won't be exact but should be within an acceptable range. If transmitting 880, you might see it received as 892 or 876, for example. Timing can also be affected by your code. Try using the receiver test code and press a button on your remote to see what you get. |
I also wouldn't put either transmitter or receiver in a foil box. You could be getting signal scattering or multipathing. RF interference should be minimal in your house. Minimal enough to see it happen. |
Thanks Matt - the first group of numbers I sent above was from me pushing the reset button on both transmitter and receiver at the same time, not in the box.... |
Oh I get it. You mean the actual remote. OK will do that later today and
tomorrow. Thanks again, appreciate the support.
Only weird thing I can't explain is when I put just the receiver in the
foil box it still returns a bunch of data.
…On Thu, Sep 27, 2018 at 6:12 AM milksteakmatt ***@***.***> wrote:
I also wouldn't put either transmitter or receiver in a foil box. You
could be getting signal scattering or multipathing. RF interference should
be minimal in your house. Minimal enough to see it happen.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ApcV8bw_YZ2SGkgKGFjTijvmHPbLbhQpks5ufM6rgaJpZM4W7fBk>
.
|
Ok - did a test with the fireplace's remote - pressed reset and then turned the fireplace on. Got this: Receiver 433MHz setup |
The signal after you hit reset on the remote looks correct. I see similar values. My guess is that there's both something wrong with your transmitter and you have a lot of RF from somewhere else being picked up. It helps to put the signals in spreadsheet columns and compare them. You'll see the values from your remote align with those in the code but from your TX test, they aren't even close. Maybe set up a test with a very distinct transmission signal to ensure your chip is working. |
If you want to try and get rid of the RF noise, you'll need things that absorb RF rather than reflect it. Or, you can drive out to a remote location. |
Thanks Matt - the reason I thought my transmitter was working properly (and also able to deal with the noise) is I ran the below two programs - one as transmitter, one as receiver. And the message was picked up fine (per screenshot). I'm using a cheap 433 mhz transmitter from amazon, and I soldered on this antennae. If/since the below works, do you still think something could be wrong with the transmitter? |
Also, I'm confident it's not interference because when I use the radio on the PC to listen and record what's coming through on the frequency, I only get hits from the arduino transmitter. When that's not running it's just solid static. |
Ha! Major breakthrough! I got the fireplace to turn on. Looks like the protocol your device was following is just different. I took your constant definitions and functions defined in the cpp file and put them into my file, then screwed around with the XX and OO to make the pattern match up. That did it! Now to investigate further....though I guess my library doesn't need to be as robust. Just on off initially. |
Excellent. I wonder if they vary the pattern so you can control multiple fireplaces. Send me your code when you can. |
Sure - the code isn't at all cleaned up yet (I just dropped it into one file since I'm still not sure how libraries really work with the IDE -- any pointers?). Code is below - IIRC the only differences with your code are in the startBlock, onOff, and the value block for on (the second block of three rows). Off looks the same so far. Note: When I did my test, I didn't play around with different values of thermostat, fan speed, or flame height. Not sure if those will adjust anything or not. PS - did you ever try to get this running on a nodeMCU? For some reason this works fine on my Mega, but when I move the transmitter and code to a nodeMCU, the signal strength is super low and not working really. ` DroneBot Workshop 2018 //Assumes data PIN 12 // High/Low microsecond timings, first value is high timing, the rest alternate low/high
const int pinChangeDelay = 0; // Value to subtract from numbers to compensate for instruction timings bool done = false; void setup() { void loop() { void transmit(const unsigned long msg[], const unsigned int msgSize, const unsigned int msgByte, const unsigned int endDelay) void sendMsg(int msg, int val) void start() void stop() void on() void off() void setFan(int speed) void setFlame(int level) |
FYI for anyone who makes it this far. I updated a bunch of stuff with respect to Ardufuego in my fork. Namely I figured out more about the rhyme and reason for the commands and values. See the table in FireplaceRf.h. The last 3 message segments are basically the following. CommandOffset1 and 2 seem to vary per remote (along with the first two segments of the start message). In my case CommandOffset1 and 2 can be found like this.
For PowerOn my last 3 message segments look like this. (purely coincidence that Command and CommandOffset2 are the same)
After figuring this out the code was able to be simplified greatly and I was able to map more functionality like Pilot, AUX1, and AUX2 easily. |
Wow - fantastic that you figured it out. My basic solution has been working well for years. I barely remember how. Maybe at some point I'll dust it off and try to upgrade... :) |
Just getting back to this project to update it with voice control and super excited to see the additions. I'll be sure to update once I get my phase 2 running. |
So I've got my Mega sending out just fireplace.on as a test. I encapsulated a box with tin foil; and I put my receiver in it (it's driven from an Uno).
I'm trying to figure out a good way to validate that it's working. The Mega sending out fireplace.on is not starting the fireplace. I even soldered an antennae on, so it's not that - my basic RF transmit programs using RadioHead are working fine.
So either my fireplace's RF codes are different, or I'm doing something wrong.
If I run your test RF programs and have the receiver on an Uno in the foil box, what should I see? If I run your test receiver on the Uno and fireplace.on from the mega and have both in the foil box, what would you expect to see?
Tomorrow I'm ordering an SDF and will try to use audacity to reverse engineer things better.
The text was updated successfully, but these errors were encountered: