{"id":20563370,"url":"https://github.com/pilotak/homeassistant-mcp2221","last_synced_at":"2026-04-15T20:32:58.160Z","repository":{"id":215991815,"uuid":"740158440","full_name":"pilotak/homeassistant-mcp2221","owner":"pilotak","description":"Exposes GPIOs of MCP2221 to HomeAssistant","archived":false,"fork":false,"pushed_at":"2026-01-26T20:00:29.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-27T07:34:35.047Z","etag":null,"topics":["gpio","homeassistant","input","mcp2221","mcp2221a","output","proxmox","usb","usb-hid"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilotak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-07T17:38:35.000Z","updated_at":"2026-01-26T20:00:26.000Z","dependencies_parsed_at":"2026-01-26T22:01:51.962Z","dependency_job_id":null,"html_url":"https://github.com/pilotak/homeassistant-mcp2221","commit_stats":null,"previous_names":["pilotak/homeassistant-mcp2221"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pilotak/homeassistant-mcp2221","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fhomeassistant-mcp2221","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fhomeassistant-mcp2221/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fhomeassistant-mcp2221/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fhomeassistant-mcp2221/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilotak","download_url":"https://codeload.github.com/pilotak/homeassistant-mcp2221/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fhomeassistant-mcp2221/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31859432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gpio","homeassistant","input","mcp2221","mcp2221a","output","proxmox","usb","usb-hid"],"created_at":"2024-11-16T04:17:53.547Z","updated_at":"2026-04-15T20:32:58.128Z","avatar_url":"https://github.com/pilotak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./images/mcp2221_logo.svg \" alt=\"logo\"\u003e\n\u003c/p\u003e\n\n# HomeAssistant MCP2221 integration\n\n[![validate](https://github.com/pilotak/homeassistant-mcp2221/actions/workflows/validate.yaml/badge.svg)](https://github.com/pilotak/homeassistant-mcp2221/actions/workflows/validate.yaml)\n\nIntegration that adds missing GPIOs (input, output, ADC) to your NUC or Proxmox-based installation over USB.\n\n```yaml\n# Example configuration.yaml entry\nmcp2221:\n  - switches:\n      - name: \"Output 0\"\n        pin: 0\n        unique_id: out0\n      - name: \"Output 1\"\n        pin: 1\n        unique_id: out1\n    binary_sensors:\n      - name: \"Input 2\"\n        pin: 2\n        unique_id: in2\n        device_class: door\n      - name: \"Input 3\"\n        pin: 3\n        unique_id: in3\n        icon: mdi:electric-switch\n    # adc:\n    #   ref: 4.096\n    #   sensors:\n    #     - name: \"voltage\"\n    #       pin: 3\n    #       unique_id: adc3\n```\n\n## Install via [HACS](https://github.com/custom-components/hacs)\n\nYou can find this integration in the community store.\n\n[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=pilotak\u0026repository=homeassistant-mcp2221\u0026category=Integration)\n\n## Install manually\n\nYou need to copy the `mcp2221` folder from this repo to the `custom_components` folder in the root of your configuration. The file tree should look like this:\n\n```\n└── ...\n└── configuration.yaml\n└── custom_components\n    └── mcp2221\n        └── __init__.py\n        └── sensor.py\n        └── ...\n```\n\n\u003e **Note**: if the `custom_components` directory does not exist, you need to create it.\n\n### Full examples\n\n\u003cdetails\u003e\n\u003csummary\u003e1️⃣Switch (output) \u0026 multiple devices\u003c/summary\u003e\nYou can also specift multiple device, just adjust the index (`dev`) or even specify different PID/VID\n\n```yaml\nmcp2221:\n  - dev: 0\n    pid: 0x00DD\n    vid: 0x04D8\n    switches:\n      - name: \"Output 0\"\n        pin: 0\n        unique_id: output_0_0\n        icon: mdi:toggle-switch\n  - dev: 1\n    switches:\n      - name: \"Output 0\"\n        pin: 0\n        unique_id: output_1_0\n        icon: mdi:toggle-switch\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e2️⃣Binary sensor (input)\u003c/summary\u003e\n❗Don't leave pin floating\n\n```yaml\nmcp2221:\n  binary_sensors:\n    - name: \"Input 1\"\n      pin: 1\n      inverted: True\n      unique_id: input_0\n      icon: mdi:toggle-switch\n      scan_interval: 10\n      device_class: door\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e3️⃣Sensor (ADC)\u003c/summary\u003e\nOnly pins GP1-GP3, result is 10-bit (0-1023)\n\nYou can also adjust the result, example here is when power supply is 3.3V\n\n```yaml\nmcp2221:\n  adc:\n    ref: \"VDD\" # or 1.024, 2.048, 4.096\n    sensors:\n      - name: \"Battery voltage\"\n        pin: 3\n        unique_id: battery_voltage\n        scan_interval: 50\n        icon: mdi:car-battery\n        device_class: voltage\n        unit_of_measurement: V\n        value_template: \"{{ value * 3.3 / 1023}}\"\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fhomeassistant-mcp2221","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilotak%2Fhomeassistant-mcp2221","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fhomeassistant-mcp2221/lists"}