Protocol Documentation

Table of Contents

wippersnapper/description/v1/description.proto

Top

SPDX-FileCopyrightText: 2020-2021 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

Messages for describing hardware over the description topic

CreateDescriptionRequest

CreateDescriptionRequest identifies a device with Adafruit.io WipperSnapper.

FieldTypeLabelDescription
machine_name string

Identifies client's physical hardware

mac_addr int32

Client's UID, last 3 bytes of MAC address

usb_vid int32

Optional, USB Vendor ID

usb_pid int32

Optional, USB Product ID

version CreateDescriptionRequest.Version

Deprecated. Client's library version.

ver_major int32

Deprecated.

ver_minor int32

Deprecated.

ver_patch int32

Deprecated.

ver_pre_release string

Deprecated.

ver_build int32

Deprecated.

str_version string

Library version, as a string

Fields with deprecated option

Name Option
version

true

ver_major

true

ver_minor

true

ver_patch

true

ver_pre_release

true

ver_build

true

CreateDescriptionRequest.Version

FieldTypeLabelDescription
major uint64

Deprecated.

minor uint64

Deprecated.

micro uint64

Deprecated.

label string

Deprecated.

ver_major int32

Deprecated.

ver_minor int32

Deprecated.

ver_patch int32

Deprecated.

ver_pre_release string

Deprecated.

ver_build int32

Deprecated.

Fields with deprecated option

Name Option
major

true

minor

true

micro

true

label

true

ver_major

true

ver_minor

true

ver_patch

true

ver_pre_release

true

ver_build

true

CreateDescriptionResponse

CreateDescriptionResponse represents a device's specifications.

FieldTypeLabelDescription
response CreateDescriptionResponse.Response

Specifies if the hardware definition exists on the server.

total_gpio_pins int32

Specifies the number of GPIO pins on the client's physical hardware.

total_analog_pins int32

Specifies the number of analog pins on the client's physical hardware.

reference_voltage float

Specifies the hardware's default reference voltage.

total_i2c_ports int32

Specifies the number of hardware's I2C ports (i2cPorts[]).

GetDefinitionRequest

Request the board definition JSON from a device

MQTT Topic: `device/ID/description/get`

FieldTypeLabelDescription
data string

Deprecated. Request may be any UTF-8 string value

Fields with deprecated option

Name Option
data

true

GetDefinitionResponse

Response from Adafruit IO with the JSON board definition as a string

MQTT Topic: `device/ID/description/get`

FieldTypeLabelDescription
board_definition string

Deprecated. Response is JSON data encoded as a string

Fields with deprecated option

Name Option
board_definition

true

RegistrationComplete

RegistrationComplete Specifies if the device finished configuring

its components and is ready for configuration messages.

FieldTypeLabelDescription
is_complete bool

True if device successfully configured its components, False otherwise.

CreateDescriptionResponse.Response

Response. Specifies if the hardware definiton is within the database.

NameNumberDescription
RESPONSE_UNSPECIFIED 0

Invalid response from server

RESPONSE_OK 1

Board found within definition index

RESPONSE_BOARD_NOT_FOUND 2

Board not found in definition index

wippersnapper/ds18x20/v1/ds18x20.proto

Top

Ds18x20DeInitRequest

Ds18x20DeInitRequest represents a request to de-initialize a DS18X20

Maxim temperature sensor, from the broker.

FieldTypeLabelDescription
onewire_pin string

The desired onewire bus to de-initialize a DS18x sensor on and release.

Ds18x20DeviceEvent

Ds18x20DeviceEvent event represents data from **one** DS18X20 sensor.

FieldTypeLabelDescription
onewire_pin string

The desired pin to use as a OneWire bus.

sensor_event wippersnapper.i2c.v1.SensorEvent repeated

The DS18X20's SensorEvent.

Ds18x20InitRequest

Ds18x20InitRequest represents a request to initialize

a DS18X20 Maxim temperature sensor, from the broker.

NOTE: This API only supports ONE DS18X20 device PER OneWire bus.

FieldTypeLabelDescription
onewire_pin string

The desired pin to use as a OneWire bus.

sensor_resolution int32

The desired sensor resolution (9, 10, 11, or 12 bits).

i2c_device_properties wippersnapper.i2c.v1.I2CDeviceSensorProperties repeated

