Updates MdnsDiscovery class and affected test scripts to address issues (#39737) * updates mdns class * restyled * restyled * lint * restyled * address pr comments * restyled * fix get_txt_from_dns_record, adds temp logging for troubleshooting * restyled * Adds/improves logging * restores zeroconf instance to IPv6 only * updates txt data cache mechanism * restyled * lint * adjust logging * adjust logging * refactor, update class * updates record by type logic * restyled * restyled * update * restyled * restyled * restyled * removes unused fn * lint * updates _query_service_info * removes commented line * disable verbose loging * test ci * adds get_ptr_records fn, cleanups, updates * restyled * restores run1 in CI * updates unlock_service defaults * updates quada record handling * restyled * restyled * logging * cleanup, typos * sets ipv6 only * updates mdns class * updates mdns class * udjusts discovery timeout * removes unused fn * renames unlock_service param * refactors data class usage * Restyled by autopep8 * Restyled by isort * removes unused fn * refactor into own files * Restyled by isort * adds clarification comments to MdnsAsyncServiceInfo class * Update src/python_testing/mdns_discovery/mdns_discovery.py Co-authored-by: C Freeman <cecille@google.com> * updates script discovery timeout * Restyled by autopep8 * fixes only querying one record type when multiple have been setup * slight refactor * adds discovery silence monitor * Restyled by isort * fixes outgoing questions setup * enhances ptr record class exception handling * refactor / updates descriptions * fixes _on_service_state_change _last_discovery_time, updates _get_service * updates tc_cadmin 1.5 per mdns class updates * removes unnecesary class attr, updates class docstring * updates cadmin support per mdns class updates * Restyled by autopep8 * updates requirements txt * updates requirements txt * updates requirements txt * updates req * updates req * refactor/reuse * completes dns map * refactor * swap netifaces for ifaddr * Restyled by autopep8 * fix _discovery fn * adds controlled parallel queries to _discover when query_service is True * grammar * makes _discover "public", discover * fix _query_service_info * Restyled by autopep8 * Restyled by isort * lint * improve imports * Restyled by isort * midway * updates get_operational_services and affected scripts * removes comment * removes _name_filter from mdns class * updates matter service type getter functions * updates mdns docstring, removes unused fn * removes _verbose logging but keeps useful logging * removes verbose logging fro mdns class init * removes unused param * updates mdns class and tests * updates script * restyled/lint * comments cleanup/fix * mdns class doc progress * Restyled by prettier-markdown * completes documentation * Restyled by prettier-markdown * readme fix * readme update * Restyled by prettier-markdown * updates get quada and ptr return sig/type * relocates get_all_service_types * updates init docstring * renames fn to get_host_ipv6_addresses, adds docstring * fix return types * removes double dot from readme * Update src/python_testing/mdns_discovery/utils/net_utils.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/python_testing/mdns_discovery/mdns_discovery.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/python_testing/mdns_discovery/mdns_discovery.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * removes self._azc * updates TC_CADMIN_1_15 * remove self._event.set() from _query_service_info * Restyled by autopep8 * Restyled by isort * lint * adds section to mdns readme [Zeroconf components used by the MdnsDiscovery class] * updates wordlist * restyled * restyled * restyled * handle instance name when subtype * Refactor async_request: improve fresh mDNS queries, clarify timeouts, improve retry logic * updates sc 4.3 script * increase async_request initial delay * use zerconf's dns map * cleanup * Restyled by autopep8 * Restyled by isort * one last comment (maybe) * renames server to hostname in MdnsServiceInfo class for better spec naming convention alignment * renames txt_record to txt in MdnsServiceInfo class * restyled * updates doc * restyled * adds asserts util to mdns project * adds mdns asserts * Restyled by autopep8 * Restyled by isort * updates assert_valid_d_key, and asserts docstrings * Update src/python_testing/mdns_discovery/mdns_async_service_info.py Co-authored-by: C Freeman <cecille@google.com> * adds wait_for_service_update * adds clarifying comments to quada_record class * Restyled by autopep8 * Restyled by isort * updates mdns asserts * updates wordlist and readme * renames data_clases folder * removes ":" check * adds raise to wait_for_service_update * added log clarifying comment * updated state change event logic * renames to timeout_ms in async_request, question_type change to Optional * udpates to _LISTENER_TIME_MS * Update src/python_testing/mdns_discovery/data_clases/quada_record.py Co-authored-by: Andrei Litvin <andy314@gmail.com> * typo IPv6Address * renames to AaaaRecord * Restyled by autopep8 * Restyled by isort * updates server to hostname in addr resolver * IPv6Address to string * adds clarifying comment on ServiceInfo inherited props * updates mdns service info class to use property fields * Restyled by autopep8 * Restyled by isort * lint * renames net_utils.py to network.py * removes re-assignment in MdnsAsyncServiceInfo * updates AddressResolverIPv6 init to only pass server=hostname * renames now to now_ms * Restyled by autopep8 --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: C Freeman <cecille@google.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Andrei Litvin <andy314@gmail.com>
Builds
Tests
Tools
Documentation
Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
Matter is a unified, open-source application-layer connectivity standard built to enable developers and device manufacturers to connect and build reliable, and secure ecosystems and increase compatibility among connected home devices. It is built with market-proven technologies using Internet Protocol (IP) and is compatible with Thread and Wi-Fi network transports. Matter was developed by a Working Group within the Connectivity Standards Alliance (Alliance). This Working Group develops and promotes the adoption of the Matter standard, a royalty-free connectivity standard to increase compatibility among smart home products, with security as a fundamental design tenet. The vision that led major industry players to come together to build Matter is that smart connectivity should be simple, reliable, and interoperable.
Matter simplifies development for manufacturers and increases compatibility for consumers.
The standard was built around a shared belief that smart home devices should be secure, reliable, and seamless to use. By building upon Internet Protocol (IP), Matter enables communication across smart home devices, mobile apps, and cloud services and defines a specific set of IP-based networking technologies for device certification.
The Matter specification details everything necessary to implement a Matter application and transport layer stack. It is intended to be used by implementers as a complete specification.
The Alliance officially opened the Matter Working Group on January 17, 2020, and the specification is available for adoption now.
Visit buildwithmatter.com to learn more and read the latest news and updates about the project.
Matter is developed with the following goals and principles in mind:
Unifying: Matter is built with and on top of market-tested, existing technologies.
Interoperable: The specification permits communication between any Matter-certified device, subject to users’ permission.
Secure: The specification leverages modern security practices and protocols.
User Control: The end user controls authorization for interaction with devices.
Federated: No single entity serves as a throttle or a single point of failure for root of trust.
Robust: The set of protocols specifies a complete lifecycle of a device — starting with the seamless out-of-box experience, through operational protocols, to device and system management specifications required for proper function in the presence of change.
Low Overhead: The protocols are practically implementable on low compute-resource devices, such as MCUs.
Pervasive: The protocols are broadly deployable and accessible, by leveraging IP and being implementable on low-capability devices.
Ecosystem-Flexible: The protocol is flexible enough to accommodate deployment in ecosystems with differing policies.
Easy to Use: The protocol provides smooth, cohesive, integrated provisioning and out-of-box experience.
Open: The Project’s design and technical processes are open and transparent to the general public, including non-members wherever possible.
Matter aims to build a universal IPv6-based communication protocol for smart home devices. The protocol defines the application layer that will be deployed on devices and the different link layers to help maintain interoperability. The following diagram illustrates the normal operational mode of the stack:
The architecture is divided into layers to help separate the different responsibilities and introduce a good level of encapsulation among the various pieces of the protocol stack. The vast majority of interactions flow through the stack captured in the following Figure:
Security: An encoded action frame is then sent down to the Security Layer to encrypt and sign the payload to ensure that data is secured and authenticated by both sender and receiver of a packet.
Message Framing & Routing: With an interaction encrypted and signed, the Message Layer constructs the payload format with required and optional header fields; which specify the message's properties and some routing information.
Matter’s design and technical processes are intended to be open and transparent to the general public, including to Working Group non-members wherever possible. The availability of this GitHub repository and its source code under an Apache v2 license is an important and demonstrable step to achieving this commitment. Matter endeavors to bring together the best aspects of market-tested technologies and redeploy them as a unified and cohesive whole-system solution. The overall goal of this approach is to bring the benefits of Matter to consumers and manufacturers as quickly as possible. As a result, what you observe in this repository is an implementation-first approach to the technical specification, vetting integrations in practice. The Matter repository is growing and evolving to implement the overall architecture. The repository currently contains the security foundations, message framing and dispatch, and an implementation of the interaction model and data model. The code examples show simple interactions, and are supported on multiple transports -- Wi-Fi and Thread -- starting with resource-constrained (i.e., memory, processing) silicon platforms to help ensure Matter’s scalability.
We welcome your contributions to Matter. Read our contribution guidelines here.
Instructions about how to build Matter can be found here .
The Matter repository is structured as follows:
| File/Folder | Content |
|---|---|
| build | Build system support content and built output directories |
| build_overrides | Build system parameter customization for different platforms |
| config | Project configurations |
| credentials | Development and test credentials |
| docs | Documentation, including guides. Visit the Matter SDK documentation page to read it. |
| examples | Example firmware applications that demonstrate use of Matter |
| integrations | 3rd party integrations |
| scripts | Scripts needed to work with the Matter repository |
| src | Implementation of Matter |
| third_party | 3rd party code used by Matter |
| zzz_generated | ZAP generated template code - Revolving around cluster information |
| BUILD.gn | Build file for the GN build system |
| CODE_OF_CONDUCT.md | Code of conduct for Matter and contribution to it |
| CONTRIBUTING.md | Guidelines for contributing to Matter |
| LICENSE | Matter license file |
| REVIEWERS.md | PR reviewers |
| gn_build.sh | Build script for specific projects such as Android, EFR32, etc. |
| README.md | This file |
Matter is released under the Apache 2.0 license.