adpeace / thermostat

Control for Danfoss TP7000 and similar thermostats/RX receiver
https://andyhacks.com
MIT License
14 stars 5 forks source link

Question regarding receiver #1

Closed mihai-dinculescu closed 4 years ago

mihai-dinculescu commented 4 years ago

Thank you very much for this. It has inspired me to attempt to build something similar using Micro/Circuit Python.

Do you happen to know if Adafruit Feather M0 RFM69 Packet Radio 433 MHz would be able to receive signals sent by a Danfoss TP5001 thermostat?

adpeace commented 4 years ago

I don't know for sure if that will work as I don't have either of those components. However, I would guess the Adafruit device may work as it uses the RFM69 radio module, which is the same as used in the JeeLink device I'm using in my setup. As it's a different microcontroller I'm not sure what the firmware would look like, this is something you'd have to investigate.

I've also not looked at the TP5001 but if you're looking at controlling your system rather than listening to the existing thermostats then it's the receiver that matters. If you have an RX1/2/3 then that would work fine.

mihai-dinculescu commented 4 years ago

Hello,

After a few days of banging my head against a wall, I've finally managed to get your example to work on my RFM69HW module! My struggles were totally my fault though and I definitely couldn't have made it work without this awesome repo! Thank you!

I've noticed something weird about the decode part. Here's a debug log:

Message:
24 96 DB 65 B6 D9 25 B2 5B 65 96 59 6C B6 CB 2C 92 D9 24 96 DB 65 B6 D9 25 B2 5B
Decoded:
0F BE 33 AA DD 46 0F BE 33
Extra bit removed:
0F BE 33 55 BA 8C 1F 7C 66

As you can see, my received message has no extra bit it. With the code that's supposed to takes it out, validation fails.

Here's the pieces that I had to remove:

        /* Second half of message is repeated but with extra bit in:
         * get rid of it so we should have two identical messages: */
        for (i = 3; i < 9; i++) {
            decoded[i] = decoded[i] << 1;
            if (i < 8)
                decoded[i] |= decoded[i + 1] >> 7;
        }