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