Properties for the DS18x20 sensor.

Ds18x20InitResponse

ds18x20InitDs18x20InitResponseResponse represents a device's response

to a ds18x20InitRequest message.

FieldTypeLabelDescription
is_initialized bool

True if the 1-wire bus has been initialized successfully, False otherwise.

onewire_pin string

The pin being used as a OneWire bus.

wippersnapper/i2c/v1/i2c.proto

Top

SPDX-FileCopyrightText: 2021 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

I2CBusInitRequest

I2CBusInitRequest represents a request to

initialize the I2C bus from the broker.

FieldTypeLabelDescription
i2c_pin_scl int32

The desired I2C SCL pin.

i2c_pin_sda int32

The desired I2C SDA pin.

i2c_frequency uint32

The desired I2C SCL frequency, in Hz. Default is 100000Hz.

i2c_port_number int32

The I2C port number.

I2CBusInitResponse

I2CBusInitResponse represents a response to I2CBusInitRequest

FieldTypeLabelDescription
is_initialized bool

Deprecated. True if the I2C port has been initialized successfully, False otherwise.

bus_response BusResponse

Whether the I2C bus initialized properly or failed. *

Fields with deprecated option

Name Option
is_initialized

true

I2CBusScanRequest

I2CBusScanRequest represents the parameters required to execute

a device's I2C scan.

FieldTypeLabelDescription
i2c_port_number int32

The desired I2C port to scan.

bus_init_request I2CBusInitRequest

The I2C bus initialization request.

I2CBusScanResponse

I2CBusScanResponse represents a list of I2C addresses

found on the bus after I2CBusScanRequest has executed.

FieldTypeLabelDescription
addresses_found uint32 repeated

The 7-bit addresses of the I2C devices found on the bus, empty if not found.

bus_response BusResponse

The I2C bus' status. *

I2CBusSetFrequency

I2CBusSetFrequency represents a request to change the

I2C clock speed to a desired frequency, in Hz.

FieldTypeLabelDescription
frequency uint32

The desired I2C SCL frequency, in Hz.

bus_id int32

An optional I2C bus identifier, if multiple exist.

I2CDeviceDeinitRequest

I2CDeviceDeinitRequest is a wrapper message containing

a deinitialization request for a specific i2c device.

FieldTypeLabelDescription
i2c_port_number int32

The desired I2C port to de-initialize an I2C device on.

i2c_device_address uint32

The 7-bit I2C address of the device on the bus.

I2CDeviceDeinitResponse

I2CDeviceDeinitResponse represents if an I2C device's

sensor(s) is/are successfully de-initialized.

FieldTypeLabelDescription
is_success bool

Deprecated. True if the deinitialization request succeeded, False otherwise.

i2c_device_address uint32

The 7-bit I2C address of the device which was initialized.

bus_response BusResponse

The I2C bus' status. *

Fields with deprecated option

Name Option
is_success

true

I2CDeviceEvent

Each I2CDeviceEvent represents data from **one** I2C sensor.

NOTE: An I2CDeviceEvent can have multiple sensor events if

the I2C device contains > 1 sensor.

FieldTypeLabelDescription
sensor_address uint32

The 7-bit I2C address of the I2C device.

sensor_event SensorEvent repeated

A, optionally repeated, SensorEvent from a sensor.

I2CDeviceInitRequest

I2CDeviceInitRequest is a wrapper message for

an I2C device initialization request.

FieldTypeLabelDescription
i2c_port_number int32

The desired I2C port to initialize an I2C device on.

i2c_bus_init_req I2CBusInitRequest

An I2C bus initialization request.

i2c_device_address uint32

The 7-bit I2C address of the device on the bus.

i2c_device_name string

The I2C device's name, MUST MATCH the name on the JSON definition file on https://github.com/adafruit/Wippersnapper_Components.

i2c_device_properties I2CDeviceSensorProperties repeated

Properties of each sensor on the I2C device.

I2CDeviceInitRequests

Represents a list of I2CDeviceInitRequest messages.

FieldTypeLabelDescription
list I2CDeviceInitRequest repeated

I2CDeviceInitResponse

I2CDeviceInitResponse contains the response from a

device after processing a I2CDeviceInitRequest message.

FieldTypeLabelDescription
is_success bool

