my_sensors v0.1.0-rc2 MySensors.Packet

MySensors packet.

Shaped like: 1;2;3;4;5;6 -

  • 1 Packet node_id - Destination node for packet.

    • 0 Will always be the Gateway.
    • 255 is broadcast.
  • 2 Packet sensor_id - Sensor on a particular node.

    • 0 is reserved.
    • 255 is the node_type (ARDUINO_NODE | ARDUINO_REPEATER_NODE)
  • 3 Packet command

    • PRESENTATION
    • SET
    • REQ
    • INTERNAL
    • STREAM
  • 4 Packet ACK

    • 1 is ACK
    • 0 is NOACK
  • 5 Packet type

    • Varies based on Packet Command.
  • 6 Payload

Link to this section Summary

Functions

Parse a packet command

Parse a packet type based on a command

Link to this section Types

Link to this type ack()
ack() :: atom()
Link to this type child_sensor_id()
child_sensor_id() :: integer()
Link to this type command()
command() :: atom()
Link to this type node_id()
node_id() :: integer()
Link to this type payload()
payload() :: binary()
Link to this type t()
t() :: %MySensors.Packet{ack: ack(), child_sensor_id: child_sensor_id(), command: command(), node_id: node_id(), payload: payload(), type: type()}

MySensors packet

Link to this type type()
type() :: atom()

Link to this section Functions

Parse a packet command.

Parse a packet type based on a command.