Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
0f315fe
brokertodevice
brentru Nov 2, 2023
c20cd1c
devicetobroker
brentru Nov 2, 2023
d472b77
add adafruit sensor.proto
brentru Nov 2, 2023
b165561
add TODO
brentru Nov 2, 2023
8122ce2
cleanup from pair session
brentru Nov 6, 2023
c084ee3
merge upstream
brentru Nov 6, 2023
5a60b07
bring uart remove into signal.proto too
brentru Nov 6, 2023
b590556
new pin api and error api
brentru Nov 9, 2023
4daacdc
Update Enum numbering + remove redundant imports
tyeth Nov 9, 2023
a8e116a
loren comments and buf lint
brentru Nov 22, 2023
37b3662
Merge branch 'api-v2' of github.com:adafruit/Wippersnapper_Protobuf i…
brentru Nov 22, 2023
e66fc45
address some of petteri's review
brentru Nov 30, 2023
2167089
address petteri and lorens comments
brentru Dec 1, 2023
022f697
moved nanopb submodule to nanopb-0.4.8
brentru Dec 8, 2023
06cdc87
add .options files for 4 proto files
brentru Dec 11, 2023
ae5776a
max_count
brentru Dec 11, 2023
607f0d5
add i2c .options file, remove deprecated feeds
brentru Dec 11, 2023
ff5c50c
add options for the rest of the files within proto/ that require it, …
brentru Dec 12, 2023
16212ea
protolint pass 1
brentru Dec 12, 2023
14e0bd8
protolint pass 2
brentru Dec 12, 2023
3e143b6
deprecate buf, use protolint instead!
brentru Dec 12, 2023
ad1c24b
give it path
brentru Dec 12, 2023
f82f3ed
ls
brentru Dec 12, 2023
64b22c0
source correct dirs
brentru Dec 12, 2023
4fbe457
fix config dir
brentru Dec 12, 2023
70fd758
mv protolint
brentru Dec 12, 2023
bc7da7c
putback lint config
brentru Dec 12, 2023
84a84e4
do a self-checkout instead!
brentru Dec 12, 2023
2ed822f
pass protolint path thru
brentru Dec 12, 2023
80d9087
pass dir
brentru Dec 12, 2023
78e779a
Update lint.yml
tyeth Dec 12, 2023
228b4ad
Update lint.yml - fail on protolint errors
tyeth Dec 12, 2023
3842dde
Merge pull request #137 from adafruit/test-protolint-action-path-and-cat
tyeth Dec 12, 2023
f54f72a
flatten everything and update scripts
brentru Dec 12, 2023
acfecee
update linter
brentru Dec 12, 2023
5ca77b5
Merge pull request #138 from adafruit/try-to-flatten-path
brentru Dec 12, 2023
602ed0f
Merge branch 'master' into api-v2
brentru Dec 12, 2023
160f1a5
pull AnalogReadMode otu from AnalogIOOut
brentru Dec 14, 2023
12294b5
pull enums out of add message in digitalio
brentru Dec 14, 2023
df8d141
enforce onewirepin option, new i2c sensor properties message from old…
brentru Dec 14, 2023
23462dd
add sensor_types to i2c options
brentru Dec 15, 2023
1e80338
use max_count instead
brentru Dec 15, 2023
f387420
move back to how i2cinit looked in v2
brentru Dec 15, 2023
59fce06
generate for Python, too
brentru Feb 28, 2024
89e4e3a
build python locally on PR change
brentru Feb 28, 2024
531a560
separately upload nanopb output
brentru Feb 28, 2024
fb33b84
swap description for checkin, add response message to b2d msg
brentru Feb 29, 2024
30fe4ce
add comments
brentru Feb 29, 2024
98e6155
send firmware version upon checkin
brentru Mar 1, 2024
a6629b7
remove checkin completed
brentru Mar 1, 2024
f8b9a47
give every .proto documentation in .md format
brentru Mar 1, 2024
a916c40
add one for checkin
brentru Mar 4, 2024
cdff283
Merge remote-tracking branch 'adafruit/master' into api-v2
brentru Mar 5, 2024
a50b4e9
move documentation into docs folder to keep wippersnapper/ folder flat
brentru Mar 5, 2024
6650b70
add updated signal documentation
brentru Mar 5, 2024
ad0562c
match v1 signal diagram
brentru Mar 5, 2024
465b38c
document v2 check-in
brentru Mar 5, 2024
ac90d7a
remove description.md in v2
brentru Mar 5, 2024
a039075
add boolean sensor value type to allow digitalio expansion
brentru Mar 5, 2024
4597768
expand digitalio to allow it to utilize sensor.proto
brentru Mar 5, 2024
9ff9a00
Remove I2C sensor properties, enforce sensortype instead, refactoring…
brentru Mar 6, 2024
eaf41c6
add documentation for ds18x, i2c, pixels, pwm, servo
brentru Mar 6, 2024
5c16874
uart diff
brentru Mar 6, 2024
0e9c582
clean docs
brentru Mar 7, 2024
7203b07
Merge branch 'master' into api-v2
brentru Mar 7, 2024
f36e486
modify import statements
brentru Mar 13, 2024
e251bde
fix two wrappers
brentru Mar 13, 2024
70a62e8
fix arduino
brentru Mar 13, 2024
4a1eb83
sort imports
brentru Mar 13, 2024
2543248
run wrapper gen
brentru Mar 13, 2024
242e102
Update test-wrapper-arduino.yml
brentru Mar 13, 2024
97ea185
fix analogio_remove
brentru Apr 4, 2024
dae03b8
new workflow
brentru Apr 4, 2024
3e0c895
24.x?
brentru Apr 4, 2024
76686af
23.x
brentru Apr 4, 2024
ec9f83d
latest
brentru Apr 4, 2024
71f6a5a
support backwards-compatible scl/sda pins
brentru Apr 9, 2024
8280531
remove i2c port number and pins
brentru Apr 11, 2024
f7058f9
♻️ Refactor I2C API per pair-programming session with Lorennorman today
brentru Apr 11, 2024
99d9506
🐛 Fix I2C.proto compile
brentru Apr 11, 2024
dd2f23d
🦺 Protolint
brentru Apr 11, 2024
9572a14
take correct resp prefix
brentru Apr 11, 2024
005ca9e
fix protolint
brentru Apr 11, 2024
1f21e45
long response
brentru Apr 11, 2024
cc68216
use i2c_device prefix when required
brentru Apr 11, 2024
55bfedb
add one more prefix
brentru Apr 11, 2024
de9a2ab
response-:>status
brentru Apr 11, 2024
c8fb3ee
scan->scanned
brentru Apr 11, 2024
780e0be
Correct to I2c
brentru Apr 11, 2024
88298aa
fix spacing
brentru Apr 11, 2024
5b87251
fix spacing again
brentru Apr 11, 2024
61c374d
first draft of mux impl.
brentru May 13, 2024
b3e7a06
rev2 for i2c muxing
brentru May 14, 2024
f7dc28f
packed true dir
brentru May 14, 2024
92a4ec0
lint
brentru May 14, 2024
f25d0b3
make neopixel data pin explicitly defined
brentru May 22, 2024
b3e7376
use one data pin in pixelsAdd
brentru May 22, 2024
c2a03c3
we dont need to know the pixel's type every write
brentru May 22, 2024
2161c98
Update README.md
brentru Jul 26, 2024
1a9a526
Update protoc-wrapper-generation.yml
brentru Jul 26, 2024
6cfd568
Update test-wrapper-arduino.yml
brentru Jul 26, 2024
6f48b50
Create generate-local-arduino-artifacts.yml
brentru Jul 26, 2024
9182706
Update test-wrapper-arduino.yml
brentru Jul 26, 2024
1740a0b
Update protoc-wrapper-generation.yml
brentru Jul 26, 2024
9502b64
Update generate-local-arduino-artifacts.yml
brentru Jul 26, 2024
4f73190
Update generate-local-arduino-artifacts.yml
brentru Jul 26, 2024
c3419f2
Update generate-local-arduino-artifacts.yml
brentru Jul 26, 2024
1039c9a
Update generate-local-arduino-artifacts.yml
brentru Jul 26, 2024
be8529d
update commands in yml
brentru Jul 26, 2024
606da68
update deprecated action vers, bump
brentru Jul 26, 2024
20de684
bump setup-protoc semver
brentru Jul 26, 2024
735ee97
drop ver down?
brentru Jul 26, 2024
4b755bb
bring the two other workflows in-line with how we're generating ardui…
brentru Jul 26, 2024
05965d9
force options files to use absolute names rather than wildcard'ing th…
brentru Aug 21, 2024
520f2fa
fix ds18x20 opts
brentru Aug 21, 2024
54a1aaa
fix warning errors in options
brentru Aug 21, 2024
0e4a90c
Update scripts to detect .options file
brentru Aug 21, 2024
5a549cc
verbose log enable
brentru Aug 21, 2024
9671307
list and tree
brentru Aug 21, 2024
b63eb49
change dir lower
brentru Aug 21, 2024
70e154e
fix a path
brentru Aug 21, 2024
e6f84dd
put arduino_out/ in the new path
brentru Aug 21, 2024
7d3cca7
fix upload artifact pathing
brentru Aug 21, 2024
7ae93dd
add options file for digitalio.proto
brentru Sep 3, 2024
ee1df09
generate options for analogio proto file
brentru Oct 1, 2024
7dd0fe6
generate analogio remove, event
brentru Oct 1, 2024
1006031
Modify I2cDeviceDescriptor to work with i2c muxes, add mux address to…
brentru Jan 21, 2025
00ee250
Merge branch 'master' into api-v2
brentru Jan 21, 2025
bed8b12
Modify I2cDeviceDescriptor to support > 1 I2C bus
brentru Jan 22, 2025
e9aedfc
add bus_sda, bus_scl to I2cBusScan message
brentru Mar 12, 2025
d2788d2
Update upload-artifact to v4
brentru Mar 12, 2025
6ccf0b0
Refactor i2cBusScan again to account for alt bus, mux and devicedesc
brentru Mar 12, 2025
52c4252
add to I2cBusScan
brentru Mar 12, 2025
3f629fb
rm channel
brentru Mar 12, 2025
218793e
simplify mux info within scanrequest
brentru Mar 13, 2025
26510b3
add remove
brentru Mar 13, 2025
f065985
add an option for persistent configs
brentru Apr 7, 2025
9d11d0d
Update UART.proto for v2
brentru Apr 25, 2025
d71ad53
Uart.proto - lint
brentru Apr 25, 2025
c165d94
uart.proto - Include sensor.proto
brentru Apr 25, 2025
370b739
downgrade python ver
brentru Apr 25, 2025
5539f64
Workflow Arduino - Pin Protobuf to 5.29.4
brentru Apr 25, 2025
ad775e4
Add I2C Output-type components
brentru May 6, 2025
0d6a5ff
sort imports
brentru May 6, 2025
36c008c
remove type because we'll just use which_config pb_size_t to detect i…
brentru May 7, 2025
1d37ef4
add i2c options
brentru May 7, 2025
734dd60
fix oneof options
brentru May 7, 2025
2ef3b7c
add enable to adjust brightness
brentru May 7, 2025
0a74dc9
this'll simplify the removal subroutine
brentru May 8, 2025
9704f83
oneof the I2cDeviceOutputWrite payload
brentru May 12, 2025
b20a5d0
rm unused fields from initial design
brentru May 13, 2025
31c6906
inc. msg buffer sz
brentru May 13, 2025
a5cadbf
Add OLED commands, refactor towards v1 api
brentru May 20, 2025
13325a9
Merge branch 'master' into api-v2
brentru May 21, 2025
ed54f4d
add OLEDWrite submsg
brentru May 21, 2025
e1112c5
UART revisions
brentru May 22, 2025
31d646d
update .options and signal
brentru May 22, 2025
d12a792
Fix naming in signal
brentru May 22, 2025
8d6fcab
Add UARTWrite/UARTWritten req/resp
brentru May 22, 2025
c6334b8
Add: GPS.proto
brentru May 27, 2025
1a08875
Sort mports alphabetically
brentru May 27, 2025
2aec8f6
Add Options file for GPS
brentru May 27, 2025
969a60b
Update uart.proto, uart.options
brentru May 28, 2025
e6b79ff
Update uart.options
brentru May 28, 2025
4bd2f75
Update uart.proto - include uart_nbr
brentru May 29, 2025
517e1de
Uart.proto - Add more detailed addressing
brentru May 29, 2025
578f208
Uart.proto - Added device_id to UartDeviceConfig
brentru May 29, 2025
627652b
Uart.proto - Add period field to all inputs
brentru May 30, 2025
492e3a0
uart.proto - add sensor.proto event to req/resp
brentru May 30, 2025
4e42234
uart.proto - sort imports
brentru May 30, 2025
5f3ec33
uart.proto - constrain max_count on sensor_types
brentru May 30, 2025
cca78c8
Uart.options - Add UartInputEvent fields
brentru Jun 2, 2025
09bf58e
uart.proto - oneof the device type
brentru Jun 3, 2025
be3dc9d
GPS.proto - Add repeated commands field
brentru Jun 13, 2025
850d73c
Resolve merge conflict
brentru Jun 13, 2025
20cff93
gps NMEA max
brentru Jun 23, 2025
0ee620d
GPS - add Responses
brentru Jun 24, 2025
478e51b
GPS - fix responses error
brentru Jun 24, 2025
aee75b7
GPS - Responses should be calculated on-device rather than passed thr…
brentru Jun 25, 2025
607702e
GPS - remove response options
brentru Jun 25, 2025
6811f7b
GPS - Add Period for polling
brentru Jun 25, 2025
3a7d109
GPS - Add GPSEvent message
brentru Jun 27, 2025
2aad669
GPS - Update GPSEvent compiler directives
brentru Jun 27, 2025
d0fbb8d
GPS - Signal stores GPSEvent
brentru Jul 1, 2025
d54396c
I2C - Include GPS.proto
brentru Jul 2, 2025
6b71dc3
I2c.proto - Sort Imports
brentru Jul 2, 2025
4770cd7
I2c - Remove redundant bool fields within I2cDeviceAddorReplace
brentru Jul 2, 2025
2afb042
I2c.proto - Add back is_output, is_gps fields because they are sent b…
brentru Jul 2, 2025
4ba1574
GPS.proto - Fix invalid field numbers
brentru Jul 8, 2025
8eb4a0a
GPS.proto - Update for UBX commands
brentru Jul 9, 2025
768d607
GPS.options - Change ubx arguments
brentru Jul 9, 2025
9f61c41
GPS.options - Reduce max_sz option
brentru Jul 10, 2025
dc4517e
UART.proto - Incorrectly references i2c sensor types instead of UART
brentru Jul 24, 2025
415b329
UART.options - Fix sensor count pb_callback_t
brentru Jul 24, 2025
6b6d86d
UART.proto - Fix sensor type issue in PM25AQI
brentru Jul 24, 2025
4904d4e
Changes for @lorennorman
brentru Oct 23, 2025
5ff730a
shift -10
brentru Oct 23, 2025
c1c2baa
Merge branch 'master' into api-v2
brentru Oct 23, 2025
fcf755f
Add - Uart.proto device_name field for CPython
brentru Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions proto/wippersnapper/analogio/v1/analogio.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-FileCopyrightText: 2023 Brent Rubell, Loren Norman, Tyeth Gundry for Adafruit Industries
// SPDX-License-Identifier: MIT
syntax = "proto3";