Deprecated. !!DEPRECATED!! True if i2c device initialized successfully, false otherwise.

i2c_device_address uint32

The 7-bit I2C address of the device on the bus.

bus_response BusResponse

The I2C bus' status. *

Fields with deprecated option

Name Option
is_success

true

I2CDeviceSensorProperties

I2CDeviceSensorProperties contains

the properties of an I2C device's sensor such as

its type and period.

FieldTypeLabelDescription
sensor_type SensorType

sensor_period uint32

I2CDeviceUpdateRequest

I2CDeviceUpdateRequest is a wrapper message which

contains a message to update a specific device's properties.

FieldTypeLabelDescription
i2c_port_number int32

The desired I2C port.

i2c_device_address uint32

The 7-bit I2C address of the device on the bus.

i2c_device_name string

The I2C device's name, MUST MATCH the name on the JSON file.

i2c_device_properties I2CDeviceSensorProperties repeated

Properties for the I2C device's sensors.

I2CDeviceUpdateResponse

I2CDeviceUpdateResponse represents if an I2C device's

sensor(s) is/are successfully updated.

FieldTypeLabelDescription
i2c_device_address uint32

The 7-bit I2C address of the device which was updated.

is_success bool

Deprecated. !!DEPRECATED!! True if the update request succeeded, False otherwise.

bus_response BusResponse

The I2C bus' status. *

Fields with deprecated option

Name Option
is_success

true

SensorEvent

SensorEvent is used to return the sensor's value and type.

FieldTypeLabelDescription
type SensorType

The sensor's type and corresponding SI unit

value float

The sensor's value

BusResponse

BusResponse represents the state of the I2C bus, from a device.

NameNumberDescription
BUS_RESPONSE_UNSPECIFIED 0

Unspecified error occurred. *

BUS_RESPONSE_SUCCESS 1

I2C bus successfully initialized. *

BUS_RESPONSE_ERROR_HANG 2

I2C Bus hang, user should reset their board if this persists. *

BUS_RESPONSE_ERROR_PULLUPS 3

I2C bus failed to initialize - SDA or SCL needs a pull up. *

BUS_RESPONSE_ERROR_WIRING 4

I2C bus failed to communicate - Please check your wiring. *

BUS_RESPONSE_UNSUPPORTED_SENSOR 5

WipperSnapper firmware is outdated and does not include the sensor type - Please update your WipperSnapper firmware. *

BUS_RESPONSE_DEVICE_INIT_FAIL 6

I2C device failed to initialize. *

BUS_RESPONSE_DEVICE_DEINIT_FAIL 7

I2C device failed to de-initialize. *

SensorType

SensorType allows us determine what types of units the sensor uses, etc.

NameNumberDescription
SENSOR_TYPE_UNSPECIFIED 0

Sensor value type which is not defined by this list, "Raw Value: {value}".

SENSOR_TYPE_ACCELEROMETER 1

Acceleration, in meter per second per second, "{value}m/s/s".

SENSOR_TYPE_MAGNETIC_FIELD 2

Magnetic field strength, in micro-Tesla, "{value}µT".

SENSOR_TYPE_ORIENTATION 3

Orientation angle, in degrees, "{value}°".

SENSOR_TYPE_GYROSCOPE 4

Angular rate, in radians per second, "{value}rad/s".

SENSOR_TYPE_LIGHT 5

Light-level, non-unit-specific (For a unit-specific measurement, see: Lux), , "Raw Value: {value}".

SENSOR_TYPE_PRESSURE 6

Pressure, in hectopascal, , "{value}hPa".

SENSOR_TYPE_PROXIMITY 8

Distance from an object to a sensor, non-unit-specific, "Raw Value: {value}".

SENSOR_TYPE_GRAVITY 9

Metres per second squared, "{value}m/s^2".

SENSOR_TYPE_LINEAR_ACCELERATION 10

Acceleration not including gravity, in meter per second squared, "{value}m/s^2".

SENSOR_TYPE_ROTATION_VECTOR 11

An angle in radians, "{value} rad".

SENSOR_TYPE_RELATIVE_HUMIDITY 12

in percent (%), "{value}%".

SENSOR_TYPE_AMBIENT_TEMPERATURE 13

Temperature of the air around a sensor, in degrees Celsius, "{value}°C".

SENSOR_TYPE_OBJECT_TEMPERATURE 14

