Allows to connect to a Meshtastic device over HTTP(S)

Hierarchy

Constructors

Properties

abortController: AbortController
configId: number

Randomly generated number to ensure confiuration lockstep

connType: string

Defines the connection type as http

deviceStatus: DeviceStatusEnum

Describes the current state of the device

isConfigured: boolean

Describes the current state of the device

log: Logger<unknown>

Logs to the console and the logging event emitter

pendingSettingsChanges: boolean

Are there any settings that have yet to be applied?

peningRequest: boolean
queue: Queue

Keeps track of all requests sent to the radio that have callbacks TODO: Update description

readLoop: null | Timer
receiveBatchRequests: boolean

Enables receiving messages all at once, versus one per request

url: string

URL of the device that is to be connected to.

Events

onAtakPacket: SubEvent<AtakPacket> = ...

Fires when a new MeshPacket message containing a ATAK packet has been received from device

onAtakPacket

onChannelPacket: SubEvent<ChannelPacket> = ...

Fires when a new Channel message is recieved

onChannelPacket

onConfigPacket: SubEvent<ConfigPacket> = ...

Fires when a new Config message is recieved

onConfigPacket

onDeviceDebugLog: SubEvent<Uint8Array> = ...

Outputs any debug log data (currently serial connections only)

onDeviceDebugLog

onDeviceMetadataPacket: SubEvent<DeviceMetadataPacket> = ...

Fires when the device receives a Metadata packet

onDeviceMetadataPacket

onDeviceStatus: SubEvent<DeviceStatusEnum> = ...

Fires when the devices connection or configuration status changes

onDeviceStatus

onFromRadio: SubEvent<Protobuf.FromRadio> = ...

Fires when a new FromRadio message has been received from the device

onFromRadio

onIpTunnelPacket: SubEvent<IpTunnelPacket> = ...

Fires when a new MeshPacket message containing a IP Tunnel packet has been received from device

onIpTunnelPacket

onLogEvent: SubEvent<LogEventPacket> = ...

Fires when a new FromRadio message has been received from the device

onLogEvent

onLogRecord: SubEvent<Protobuf.LogRecord> = ...

Fires when a new FromRadio message containing a LogRecord packet has been received from device

onLogRecord

onMeshHeartbeat: SubEvent<Date> = ...

Fires when the device receives a meshPacket, returns a timestamp

onMeshHeartbeat

onMeshPacket: SubEvent<Protobuf.MeshPacket> = ...

Fires when a new FromRadio message containing a Data packet has been received from the device

onMeshPacket

onMessagePacket: SubEvent<MessagePacket> = ...

Fires when a new MeshPacket message containing a Text packet has been received from device

onMessagePacket

onModuleConfigPacket: SubEvent<ModuleConfigPacket> = ...

Fires when a new ModuleConfig message is recieved

onModuleConfigPacket

onMyNodeInfo: SubEvent<Protobuf.MyNodeInfo> = ...

Fires when a new MyNodeInfo message has been received from the device

onMyNodeInfo

onNodeInfoPacket: SubEvent<NodeInfoPacket> = ...

Fires when a new MeshPacket message containing a NodeInfo packet has been received from device

onNodeInfoPacket

onPingPacket: SubEvent<PingPacket> = ...

Fires when a new MeshPacket message containing a Ping packet has been received from device

onPingPacket

onPositionPacket: SubEvent<PositionPacket> = ...

Fires when a new MeshPacket message containing a Position packet has been received from device

onPositionPacket

onPrivatePacket: SubEvent<PrivatePacket> = ...

Fires when a new MeshPacket message containing a Private packet has been received from device

onPrivatePacket

onRangeTestPacket: SubEvent<RangeTestPacket> = ...

Fires when a new MeshPacket message containing a Store and Forward packet has been received from device

onRangeTestPacket

onRemoteHardwarePacket: SubEvent<RemoteHardwarePacket> = ...

Fires when a new MeshPacket message containing a Remote Hardware packet has been received from device

onRemoteHardwarePacket

onRoutingPacket: SubEvent<RoutingPacket> = ...

Fires when a new MeshPacket message containing a Routing packet has been received from device

onRoutingPacket

onSerialPacket: SubEvent<SerialPacket> = ...

Fires when a new MeshPacket message containing a Serial packet has been received from device

onSerialPacket

onStoreForwardPacket: SubEvent<StoreForwardPacket> = ...

Fires when a new MeshPacket message containing a Store and Forward packet has been received from device

onStoreForwardPacket

onTelemetryPacket: SubEvent<TelemetryPacket> = ...

Fires when a new MeshPacket message containing a Telemetry packet has been received from device

onTelemetryPacket

onUserPacket: SubEvent<UserPacket> = ...

Fires when a new MeshPacket message containing a User packet has been received from device

onUserPacket

onWaypointPacket: SubEvent<WaypointPacket> = ...

Fires when a new MeshPacket message containing a Waypoint packet has been received from device

onWaypointPacket

Methods

  • Completes all SubEvents

    Returns void

  • Triggers the device configure process

    Returns void

  • Confirms the currently set channels, and prevents changes from reverting after 10 minutes.

    Parameters

    Returns Promise<void>

  • Confirms the currently set config, and prevents changes from reverting after 10 minutes.

    Parameters

    • Optional callback: confirmSetConfigProps

      If wantAck is true, callback is called when the ack is received

    Returns Promise<void>

  • Disconnects from the Meshtastic device

    Returns void

  • Gets devices Owner

    Parameters

    • Optional callback: getOwnerProps

      If wantAck is true, callback is called when the ack is received

    Returns Promise<void>

  • Pings device to check if it is avaliable

    Returns Promise<boolean>

  • Reads any avaliable protobuf messages from the radio

    Returns Promise<void>

  • Resets the internal NodeDB of the radio, usefull for removing old nodes that no longer exist.

    Parameters

    • Optional callback: resetPeersProps

      If wantAck is true, callback is called when the ack is received

    Returns Promise<void>

  • Sends raw packet over the radio

    Parameters

    Returns Promise<void>

  • Sends a text over the radio

    Returns

    Parameters

    Returns Promise<void>

  • Sends supplied protobuf message to the radio

    Parameters

    • data: Uint8Array

      Raw bytes to send

    Returns Promise<void>

Generated using TypeDoc