package wippersnapper.analogio.v1;
import "nanopb/nanopb.proto";
import "wippersnapper/sensor/v1/sensor.proto";

message AnalogIOAdd {
int32 gpio_num = 1; // correlates with `name` in the JSON
float period = 2;
AnalogReadMode read_mode = 3;

/**
* Selects the type of value read by an analog pin.
* PIN_VALUE: Raw ADC reading.
* PIN_VOLTAGE: Calculated voltage reading.
*/
enum AnalogReadMode {
ANALOG_READ_MODE_UNSPECIFIED = 0;
ANALOG_READ_MODE_PIN_VALUE = 1;
ANALOG_READ_MODE_PIN_VOLTAGE = 2;
}
}

message AnalogIORemove {
int32 gpio_num = 1; // correlates with `name` in the JSON
}


message AnalogIOEvent {
int32 gpio_num = 1; // correlates with `name` in the JSON
wippersnapper.sensor.v1.SensorEvent sensor_event = 2[(nanopb).max_count = 15]; /** A, optionally repeated, SensorEvent from a sensor. */
}
48 changes: 10 additions & 38 deletions proto/wippersnapper/description/v1/description.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,20 @@ import "nanopb/nanopb.proto";
* CreateDescriptionRequest identifies a device with Adafruit.io WipperSnapper.
*/
message CreateDescriptionRequest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to get to something better than "description" before we're done. Not sure what right now, depends whether we drop the response part. If it's just checking in with your Semver, maybe "checkin" or something.