Temperature of the object a sensor is touching/pointed at, in degrees Celsius, "{value}°C".

SENSOR_TYPE_VOLTAGE 15

Volts, "{value}V".

SENSOR_TYPE_CURRENT 16

Milliamps, "{value}mA".

SENSOR_TYPE_COLOR 17

Values are in 0..1.0 RGB channel luminosity and 32-bit RGBA format. "Color: {value}".

SENSOR_TYPE_RAW 18

Sensor reads a value which is not defined by this list, "Raw Value: {value}".

SENSOR_TYPE_PM10_STD 19

Standard Particulate Matter 1.0, in ppm, "{value}ppm".

SENSOR_TYPE_PM25_STD 20

Standard Particulate Matter 2.5, in ppm, "{value}ppm".

SENSOR_TYPE_PM100_STD 21

Standard Particulate Matter 100, in ppm, "{value}ppm".

SENSOR_TYPE_PM10_ENV 22

Environmental Particulate Matter 1.0, in ppm, "{value}ppm".

SENSOR_TYPE_PM25_ENV 23

Environmental Particulate Matter 2.5, in ppm, "{value}ppm".

SENSOR_TYPE_PM100_ENV 24

Environmental Particulate Matter 100, in ppm, "{value}ppm".

SENSOR_TYPE_CO2 25

Measured CO2, in ppm, "{value}ppm".

SENSOR_TYPE_GAS_RESISTANCE 26

Proportional to the amount of VOC particles in the air, in Ohms, "{value}Ω".

SENSOR_TYPE_ALTITUDE 27

Values are in meters (m), "${$v} m".

SENSOR_TYPE_LUX 28

Light level, in lux, "Lux: {value}".

SENSOR_TYPE_ECO2 29

equivalent/estimated CO2 in ppm (estimated from some other measurement), "{value}ppm".

SENSOR_TYPE_UNITLESS_PERCENT 30

Percentage, unit-less, "{value}%".

SENSOR_TYPE_AMBIENT_TEMPERATURE_FAHRENHEIT 31

Temperature of the air around a sensor, in degrees Fahrenheit, "{value}°F".

SENSOR_TYPE_OBJECT_TEMPERATURE_FAHRENHEIT 32

Temperature of the object a sensor is touching/pointed at, in degrees Fahrenheit, "{value}°F".

SENSOR_TYPE_VOC_INDEX 33

Values are an index from 1-500 with 100 being normal, "${$v} VOC".

SENSOR_TYPE_NOX_INDEX 34

Values are an index from 1-500 with 100 being normal, "${$v} NOx".

SENSOR_TYPE_TVOC 35

Values are in parts per billion (ppb), "${$v} ppb".

wippersnapper/pin/v1/pin.proto

Top

SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

ConfigurePWMPinRequest

Configures a PWM output pin

FieldTypeLabelDescription
pin_name string

Deprecated. Pin to write to

duty_cycle int32

Deprecated. Duty cycle between always off (0) and always on (255)

frequency int32

Deprecated. Target frequency, in Hz

variable_frequency bool

Deprecated. If the frequency changes over time NOTE: CIRCUITPYTHON-API ONLY

Fields with deprecated option

Name Option
pin_name

true

duty_cycle

true

frequency

true

variable_frequency

true

ConfigurePWMPinRequests

FieldTypeLabelDescription
list ConfigurePWMPinRequest repeated

Deprecated.

Fields with deprecated option

Name Option
list

true

ConfigurePinRequest

Represents a request from the broker to create, update, or delete a GPIO pin.

FieldTypeLabelDescription
pin_name string

The name of pin we are accessing.

mode Mode

Specifies the pin's type, analog or input.

direction ConfigurePinRequest.Direction

Specifies the pin's behavior.

pull ConfigurePinRequest.Pull

Specifies an optional pullup resistor value.

period float

Specifies the time between measurements, in seconds.

request_type ConfigurePinRequest.RequestType

Specifies the type of ConfigurePinRequest.

aref float

Deprecated. deprecated: Specifies the reference voltage used for analog input, defaults to 3.3v.

analog_read_mode ConfigurePinRequest.AnalogReadMode

ANALOG-ONLY: Specifies the read mode for an analog pin.

Fields with deprecated option

Name Option
aref

true

ConfigurePinRequests

