{"id":27775810,"url":"https://github.com/ok-home/mhi_rmt_serial","last_synced_at":"2026-04-28T08:01:38.369Z","repository":{"id":289286023,"uuid":"969559035","full_name":"ok-home/mhi_rmt_serial","owner":"ok-home","description":"Simple exchange according to the MHI standard ( ESP32 )","archived":false,"fork":false,"pushed_at":"2025-04-29T03:31:27.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T04:57:09.794Z","etag":null,"topics":["esp32","mhi","rmt"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ok-home.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-20T12:32:03.000Z","updated_at":"2025-04-26T00:00:38.000Z","dependencies_parsed_at":"2025-04-22T14:51:43.251Z","dependency_job_id":null,"html_url":"https://github.com/ok-home/mhi_rmt_serial","commit_stats":null,"previous_names":["ok-home/mhi-rmt-serial","ok-home/mhi_rmt_serial"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ok-home%2Fmhi_rmt_serial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ok-home%2Fmhi_rmt_serial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ok-home%2Fmhi_rmt_serial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ok-home%2Fmhi_rmt_serial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ok-home","download_url":"https://codeload.github.com/ok-home/mhi_rmt_serial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644826,"owners_count":21620630,"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":["esp32","mhi","rmt"],"created_at":"2025-04-30T04:57:16.161Z","updated_at":"2026-04-28T08:01:38.365Z","avatar_url":"https://github.com/ok-home.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple exchange according to the MHI standard ( ESP32, ESP32S3, ESP32C3 )\n  - The discussion of the protocol can be found at the link https://community.openhab.org/t/mitsubishi-heavy-x-y-line-protocol/82898\n  - MHI - 16/29 byte in frame (max - 31 byte)\n  - MHI format according to doc/mhi.pdf\n  - CRC in the driver is not calculated\n## interface functions\n```\nesp_err_t mhi_init(gpio_num_t rx_pin, gpio_num_t tx_pin);   // init mhi/rmt task and queue\nesp_err_t mhi_deinit(void);                                 // deinit mhi/rmt task and queue\nvoid      mhi_tx_packet(mhi_packet_t *packet);              // send mhi packet ( return after all data transmitted )\nesp_err_t mhi_rx_packet(mhi_packet_t *packet, TickType_t wait_time); // receive mhi packet\nvoid      mhi_clear_rx_queue(void);                         // clear rx buffer\n```\n## transmit/receive data format\n```\ntypedef struct\n{\n    uint32_t packet_size; // sizeof raw_data 16/29/??? tx -\u003e out, rx-\u003ein\n    union\n    {\n        struct\n        {\n            uint16_t receiver_address;  // receiver_address\n\n            uint8_t on_off :1;          // 0-off, 1-on\n            uint8_t mode :6;            // 010101-Cooling only, 010111-Fan Only, 111001-Heating Only, 010001-Auto, 010011-Dehumidify\n            uint8_t unknovn :1;         // 1-default, 0-not seen\n\n            uint8_t fan_speed;          // 0x98 - level1, 0x99 - level2, 0x9a - level3, 0xaa - off\n            uint8_t target_temperature;  // (input-0x80)/2 \n            uint8_t unknovn_temperature; // ??\n\n            uint8_t db7;\n            uint8_t db8;\n            uint8_t db9;\n            uint8_t db10;\n            uint8_t db11;\n            uint8_t db12;\n            uint8_t db13;\n            uint8_t db14;\n            uint8_t db15;\n\n            uint8_t checksum;\n        };\n        uint8_t raw_data[31]; // Equivalent unsigned value for the mhi item \n    };\n} mhi_packet_t;\n```\n## connects as a standard ESP-IDF component\n## Simple example of use\n  - mhi_rmt_example/main/mhi_rmt_serial_example.c","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fok-home%2Fmhi_rmt_serial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fok-home%2Fmhi_rmt_serial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fok-home%2Fmhi_rmt_serial/lists"}