majikthys / snuggletronics

Wirelessly controlled Sunbeam® heated mattress pads with a Raspberry Pi.
MIT License
5 stars 3 forks source link

RPI3 / Wiringpi #1

Open willgleich opened 6 years ago

willgleich commented 6 years ago

Wiringpi2 is deprecated in python3.3+, but the calls are the same in wiringpi (no 2) so I've attempted to remove the 2 and utilize the working module in python 3.5

However I cannot seem to get my bed heater to work with the recommended radio adapter.

The pinout on the RPi3 is the same, so that shouldn't be an issue.

Did you connect your radio with female - female jumper cables?

Or any helpful troubleshooting I could do. Project looks really cool

majikthys commented 6 years ago

Oh very interesting. You can test that your pi is properly bit banging by placing an LED across your data pin and ground, you can even tweak the interval so the flashing is slower and easier to observe.

I did not try a female to female jumper cable, so I don't have advice there (other than solder).

Feel free to submit a pull request if you have any changes you'd like to see! BTW, I did ultimately reverse the protocol so more fine grain adjustments would be possible if I ever get around to updating this project!

willgleich commented 6 years ago

so you soldered your radio adapter on to the GPIO pins?

majikthys commented 6 years ago

I used a breadboard. I wouldn’t solder directly to gpio pins. Perhaps cut a couple of you jumper wires and solder xmitter leads to your wires? Dunno what you have available, but I’m sure you can make something work!

Definitely test you code/environment with LED, as suggested before, before you go down the wire debugging. On Thu, Mar 1, 2018 at 1:15 PM willgleich notifications@github.com wrote:

so you soldered your radio adapter on to the GPIO pins?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/majikthys/snuggletronics/issues/1#issuecomment-369733369, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy5Cy0g_H4oCi0WswbMV5ZIa4YDeK13ks5taGUMgaJpZM4SXuj0 .

willgleich commented 5 years ago

1 year later, I am still off and on trying this. I ended up verifying that my bit banging is working. I even verified that my RPi's radio transmitter is sending the signal(utilizing a usb radio receiver), however comparing my sunbeam remotes radio signal and the pickles that are supplied -- the signals a bit different.

I might trying pickling my own wav recordings of my sunbeam remote. Do you have a code or gist for pickling a .wav file?

noahjcorwin commented 4 years ago

if everything is working is the base supposed to beep the same as with the remote? I tried setting up with a pi zero w, but I am not having any luck. I don't have the equipment to verify an RF signal, but I did put a multimeter on GPIO17 and I see voltage pulses when issuing a command. Since they were only a $1 something I did buy two of the 418MHz transmitters but neither worked.

majikthys commented 4 years ago

You would hear a beep on power on/off. I would recommend replacing the radio module with an led to verify pin activity.

noahjcorwin commented 4 years ago

I suspect that anyone attempting to set this up will need to capture signals from their own remote to get this working.

what is required for capturing remote output?

IMG_3325 https://fccid.io/O38-L85KQR/User-Manual/User-Manual-666839.pdf

Q I bought two Mattress Pads for different bedrooms, and they don’t seem to be operating
correctly now.
®
A When you have two more Sunbeam wireless remote-controlled devices in a home, there is a
slight change their signals may interfere with each other. To solve this permanently, you can
easily reset one of the remote controls and base units so they communicate using a different
signal. Here’s how to do it:
1 Turn the remote control off.
2 Unplug its base unit from the wall, then replug it into the wall while the remote control is off.
3 Within two minutes, take the remote control and hold down “Preheat” and “Auto Off/Stays
On” simultaneously for three seconds, until a number appears on the display. Once the base
unit beeps, you may let go. The new settings will be remembered, even after a power failure
willgleich commented 4 years ago

I believe this device can capture - been meaning to purchase one and give this a try again.

https://www.amazon.com/RTL-SDR-Blog-RTL2832U-Software-Defined/dp/B011HVUEME/ref=sr_1_3?keywords=RTL-SDR&qid=1580268406&s=electronics&sr=1-3

majikthys commented 4 years ago

I believe this device can capture - been meaning to purchase one and give this a try again.

https://www.amazon.com/RTL-SDR-Blog-RTL2832U-Software-Defined/dp/B011HVUEME/ref=sr_1_3?keywords=RTL-SDR&qid=1580268406&s=electronics&sr=1-3

and some software https://wiki.gnuradio.org/index.php/Tutorials

majikthys commented 4 years ago

I suspect that anyone attempting to set this up will need to capture signals from their own remote to get this working.

Oh! How interesting.

Yes, you can do some analysis with SDR and GnuRadio. What you're going to want to do is decode the OOK ASK... I'll dig through my archives, I actually did some deeper analysis on my signal to understand the pattern but never published it. Perhaps with enough data points, we could actually create a universal app.

My instinct is that when you change the pair it's all on the radio side doing some sort of code rolling and initiation signal. I'd guess it's a header or something.

majikthys commented 4 years ago

Here's some more detail on how one can do similar OOK replay attacks with SDR. A bit stale, but Samy is very generous in his explanations: https://samy.pl/dingdong/

noahjcorwin commented 4 years ago

I've got my RTL-SDR stick, watched Samy's video, and captured a signal. However the waveform in Audacity doesn't look anything like from the video. I've read over the gnuradio stuff, but all beyond my expertise. Any further pointers would be great.

Screen Shot 2020-03-14 at 6 38 02 PM