Represents a list of ConfigurePinRequest messages.

FieldTypeLabelDescription
list ConfigurePinRequest repeated

ConfigureReferenceVoltage

ConfigureReferenceVoltage - Changes the reference voltage used for analog inputs.

Direction: C2D

FieldTypeLabelDescription
reference_voltage float

Specifies an ADC reference voltage.

PWMPinEvent

Write duty cycle to a pin PWM output pin

FieldTypeLabelDescription
duty_cycle int32

Deprecated. Duty cycle between always off (0) and always on (255)

Fields with deprecated option

Name Option
duty_cycle

true

PWMPinEvents

FieldTypeLabelDescription
list PWMPinEvent repeated

Deprecated.

Fields with deprecated option

Name Option
list

true

PinEvent

Pin Event. Describes a pin's value.

FieldTypeLabelDescription
pin_name string

Specifies the pin's name.

pin_value string

Specifies the pin's value.

mode Mode

Deprecated. DEPRECATED: Specifies the pin's mode, analog or digital.

pin_value_volts float

Deprecated. DEPRECATED: Specifies an anlog pin's voltage.

Fields with deprecated option

Name Option
mode

true

pin_value_volts

true

PinEvents

Sends a list of PinEvents

NOTE: Not working with nanopb decode repeated

FieldTypeLabelDescription
list PinEvent repeated

ConfigurePinRequest.AnalogReadMode

Selects the type of value read by an analog pin.

PIN_VALUE: Raw ADC reading.

PIN_VOLTAGE: Calculated voltage reading.

NOTE: This is only applicable to analog pins.

NameNumberDescription
ANALOG_READ_MODE_UNSPECIFIED 0

ANALOG_READ_MODE_PIN_VALUE 1

ANALOG_READ_MODE_PIN_VOLTAGE 2

ConfigurePinRequest.Direction

Direction. Specifies the pin's direction, INPUT or OUTPUT.

NameNumberDescription
DIRECTION_UNSPECIFIED 0

Invalid Direction from Broker.

DIRECTION_INPUT 1

Set the pin to behave as an input.

DIRECTION_OUTPUT 2

Set the pin to behave as an output.

ConfigurePinRequest.Pull

Pull. An optional pullup resistor value

NameNumberDescription
PULL_UNSPECIFIED 0

Invalid Direction from Broker.

PULL_UP 1

Set the pin to pull high.

PULL_DOWN 2

Set the pin to pull low.

ConfigurePinRequest.RequestType

Request Type. Describes the type of ConfigurePinRequest for the hardware to operate on.

NameNumberDescription
REQUEST_TYPE_UNSPECIFIED 0

Invalid request from Broker.

REQUEST_TYPE_CREATE 1

The request creates a pin.

REQUEST_TYPE_UPDATE 2

The request updates a previously created pin.

REQUEST_TYPE_DELETE 3

The request deletes a previously created pin.

Mode

Mode. Specifies if a GPIO pin is an analog or digital pin.

NameNumberDescription
MODE_UNSPECIFIED 0

Invalid Mode from Broker.

MODE_ANALOG 1

Set up an analog pin.

MODE_DIGITAL 2

Set up a digital pin.

wippersnapper/pixels/v1/pixels.proto

Top

PixelsCreateRequest

PixelsCreateRequest represents a call from IO to a device.

Creates a strand of addressable pixels.

Initial brightness is always 128.

FieldTypeLabelDescription
pixels_type PixelsType

Defines the model/type of pixel strand

pixels_num uint32

Number of pixels attached to strand.

pixels_ordering PixelsOrder

Defines the pixel strand's color ordering.

pixels_brightness uint32

Strand brightness, 0 to 255

pixels_pin_neopixel string

Generic pin a NeoPixel strand is connected to.

pixels_pin_dotstar_data string

Data pin a DotStar strand is connected to.

pixels_pin_dotstar_clock string

Clock pin a DotStar strand is connected to.

PixelsCreateResponse

PixelsCreateResponse represents response from a WipperSnapper

device to IO after a PixelsCreateRequest call

FieldTypeLabelDescription
is_success bool

True if the strand initialized successfully, False otherwise.

pixels_pin_data string

Data pin the responding strand is connected to.

PixelsDeleteRequest

PixelCreateRequest represents a call from IO to a device

