{"id":19305956,"url":"https://github.com/de-dh/tp65-receiver-mpy","last_synced_at":"2026-02-25T16:32:21.790Z","repository":{"id":261978993,"uuid":"885880812","full_name":"de-dh/TP65-receiver-mpy","owner":"de-dh","description":"Receive temperature data with MicroPython from ThermoPro TP65s temperature sensor for microcontrollers.","archived":false,"fork":false,"pushed_at":"2025-03-24T18:41:50.000Z","size":254,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T19:29:21.270Z","etag":null,"topics":["433mhz","433mhz-module","esp32","microcontroller","micropython","rpi-pico","rx470","temperature-sensor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/de-dh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T16:30:35.000Z","updated_at":"2025-03-24T18:41:53.000Z","dependencies_parsed_at":"2024-11-09T17:38:27.192Z","dependency_job_id":"e321b24d-686e-41b6-b192-d73fca90242f","html_url":"https://github.com/de-dh/TP65-receiver-mpy","commit_stats":null,"previous_names":["de-dh/tp65-receiver-mpy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-dh%2FTP65-receiver-mpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-dh%2FTP65-receiver-mpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-dh%2FTP65-receiver-mpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/de-dh%2FTP65-receiver-mpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/de-dh","download_url":"https://codeload.github.com/de-dh/TP65-receiver-mpy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249768080,"owners_count":21322879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["433mhz","433mhz-module","esp32","microcontroller","micropython","rpi-pico","rx470","temperature-sensor"],"created_at":"2024-11-10T00:03:25.713Z","updated_at":"2026-02-25T16:32:21.760Z","avatar_url":"https://github.com/de-dh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TP65S-receiver-mpy\n\n## Description\n\n\u003e [!TIP]\n\u003e I recommend [these steps](https://github.com/de-dh/MPY-RF) to optimize reception if you are using a RX470C RF receiver module.\n\u003e Other receivers were not tested.\n\n\n\u003cimg align=\"right\" src=\"img/TP.jpg\" width=\"250\" height=\"auto\" /\u003e\n\nReceive temperature data with MicroPython from ThermoPro TP65s outdoor temperature sensor with the RX470C-V01 module.\nThe RX470C-V01 module is a low cost (~2 €) 433 MHz receiver for use with microcontrollers (MCUs).\n\n\nThe program was tested on a Raspberry Pi Pico and on an Esp32-WROVER-B running MicroPython v1.23.0.\n\n## Changelog\n\nChanges in V2:\n- Changing source address of the transmitter during reset is taken into account. I think it is generated by a LFSR.\n- Channel is detected (Ch. 1 - 3).\n- Data from a second, temperature transmitter (unknown brand) with a similar protocol can be received.\n\nTo Do:\n- Identify low-power indicator bit of the transmitter. A battery charge lasts over a year so I couldn't identify it yet.\n\n\n## Hardware Setup\nThe RX470C-V01 module (RX) only needs one GPIO pin for data transmission.\nIt can be supplied with either 5V or 3.3V.\nRX has two identical digital output (DO) pins, either of them may be used.\n\u003cimg align=\"right\" src=\"img/Setup.jpg\" width=\"250\" height=\"auto\" /\u003e\n\nExemplary connections:\n- RX_GND --\u003e MCU_GND\n- RX_VCC --\u003e MCU_3V3\n- RX_DO  --\u003e MCU_GPIO14\n\n\n## Decoding the RF Protocol of the ThermoPro Temperature Sensor\nA HackRF and UniversalRadioHacker were used to analyze the RF protocol of the outdoor temperature sensor.\nThe outdoor temperature sensor periodically transmitts temperature data to the indoor base station using on-off-keying (OOK) on the 433 MHz band.\n\nData is encoded similar to a morse encoding with alternating high and low pulses. \nHigh pulses have fixed durations of ~500 µs followed by low pulses with durations of either 2000 µs or 4000 µs, encoding 0 and 1, respectively.\nA transmission is repeated six times seperated by a 8800 µs gap low pulse between each data transmission.\nData is transmitted periodically every 50s.\n\nEach message consists of 37 high and low pulses + gap:\n- Bit 01 - 14: Transmitter Address (probably LFSR generated)\n- Bit 15 - 16: Channel No (1 - 3)\n- Bit 17 - 28: Data = 12 Bit\n- Bit 29 - 37: End Sequence = '000000011' + gap\n\n\nDecoding the data:\n- Data is encoded in the [two's complement format](https://en.wikipedia.org/wiki/Two%27s_complement) consisting of 12 bit. The decoded integer must be divided by ten to obtain the temperature.\n- Temperaturs above 0 °C: Convert binary data to decimal number and divide by 10.\n    - E. g. `'000010100110' --\u003e 166 --\u003e 16,6 °C`\n- Temperature below 0 °C: Convert binary data to decimal number, subtract 4096 (2^12) and divide by 10.\n    - E. g. `'111110111100' --\u003e 4028 --\u003e  4028 - 4096 = -68 --\u003e -6,8°C`\n\n\nThe figure shows measured signals of the outoor sensor at different temperatures and the received binary data.\n\n\u003cimg src=\"img/TP_Protocol_Analysis_Edited.png\" width=\"800\" height=\"auto\" /\u003e\n\n## Acknowledgement\nParts of the signal decoding function are based on Peter Hinch's [micropython_remote](https://github.com/peterhinch/micropython_remote) RX class provided under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-dh%2Ftp65-receiver-mpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fde-dh%2Ftp65-receiver-mpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fde-dh%2Ftp65-receiver-mpy/lists"}