circuitmatter ============= .. py:module:: circuitmatter .. autoapi-nested-parse:: Pure Python implementation of the Matter IOT protocol. Subpackages ----------- .. toctree:: :maxdepth: 1 /autoapi/circuitmatter/clusters/index /autoapi/circuitmatter/device_types/index /autoapi/circuitmatter/utility/index Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/circuitmatter/case/index /autoapi/circuitmatter/certificates/index /autoapi/circuitmatter/crypto/index /autoapi/circuitmatter/data_model/index /autoapi/circuitmatter/exchange/index /autoapi/circuitmatter/interaction_model/index /autoapi/circuitmatter/message/index /autoapi/circuitmatter/nonvolatile/index /autoapi/circuitmatter/pase/index /autoapi/circuitmatter/protocol/index /autoapi/circuitmatter/session/index /autoapi/circuitmatter/subscription/index /autoapi/circuitmatter/tlv/index Attributes ---------- .. autoapisummary:: circuitmatter.__version__ Classes ------- .. autoapisummary:: circuitmatter.RootNode circuitmatter.Message circuitmatter.InteractionModelOpcode circuitmatter.ProtocolId circuitmatter.SecureProtocolOpcode circuitmatter.Subscription circuitmatter.CircuitMatter Package Contents ---------------- .. py:class:: RootNode(random_source, mdns_server, port, vendor_id, product_id, version='', serial_number='1234') Bases: :py:obj:`circuitmatter.device_types.simple_device.SimpleDevice` Helper class that provides a standard way to create an ABC using inheritance. .. py:attribute:: DEVICE_TYPE_ID :value: 17 .. py:attribute:: REVISION :value: 2 .. py:attribute:: basic_info .. py:attribute:: vendor_id .. py:attribute:: product_id .. py:attribute:: product_name :value: 'CircuitMatter' .. py:attribute:: serial_number .. py:attribute:: software_version_string .. py:attribute:: access_control .. py:attribute:: group_keys .. py:attribute:: network_info .. py:attribute:: feature_map .. py:attribute:: ethernet .. py:attribute:: NetworkID :value: b'enp13s0' .. py:attribute:: Connected :value: True .. py:attribute:: networks .. py:attribute:: scan_max_time_seconds :value: 10 .. py:attribute:: connect_max_time_seconds :value: 10 .. py:attribute:: supported_wifi_bands .. py:attribute:: last_network_status .. py:attribute:: last_network_id .. py:attribute:: general_commissioning .. py:attribute:: noc .. py:attribute:: general_diagnostics .. py:attribute:: user_label .. py:property:: fabric_count .. py:attribute:: name .. py:attribute:: servers :value: [] .. py:attribute:: descriptor .. py:attribute:: device_types :value: [] .. py:attribute:: DeviceTypeList .. py:attribute:: PartsList :value: [] .. py:attribute:: ServerList :value: [] .. py:attribute:: ClientList :value: [] .. py:attribute:: binding .. py:method:: restore(nonvolatile) Restore device state from the nonvolatile dictionary and hang onto it for any updates. .. py:attribute:: __slots__ :value: () .. py:class:: Message .. py:attribute:: buffer :value: None .. py:method:: clear() .. py:method:: parse_protocol_header() .. py:method:: decode(buffer) .. py:method:: encode_into(buffer, cipher=None) .. py:method:: __str__() .. py:class:: InteractionModelOpcode Bases: :py:obj:`enum.IntEnum` Enum where members are also (and must be) ints .. py:attribute:: STATUS_RESPONSE :value: 1 .. py:attribute:: READ_REQUEST :value: 2 .. py:attribute:: SUBSCRIBE_REQUEST :value: 3 .. py:attribute:: SUBSCRIBE_RESPONSE :value: 4 .. py:attribute:: REPORT_DATA :value: 5 .. py:attribute:: WRITE_REQUEST :value: 6 .. py:attribute:: WRITE_RESPONSE :value: 7 .. py:attribute:: INVOKE_REQUEST :value: 8 .. py:attribute:: INVOKE_RESPONSE :value: 9 .. py:attribute:: TIMED_REQUEST :value: 10 .. py:class:: ProtocolId Bases: :py:obj:`enum.IntEnum` Enum where members are also (and must be) ints .. py:attribute:: SECURE_CHANNEL :value: 0 .. py:attribute:: INTERACTION_MODEL :value: 1 .. py:attribute:: BDX :value: 2 .. py:attribute:: USER_DIRECTED_COMMISSIONING :value: 3 .. py:attribute:: FOR_TESTING :value: 4 .. py:method:: ProtocolOpcode(opcode_id: int) .. py:class:: SecureProtocolOpcode Bases: :py:obj:`enum.IntEnum` Enum where members are also (and must be) ints .. py:attribute:: MSG_COUNTER_SYNC_REQ :value: 0 The Message Counter Synchronization Request message queries the current message counter from a peer to bootstrap replay protection. .. py:attribute:: MSG_COUNTER_SYNC_RSP :value: 1 The Message Counter Synchronization Response message provides the current message counter from a peer to bootstrap replay protection. .. py:attribute:: MRP_STANDALONE_ACK :value: 16 This message is dedicated for the purpose of sending a stand-alone acknowledgement when there is no other data message available to piggyback an acknowledgement on top of. .. py:attribute:: PBKDF_PARAM_REQUEST :value: 32 The request for PBKDF parameters necessary to complete the PASE protocol. .. py:attribute:: PBKDF_PARAM_RESPONSE :value: 33 The PBKDF parameters sent in response to PBKDF-ParamRequest during the PASE protocol. .. py:attribute:: PASE_PAKE1 :value: 34 The first PAKE message of the PASE protocol. .. py:attribute:: PASE_PAKE2 :value: 35 The second PAKE message of the PASE protocol. .. py:attribute:: PASE_PAKE3 :value: 36 The third PAKE message of the PASE protocol. .. py:attribute:: CASE_SIGMA1 :value: 48 The first message of the CASE protocol. .. py:attribute:: CASE_SIGMA2 :value: 49 The second message of the CASE protocol. .. py:attribute:: CASE_SIGMA3 :value: 50 The third message of the CASE protocol. .. py:attribute:: CASE_SIGMA2_RESUME :value: 51 The second resumption message of the CASE protocol. .. py:attribute:: STATUS_REPORT :value: 64 The Status Report message encodes the result of an operation in the Secure Channel as well as other protocols. .. py:attribute:: ICD_CHECK_IN :value: 80 The Check-in message notifies a client that the ICD is available for communication. .. py:class:: Subscription(_id, session, min_interval, max_interval) .. py:attribute:: id .. py:attribute:: active :value: True .. py:method:: send_reports(exchange=None) .. py:method:: append_report(report) .. py:method:: ack_report() .. py:data:: __version__ :value: '0.0.0+auto.0' .. py:class:: CircuitMatter(socketpool=None, mdns_server=None, random_source=None, state_filename='matter-device-state.json', vendor_id=65524, product_id=4660, product_name='CircuitMatter Device') .. py:attribute:: socketpool .. py:attribute:: mdns_server .. py:attribute:: random .. py:attribute:: state_file .. py:attribute:: nonvolatile .. py:attribute:: packet_buffer .. py:attribute:: UDP_IP :value: '::' .. py:attribute:: UDP_PORT :value: 5541 .. py:attribute:: socket .. py:attribute:: root_node .. py:attribute:: vendor_id .. py:attribute:: product_id .. py:attribute:: manager .. py:method:: start_commissioning() .. py:method:: add_cluster(endpoint, cluster) .. py:method:: add_device(device) .. py:method:: process_packets() .. py:method:: get_report(context, cluster, path, subscription=None) .. py:method:: invoke(session, cluster, path, fields, command_ref) .. py:method:: read_attribute_path(context, path, subscription=None) .. py:method:: process_packet(address, data)