Deletes a strand of addressable pixels and release the resources and pin.

FieldTypeLabelDescription
pixels_type PixelsType

Defines the model/type of pixel strand

pixels_pin_data string

Data pin a strand is connected to.

PixelsWriteRequest

PixelsWriteRequest represents a call from IO to a device.

Writes to a strand of pixels.

FieldTypeLabelDescription
pixels_type PixelsType

Defines the model/type of pixel strand

pixels_pin_data string

Data pin a strand is connected to.

pixels_color uint32

32-bit color value. Most significant byte is white (for RGBW pixels) or ignored (for RGB pixels), next is red, then green, and least significant byte is blue.

PixelsOrder

PixelsOrder defines the color ordering.

NameNumberDescription
PIXELS_ORDER_UNSPECIFIED 0

Unspecified color ordering, error.

PIXELS_ORDER_GRB 1

DEFAULT for NeoPixels - Green, Red, Blue

PIXELS_ORDER_GRBW 2

Green, Red, Blue, White

PIXELS_ORDER_RGB 3

Red, Green, Blue

PIXELS_ORDER_RGBW 4

Red, Green, Blue, White

PIXELS_ORDER_BRG 5

DEFAULT for DotStars - Blue, Red, Green

PIXELS_ORDER_RBG 6

Red, Blue Green

PIXELS_ORDER_GBR 7

Green, Blue, Red

PIXELS_ORDER_BGR 8

Blue, Green, Red

PixelsType

PixelsType defines the type/model of pixel strand.

NameNumberDescription
PIXELS_TYPE_UNSPECIFIED 0

PIXELS_TYPE_NEOPIXEL 1

PIXELS_TYPE_DOTSTAR 2

wippersnapper/pwm/v1/pwm.proto

Top

SPDX-FileCopyrightText: 2022 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

PWMAttachRequest

PWMAttachRequest represents a request to a device to attach/allocate a PWM pin.

On ESP32 Arduino, this will "attach" a pin to a LEDC channel/timer group.

On non-ESP32 Arduino, this does nothing.

FieldTypeLabelDescription
pin string

The pin to be attached.

frequency int32

PWM frequency of an analog pin, in Hz. *

resolution int32

The resolution of an analog pin, in bits. *

PWMAttachResponse

PWMAttachResponse represents a response from a device's execution of an

AttachRequest message.

FieldTypeLabelDescription
pin string

The requested pin.

did_attach bool

True if AttachRequest successful, False otherwise.

PWMDetachRequest

PWMDetachRequest represents a request to stop PWM'ing and release the pin for re-use.

On ESP32, this will "detach" a pin from a LEDC channel/timer group.

On non-ESP32 Arduino, this calls digitalWrite(LOW) on the pin

FieldTypeLabelDescription
pin string

The PWM pin to de-initialized.

PWMWriteDutyCycleMultiRequest

WriteDutyCycle represents a wrapper request to write duty cycles to multiple pins.

This is used for controlling RGB/RGBW LEDs.

FieldTypeLabelDescription
write_duty_cycle_req PWMWriteDutyCycleRequest repeated

PWMWriteDutyCycleRequest

WriteDutyCycleRequest represents a request to write a duty cycle to a pin with a frequency (fixed).

This is used for controlling LEDs.

FieldTypeLabelDescription
pin string

The pin to write to.

duty_cycle int32

The desired duty cycle to write. This value will be changed by the slider on Adafruit IO. *

PWMWriteFrequencyRequest

WriteFrequencyRequest represents a request to write a Frequency, in Hz, to a pin with a duty cycle of 50%.

This is used for playing tones using a piezo buzzer or speaker.

FieldTypeLabelDescription
pin string

The pin to write to.

frequency int32

The desired PWM frequency, in Hz. This value will be changed by the slider on Adafruit IO. *

wippersnapper/servo/v1/servo.proto

Top

SPDX-FileCopyrightText: 2022 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

ServoAttachRequest

ServoAttachRequest represents a request to attach a servo to a pin.

FieldTypeLabelDescription
servo_pin string

The name of pin to attach a servo to.

servo_freq int32

The overall PWM frequency, default sent by Adafruit IO is 50Hz. *

min_pulse_width int32

The minimum pulse length in uS. Default sent by Adafruit IO is 500uS. *

max_pulse_width int32

