Cover image
Try Now
2025-03-13

Implémentation MCP23017 pour l'assistant à domicile (ThreadSafe, LAFENCE DU CORRE

3 years

Works with Finder

4

Github Watches

8

Github Forks

19

Github Stars

HA-mcp23017

MCP23008/MCP23017 implementation for Home Assistant (HA)

Highlights of what it does offer

  • Async implementation (more reactive and nicer to HA)
  • Thread-safety allows different entities to use the same component
  • Config Flow support (UI configuration) in addition to legacy configuration.yaml.
  • Push iso pull model for higher reactivity, e.g. 100ms polling for 'zero-delay' push button without loading HA.
  • Optimized i2c bus bandwidth utilisation
    • Polling per device instead of per entity/8x gain, register cache to avoid read-modify-write/3xgain or rewriting the same register value)
  • Synchronization with the device state at startup, e.g. avoid output glitches when HA restart.
  • Compatible with MCP23008 device (8 pins variant).
  • Support of multiple I2C busses.

Installation

1. Add this MCP23017 integration to HA

  • Using HACS
  • Or by updating manually your custom_components folder
    • Clone or download this repository
    • Move custom_components/mcp23017 to your <ha_configuration_folder>, e.g. /home/homeassistant/.homeassistant/custom_components/mcp23017
    • Restart HA and clear browser cache (or restart a browser); latter is required for new config_flow to show up

2. Add your mcp23017 component(s) using either:

  • config flow (Configuration->Integrations->Add integration)
    • Created entities will be visible in the Integrations tab and aggregated per device (i2c address) in the Devices tab.
    • Entity parameters (invert logic, pull-up, ...) can be adapted individually by using the entity's Options button once created.
  • configuration.yaml see configuration example below.
    • Syntax is compatible with the now defunct core implementation (removed by https://github.com/home-assistant/core/pull/67281)
      • New hw_sync option allowing to either synchronize initial value of the switch with the hardware (true, default option) or to set it to a fixed value (false, value=invert_logic)
    • Entity parameters (invert logic, pull-up, ...) can only be set globally for all pins of a given device/integration.

Example entry for configuration.yaml:

# Example configuration.yaml

binary_sensor:
  - platform: mcp23017
    i2c_bus: 1 # Can be omitted as the default value for I2C is set to 1.
    i2c_address: 0x26
    pins:
      8 : Button_0
      9 : Button_1
      10: Button_2
      11: Button_3
  - platform: mcp23017
    i2c_address: 0x27
    invert_logic: true
    pins:
      8: Button_4
      9: Button_5
      10: Button_6
      11: Button_7

switch:
  - platform: mcp23017
    i2c_bus: 2
    i2c_address: 0x26
    pins:
      0 : Output_0
      1 : Output_1
      2 : Output_2
      3 : Output_3
  - platform: mcp23017
    i2c_bus: 2
    i2c_address: 0x27
    hw_sync: false
    pins:
      0 : Output_4
      1 : Output_5
      2 : Output_6
      3 : Output_7

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • Mintplex-Labs
  • L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.

  • appcypher
  • Serveurs MCP géniaux - une liste organisée de serveurs de protocole de contexte de modèle

    Reviews

    2 (1)
    Avatar
    user_lOdLOaGT
    2025-04-17

    The HA-mcp23017 by jpcornil-git is an outstanding component for home automation projects. The integration with the Home Assistant platform is seamless, and the extensive documentation on the GitHub page ensures even beginners can utilize its full potential. Highly recommend for anyone looking to expand their GPIO capabilities effortlessly!