string machine_name = 1 [(nanopb).max_size = 64]; /** Identifies client's physical hardware */
int32 mac_addr = 2; /** Client's UID, last 3 bytes of MAC address */
int32 usb_vid = 3; /** Optional, USB Vendor ID */
int32 usb_pid = 4; /** Optional, USB Product ID */
Version version = 5 [deprecated = true, (nanopb).type = FT_IGNORE]; /** Client's library version. */
int32 ver_major = 10 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_minor = 11 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_patch = 12 [deprecated = true, (nanopb).type = FT_IGNORE];
string ver_pre_release = 13 [deprecated = true, (nanopb).type = FT_IGNORE, (nanopb).max_size = 6];
int32 ver_build = 14 [deprecated = true, (nanopb).type = FT_IGNORE];
string str_version = 15 [(nanopb).max_size = 20]; /** Library version, as a string */


message Version {
uint64 major = 1 [deprecated = true, (nanopb).type = FT_IGNORE];
uint64 minor = 2 [deprecated = true, (nanopb).type = FT_IGNORE];
uint64 micro = 3 [deprecated = true, (nanopb).type = FT_IGNORE];
string label = 4 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_major = 5 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_minor = 6 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_patch = 7 [deprecated = true, (nanopb).type = FT_IGNORE];
string ver_pre_release = 8 [deprecated = true, (nanopb).type = FT_IGNORE];
int32 ver_build = 9 [deprecated = true, (nanopb).type = FT_IGNORE];
}
string str_version = 1 [(nanopb).max_size = 20]; /** Library version, as a string */
}