The maximum pulse length in uS. Default sent by Adafruit IO is 2500uS. *

ServoAttachResponse

ServoAttachResponse represents the result of attaching a servo to a pin.

FieldTypeLabelDescription
attach_success bool

True if a servo was attached successfully, False otherwise. *

servo_pin string

The name of pin we're responding about.

ServoDetachRequest

ServoDetachRequest represents a request to detach a servo from a pin and de-initialize the pin for other uses.

FieldTypeLabelDescription
servo_pin string

The name of pin to use as a servo pin.

ServoWriteRequest

ServoWriteReq represents a message to write the servo's position.

NOTE: Position is sent from Adafruit IO as a pulse width in uS between 500uS

and 2500uS. The client application must convert pulse width to duty cycle w/fixed

freq of 50Hz prior to writing to the servo pin.

FieldTypeLabelDescription
servo_pin string

The name of pin we're addressing.

pulse_width int32

The pulse width to write to the servo, in uS *

wippersnapper/signal/v1/signal.proto

Top

SPDX-FileCopyrightText: 2020-2021 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

CreateSignalRequest

FieldTypeLabelDescription
pin_configs wippersnapper.pin.v1.ConfigurePinRequests

Create, update or remove a GPIO pin

pin_event wippersnapper.pin.v1.PinEvent

Update a pins state

pwm_pin_config wippersnapper.pin.v1.ConfigurePWMPinRequests

Deprecated. Create, update or remove a PWM output pin

pwm_pin_event wippersnapper.pin.v1.PWMPinEvents

Deprecated. Write duty cycle to a PWM output pin

pin_events wippersnapper.pin.v1.PinEvents

Update a pin's state

Fields with deprecated option

Name Option
pwm_pin_config

true

pwm_pin_event

true

Ds18x20Request

Ds18x20Request represents a Ds18x20 command sent to a device.

FieldTypeLabelDescription
req_ds18x20_init wippersnapper.ds18x20.v1.Ds18x20InitRequest

req_ds18x20_deinit wippersnapper.ds18x20.v1.Ds18x20DeInitRequest

Ds18x20Response

Ds18x20Response represents a Ds18x20 message from the device.

FieldTypeLabelDescription
resp_ds18x20_init wippersnapper.ds18x20.v1.Ds18x20InitResponse

resp_ds18x20_event wippersnapper.ds18x20.v1.Ds18x20DeviceEvent

I2CRequest

I2CRequest represents the broker's request for a specific i2c command to a device.

FieldTypeLabelDescription
req_i2c_init wippersnapper.i2c.v1.I2CBusInitRequest

Deprecated.

req_i2c_scan wippersnapper.i2c.v1.I2CBusScanRequest

req_i2c_set_freq wippersnapper.i2c.v1.I2CBusSetFrequency

req_i2c_device_init wippersnapper.i2c.v1.I2CDeviceInitRequest

req_i2c_device_deinit wippersnapper.i2c.v1.I2CDeviceDeinitRequest

req_i2c_device_update wippersnapper.i2c.v1.I2CDeviceUpdateRequest

req_i2c_device_init_requests wippersnapper.i2c.v1.I2CDeviceInitRequests

Fields with deprecated option

Name Option
req_i2c_init

true

I2CResponse

I2CResponse represents the device's response to an I2C-specific message from IO.

FieldTypeLabelDescription
resp_i2c_init wippersnapper.i2c.v1.I2CBusInitResponse

Deprecated.

resp_i2c_scan wippersnapper.i2c.v1.I2CBusScanResponse

resp_i2c_device_init wippersnapper.i2c.v1.I2CDeviceInitResponse

resp_i2c_device_deinit wippersnapper.i2c.v1.I2CDeviceDeinitResponse

resp_i2c_device_update wippersnapper.i2c.v1.I2CDeviceUpdateResponse

resp_i2c_device_event wippersnapper.i2c.v1.I2CDeviceEvent

Fields with deprecated option

Name Option
resp_i2c_init

true

PWMRequest

PWMRequest represents a broker's request across the PWM sub-topic.

FieldTypeLabelDescription
attach_request wippersnapper.pwm.v1.PWMAttachRequest

detach_request wippersnapper.pwm.v1.PWMDetachRequest

write_duty_request wippersnapper.pwm.v1.PWMWriteDutyCycleRequest

