Skip to content

muart-group/itp-packet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

itp-packet

Packet parsing, generation, and utilities for the ITP protocol.

Originally extracted from the Mitsubishi ITP ESPHome component, this library's goal is to abstract the handling of ITP packets' inner workings and quirks to allow components to focus on the high-level meaning of each packet (i.e. providing functions and enums instead of requiring direct byte manipulation).

Usage

In the Mitsubishi ITP ESPHome component this library is primarily used by:

  • Using the RawPacket constructor to create a RawPacket from an array of bytes.
  • Using specific Packet constructors to wrap the RawPacket with useful functions.
  • Implementing the PacketProcessor interface to easily handle incoming packets.

Including

To include in your custom component, you can use:

async def to_code(config):
    cg.add_library(
        name="itp-packet",
        repository="https://github.com/muart-group/itp-packet.git",
        version="main"
    )

To include in your config from the GitHub repo, use:

esphome:
  ...
  libraries:
    - itp-packet=https://github.com/muart-group/itp-packet.git#main

For local development you can include the path to this repo locally using ESPHome config:

esphome:
  ...
  libraries:
    - itp-packet=file:///workspaces/itp-packet

About

Packet parsing, generation, and utilities for the ITP protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published