// TODO: Consider dropping this, and compiling these as a header file (per-board) from the
// JSON if it is possible to do so.

// This is handled within decodeRegistrationResp(). We would like to drop it completely.
// TODO: Try the new esp32 function sto detect totoal gpio, analog and reference
// If that works, we can try to remove WipperSnapper_Register.cpp entirely and use the esp32 func
// to detect on ESP32 platforms, otherwise add these values into _Boards.h
/**
* CreateDescriptionResponse represents a device's specifications.
* CreateDescription represents a device's specifications.
*/
message CreateDescriptionResponse {
message CreateDescription {
Response response = 1; /** Specifies if the hardware definition exists on the server. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticing the "response" part, I guess even if we wanted to do away with this response entirely, we'd need a way to signal that the checkin failed in this way (board lookup failed). Maybe that's another Error message type and the broker can just send that.

int32 total_gpio_pins = 2; /** Specifies the number of GPIO pins on the client's physical hardware. */
int32 total_analog_pins = 3; /** Specifies the number of analog pins on the client's physical hardware. */
Expand All @@ -63,15 +47,3 @@ message CreateDescriptionResponse {
message RegistrationComplete {
bool is_complete = 1; /** True if device successfully configured its components, False otherwise. */
}

// Request the board definition JSON from a device
// MQTT Topic: `device/ID/description/get`
message GetDefinitionRequest {
string data = 1 [deprecated = true, (nanopb).type = FT_IGNORE]; // Request may be any UTF-8 string value
}

// Response from Adafruit IO with the JSON board definition as a string
// MQTT Topic: `device/ID/description/get`
message GetDefinitionResponse {
string board_definition = 1 [deprecated = true, (nanopb).type = FT_IGNORE]; // Response is JSON data encoded as a string
}
34 changes: 34 additions & 0 deletions proto/wippersnapper/digitalio/v1/digitalio.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-FileCopyrightText: 2023 Brent Rubell, Loren Norman, Tyeth Gundry for Adafruit Industries
// SPDX-License-Identifier: MIT
syntax = "proto3";

package wippersnapper.digitalio.v1;
import "nanopb/nanopb.proto";

// DigitalInput is a digital input pin.
message DigitalIOAdd {
int32 gpio_num = 1; // correlates with `name` in the JSON
DigitalIODirection gpio_direction = 2;
float period = 3; /** Optionally specifies the time between measurements, in seconds. */
bool value = 4; /** For sync only - optionally send the pin's value. */

/**
* Direction. Specifies the pin's direction, INPUT or OUTPUT.
*/
enum DigitalIODirection {
DIRECTION_UNSPECIFIED = 0; /** Invalid Direction from Broker. */
DIRECTION_INPUT = 1; /** Set the pin to behave as an input. */
DIRECTION_INPUT_PULL_UP = 2; /** Set the pin to behave as an input. */
DIRECTION_OUTPUT = 3; /** Set the pin to behave as an output. */
}
}

message DigitalIORemove {
int32 gpio_num = 1; // correlates with `name` in the JSON
}

message DigitalIOEvent {
int32 gpio_num = 1;
bool value = 2;
}

24 changes: 12 additions & 12 deletions proto/wippersnapper/ds18x20/v1/ds18x20.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,40 @@ syntax = "proto3";

package wippersnapper.ds18x20.v1;
import "nanopb/nanopb.proto";
import "wippersnapper/i2c/v1/i2c.proto";
import "wippersnapper/sensor/v1/sensor.proto";

/**
* Ds18x20InitRequest represents a request to initialize
* Ds18x20Add represents a to initialize
* a DS18X20 Maxim temperature sensor, from the broker.
* NOTE: This API only supports ONE DS18X20 device PER OneWire bus.
*/
message Ds18x20InitRequest {
message Ds18x20Add {
string onewire_pin = 1 [(nanopb).max_size = 5]; /** The desired pin to use as a OneWire bus. */
int32 sensor_resolution = 2; /** The desired sensor resolution (9, 10, 11, or 12 bits). */
repeated wippersnapper.i2c.v1.I2CDeviceSensorProperties i2c_device_properties = 3[(nanopb).max_count = 2]; /** Properties for the DS18x20 sensor. */
repeated wippersnapper.sensor.v1.SensorType sensor_type = 3[(nanopb).max_count = 2]; /** Properties for the DS18x20 sensor. */
}

/**
* ds18x20InitDs18x20InitResponseResponse represents a device's response
* to a ds18x20InitRequest message.
* Ds18x20AddDs18x20AddedResponse represents a device's response
* to a Ds18x20Add message.
*/
message Ds18x20InitResponse {
message Ds18x20Added {
bool is_initialized = 1; /** True if the 1-wire bus has been initialized successfully, False otherwise. */
string onewire_pin = 2 [(nanopb).max_size = 5]; /** The pin being used as a OneWire bus. */
}

/**
* Ds18x20DeInitRequest represents a request to de-initialize a DS18X20
* Ds18x20Remove represents a to de-initialize a DS18X20
* Maxim temperature sensor, from the broker.
*/
message Ds18x20DeInitRequest {
message Ds18x20Remove {
string onewire_pin = 1 [(nanopb).max_size = 5]; /** The desired onewire bus to de-initialize a DS18x sensor on and release. */
}

/**
* Ds18x20DeviceEvent event represents data from **one** DS18X20 sensor.
* Ds18x20Event event represents data from **one** DS18X20 sensor.
*/
message Ds18x20DeviceEvent {
message Ds18x20Event {
string onewire_pin = 1 [(nanopb).max_size = 5]; /** The desired pin to use as a OneWire bus. */
repeated wippersnapper.i2c.v1.SensorEvent sensor_event = 2 [(nanopb).max_count = 2]; /** The DS18X20's SensorEvent. */
repeated wippersnapper.sensor.v1.SensorEvent sensor_event = 2 [(nanopb).max_count = 2]; /** The DS18X20's SensorEvent. */
}
20 changes: 20 additions & 0 deletions proto/wippersnapper/error/v1/error.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-FileCopyrightText: 2023 Brent Rubell, Loren Norman, Tyeth Gundry for Adafruit Industries
// SPDX-License-Identifier: MIT
syntax = "proto3";

package wippersnapper.error.v1;
import "nanopb/nanopb.proto";

// TODO: Add error handling on the device-side to parse error
// message and either delay on throttle, or disconnect + exponential retry+jitter
// on ban time

// Jitter should be unique to each device, possibly derived from its clientID

message Error {
option (nanopb_msgopt).submsg_callback = true; // TODO: Do we need this option field?
oneof payload {
int32 ban_time = 1;
int32 throttle_time = 2;
}
}
Loading