write_duty_multi_request wippersnapper.pwm.v1.PWMWriteDutyCycleMultiRequest

write_freq_request wippersnapper.pwm.v1.PWMWriteFrequencyRequest

PWMResponse

PWMRequest represents a devices's response across the PWM sub-topic.

FieldTypeLabelDescription
attach_response wippersnapper.pwm.v1.PWMAttachResponse

PixelsRequest

PixelsRequest represents the broker's request across the pixels sub-topic.

FieldTypeLabelDescription
req_pixels_create wippersnapper.pixels.v1.PixelsCreateRequest

req_pixels_delete wippersnapper.pixels.v1.PixelsDeleteRequest

req_pixels_write wippersnapper.pixels.v1.PixelsWriteRequest

PixelsResponse

FieldTypeLabelDescription
resp_pixels_create wippersnapper.pixels.v1.PixelsCreateResponse

ServoRequest

ServoRequest represents the broker's request across the servo sub-topic.

FieldTypeLabelDescription
servo_attach wippersnapper.servo.v1.ServoAttachRequest

servo_detach wippersnapper.servo.v1.ServoDetachRequest

servo_write wippersnapper.servo.v1.ServoWriteRequest

ServoResponse

ServoResponse represents the device's response across the servo sub-topic.

FieldTypeLabelDescription
servo_attach_resp wippersnapper.servo.v1.ServoAttachResponse

SignalResponse

Response from a signal message payload (device->broker)

FieldTypeLabelDescription
configuration_complete bool

True if a device successfully completed a ConfigurePinRequests message, False otherwise.

UARTRequest

UARTRequest represents a UART command sent to a device.

FieldTypeLabelDescription
req_uart_device_attach wippersnapper.uart.v1.UARTDeviceAttachRequest

req_uart_device_detach wippersnapper.uart.v1.UARTDeviceDetachRequest

UARTResponse

UARTResponse represents a UART command from a device.

FieldTypeLabelDescription
resp_uart_device_attach wippersnapper.uart.v1.UARTDeviceAttachResponse

resp_uart_device_event wippersnapper.uart.v1.UARTDeviceEvent

wippersnapper/uart/v1/uart.proto

Top

SPDX-FileCopyrightText: 2023 Brent Rubell for Adafruit Industries

SPDX-License-Identifier: MIT

UARTBusData

UARTBusData represents a message to configure a UART bus for communication with a device.

NOTE: This message is never sent directly, it is packed inside UARTDeviceAttachRequest.

FieldTypeLabelDescription
baudrate int32

The baudrate to use for UART communication (may be a common baud rate such as: 1200bps, 2400bps, 4800bps, 19200bps, 38400bps, 57600bps, or 115200bps).

pin_rx string

The pin on which to receive UART stream data.

pin_tx string

The pin on which to transmit UART stream data.

is_invert bool

Inverts the UART signal on RX and TX pins. Defaults to False.

UARTDeviceAttachRequest

UARTDeviceAttachRequest represents a message sent from IO to a device

to configure the UART bus (if not already configured) and attach a device.

FieldTypeLabelDescription
bus_info UARTBusData

The UART bus configuration.

device_id string

The unique identifier of the device to attach to the UART bus, from Adafruit_WipperSnapper_Components.

polling_interval int32

The polling interval, in milliseconds, to use for the device.

UARTDeviceAttachResponse

UARTDeviceAttachResponse represents a message sent from a device to IO to

confirm that a device has been attached to the UART bus.

FieldTypeLabelDescription
device_id string

The unique identifier of the device to attach to the UART bus, from Adafruit_WipperSnapper_Components.

is_success bool

True if the UARTInitRequest was successful, False otherwise.

UARTDeviceDetachRequest

UARTDeviceDetachRequest represents a message sent from IO to a device

to detach a device from the UART bus.

FieldTypeLabelDescription
device_id string

The unique identifier of the device to detach from the UART bus.

UARTDeviceEvent

UARTDeviceEvent represents incoming data from a UART sensor.

FieldTypeLabelDescription
device_id string

The unique identifier of the device to attach to the UART bus, from Adafruit_WipperSnapper_Components.

sensor_event wippersnapper.i2c.v1.SensorEvent repeated

A, optionally repeated, SensorEvent from a sensor.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)