From c319ec662b3d5c1b13aa4c398273b620cf4d04b8 Mon Sep 17 00:00:00 2001 From: "Jason A. Cox" Date: Tue, 21 Nov 2023 23:30:00 -0800 Subject: [PATCH] Add tedapi decode tool --- tools/tedapi/README.md | 156 ++++++++ tools/tedapi/decode.py | 34 ++ tools/tedapi/tedapi.proto | 180 +++++++++ tools/tedapi/tedapi_pb2.py | 758 +++++++++++++++++++++++++++++++++++++ 4 files changed, 1128 insertions(+) create mode 100644 tools/tedapi/README.md create mode 100644 tools/tedapi/decode.py create mode 100644 tools/tedapi/tedapi.proto create mode 100644 tools/tedapi/tedapi_pb2.py diff --git a/tools/tedapi/README.md b/tools/tedapi/README.md new file mode 100644 index 0000000..3c270ba --- /dev/null +++ b/tools/tedapi/README.md @@ -0,0 +1,156 @@ +# Decode /tedapi API Payloads + +This tool is to help decode `/tedapi` API payloads (requests and responses) using a Protobuf schema definition file [tedapi.proto](tedapi.proto). + +## Tool + +```bash +# Build python bindings for protobuf schema - tedapi_pb2.py +protoc --python_out=. tedapi.proto + +# Decode payload +python decode.py +``` + +## Background + +* This requires using the gateway WiFi access point (for PW2/+ systems this is TEG-xxx and for PW3 it is TeslaPW_xxx) and the https://192.168.91.1 endpoint. It seems that this is required for the /tedapi endpoints (LAN or other access results in "User does not have adequate access rights" 403 Error) +* The /tedapi API calls are using binary Protocol Buffers ([protobuf](https://protobuf.dev/)) payloads. + +## APIs + +### GET /tedapi/din + +This API fetches the Powerwall DIN (device identification number). It uses basic auth that appears to be: Tesla_Energy_Device:GW_PWD where the GW_PWD is the password near the QR code on the Powerwall that you scan with the Tesla Pros app. + +```bash +curl -v -k -u "Tesla_Energy_Device:GW_PWD"" https://192.168.91.1/tedapi/din +``` + +It only returns a simple string that contains the DIN: + +``` +1232100-00-E--TG123456789012 +``` + +### POST /tedapi/v1 + +This appears to be the workhorse function. It uses basic auth that appears to be: `Tesla_Energy_Device:GW_PWD` where the GW_PWD is the password near the QR code on the Powerwall that you scan with the Tesla Pros app. + +```bash +curl -v -k -H 'Content-type: application/octet-string' -u "Tesla_Energy_Device:GW_PWD" --data-binary @request.bin https://192.168.91.1/tedapi/v1 +``` + +Payloads are binary Protocol Buffers (protobufs). + +* The [decode.py](decode.py) tool will help decode this using the proto file. +* Or you can use `protoc --decode_raw < v1_request` to decode the raw response. + +There appear to be different types of request sent. One is for `config` which gets a payload that contains the configuration of the Powerwall. Another is for `query` that gets current data (e.g. systemStatus, realPowerW, voltages, frequencies, etc.). + +#### CONFIG Example + +```bash +# Request Config Data from Powerwall +curl -v -k -H 'Content-type: application/octet-string' -u "Tesla_Energy_Device:GW_PWD" --data-binary @request.bin https://192.168.91.1/tedapi/v1 > response.bin + +# Decode Config Data +python3 decode.py response.bin +``` + +An example response shows the system config data in the JSON `text` (removed to protect the innocent) and a `code` payload (TBD). + +``` +message { + head: 1 + response { + din: "1232100-00-E--TG123456789012" + } + request { + value: 1 + } + config { + recv { + file { + name: "config.json" + text: "{...JSON Payload Removed...}" + } + code: "...Binary Data Removed..." + } + } +} +tail { + value: 1 +} +``` + +#### QUERY Example + +To get the status of the Powerwall, send a binary query.bin payload. The structure of the query payload has a `text` query string that seems to be an exhaustive list of labels. The `code` field is a binary payload. + +``` +message { + head: 1 + response { + value: 1 + } + request { + din: "1232100-00-E--TG123456789012" + } + payload { + send { + num: 2 + payload { + value: 1 + text: " query DeviceControllerQuery {\n control {\n systemStatus {\n nominalFullPackEnergyWh...Truncated..." + } + code: "0\201\210...Truncated..." + b { + value: "{}" + } + } + } +} +tail { + value: 1 +} + +``` + +```bash +# Request Status Data from Powerwall +curl -v -k -H 'Content-type: application/octet-string' -u "Tesla_Energy_Device:GW_PWD" --data-binary @query.bin https://192.168.91.1/tedapi/v1 > response.bin + +# Decode Config Data +python3 decode.py response.bin +``` + +An example response shows the system status data in the JSON `text` field (truncated). + +``` +message { + head: 1 + response { + din: "1232100-00-E--TG121048001E4G" + } + request { + value: 1 + } + payload { + recv { + value: 1 + text: "{\"control\":{\"alerts\":{\"active\":[\"SystemConnectedToGrid\",\"FWUpdateSucceeded\",\"GridCodesWrite\",\"PodCommissionTime\"]},\"batteryBlocks\":[{\"din\":\"2012170-25-E#TG123456789012\", ...Truncated...\"updateUrgencyCheck\":null}}" + } + } +} +tail { + value: 1 +} +``` + + +## Credit + +* Thanks to [zigam](https://github.com/zigam) for starting this research and the initial discovery, [post](https://github.com/jrester/tesla_powerwall/issues/20#issuecomment-1810848383) and tips. +* Thanks to [jesaf00](https://github.com/jesaf00) for opening the [Powerwall 3 Support issue](https://github.com/jasonacox/Powerwall-Dashboard/issues/387) and help testing. +* Thanks to others helping test: [longzheng](https://github.com/longzheng) [pbburkhalter](https://github.com/pbburkhalter) [stevecastaneda](https://github.com/stevecastaneda) diff --git a/tools/tedapi/decode.py b/tools/tedapi/decode.py new file mode 100644 index 0000000..b5d4689 --- /dev/null +++ b/tools/tedapi/decode.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +""" + Python module to decode tedapi protobuf data + + Requires: + - Protobuf pip install protobuf + - Generate tedapi_pb2.py with protoc --python_out=. tedapi.proto + + Author: Jason A. Cox + For more information see https://github.com/jasonacox/pypowerwall +""" + +import tedapi_pb2 +import sys + +FILENAME = 'request.bin' + +# Set filename from command line if specified +filename = FILENAME +if len(sys.argv) > 1: + filename = sys.argv[1] + +# Open request or response file and read data +with open(filename, 'rb') as f: + data = f.read() + +# Decode protobuf data +tedapi = tedapi_pb2.ParentMessage() +tedapi.ParseFromString(data) +print(tedapi) + + + + diff --git a/tools/tedapi/tedapi.proto b/tools/tedapi/tedapi.proto new file mode 100644 index 0000000..bc5922c --- /dev/null +++ b/tools/tedapi/tedapi.proto @@ -0,0 +1,180 @@ +// Tesla tedapi API Protocol Buffer definition (tedapi.proto) +// +// Create tedapi_pb2.py for use in projects using the protoc compiler: +// protoc --python_out=. tedapi.proto +// +// Author: Jason A. Cox - Date: 21 Nov 2023 - Version: 1.0 +// +// For more information see https://github.com/jasonacox/pypowerwall + +syntax = "proto3"; + +package tedapi; + + +// ***** Parent ***** + +message ParentMessage { + Message message = 1; + Tail tail = 2; +} + +message Message { + int32 head = 1; + StringNumber response = 2; + StringNumber request = 3; + optional ConfigType config = 15; + optional QueryType payload = 16; +} + +message StringNumber { // 2 + optional string din = 1; + optional int32 value = 3; +} + +message Tail { + int32 value = 1; +} + +// ***** Query = 16 ***** + +message QueryType { // 16 + optional PayloadQuerySend send = 1; + optional PayloadString recv = 2; +} + +message PayloadQuerySend { // 1 + optional int32 num = 1; + optional PayloadString payload = 2; + optional bytes code = 3; + optional StringValue b = 4; +} + +// ***** Config = 15 ***** + +message ConfigType { // 15 + optional PayloadConfigSend send = 1; + optional PayloadConfigRecv recv = 2; +} + +message PayloadConfigSend { // 1 + PayloadString file = 1; +} + +message PayloadConfigRecv { // 2 + ConfigString file = 1; + bytes code = 2; +} + +message ConfigString { + string name = 1; + string text = 100; +} + +// ***** General ***** + +message PayloadString { + int32 value = 1; + string text = 2; +} + +message StringValue { + string value = 1; +} + +message NumberValue { + int32 value = 3; +} + +// ***** BASED ON RAW DECODED PAYLOADS ***** +// +// REQUEST - config +// 1 { +// 1: 1 +// 2 { +// 3: 1 +// } +// 3 { +// 1: "1232100-00-E--TG123456789012" +// } +// 15 { +// 1 { +// 1: 1 +// 2: "config.json" +// } +// } +// } +// 2 { +// 1: 1 +// } +// +// RESPONSE - config +// 1 { +// 1: 1 +// 2 { +// 1: "1232100-00-E--TG123456789012" +// } +// 3 { +// 3: 1 +// } +// 15 { +// 2 { +// 1 { +// 1: "config.json" +// 100: "{}" +// } +// 2: "\255\177t+5\35..." +// } +// } +// } +// 2 { +// 1: 1 +// } +// +// +// REQUEST - query +// 1 { +// 1: 1 +// 2 { +// 3: 1 +// } +// 3 { +// 1: "1232100-00-E--TG123456789012" +// } +// 16 { +// 1 { +// 1: 2 +// 2 { +// 1: 1 +// 2: " query DeviceControllerQuery {..." +// } +// 3: "0\201\210\002B\0026\335T\310\02..." +// 4 { +// 1: "{}" +// } +// } +// } +// } +// 2 { +// 1: 1 +// } +// +// RESPONSE - query +// 1 { +// 1: 1 +// 2 { +// 1: "1232100-00-E--TG123456789012" +// } +// 3 { +// 3: 1 +// } +// 16 { +// 2 { +// 1: 1 +// 2: "{...}" +// } +// } +// } +// 2 { +// 1: 1 +// } \ No newline at end of file diff --git a/tools/tedapi/tedapi_pb2.py b/tools/tedapi/tedapi_pb2.py new file mode 100644 index 0000000..39c2cb1 --- /dev/null +++ b/tools/tedapi/tedapi_pb2.py @@ -0,0 +1,758 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: tedapi.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='tedapi.proto', + package='tedapi', + syntax='proto3', + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0ctedapi.proto\x12\x06tedapi\"M\n\rParentMessage\x12 \n\x07message\x18\x01 \x01(\x0b\x32\x0f.tedapi.Message\x12\x1a\n\x04tail\x18\x02 \x01(\x0b\x32\x0c.tedapi.Tail\"\xcf\x01\n\x07Message\x12\x0c\n\x04head\x18\x01 \x01(\x05\x12&\n\x08response\x18\x02 \x01(\x0b\x32\x14.tedapi.StringNumber\x12%\n\x07request\x18\x03 \x01(\x0b\x32\x14.tedapi.StringNumber\x12\'\n\x06\x63onfig\x18\x0f \x01(\x0b\x32\x12.tedapi.ConfigTypeH\x00\x88\x01\x01\x12\'\n\x07payload\x18\x10 \x01(\x0b\x32\x11.tedapi.QueryTypeH\x01\x88\x01\x01\x42\t\n\x07_configB\n\n\x08_payload\"F\n\x0cStringNumber\x12\x10\n\x03\x64in\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_dinB\x08\n\x06_value\"\x15\n\x04Tail\x12\r\n\x05value\x18\x01 \x01(\x05\"t\n\tQueryType\x12+\n\x04send\x18\x01 \x01(\x0b\x32\x18.tedapi.PayloadQuerySendH\x00\x88\x01\x01\x12(\n\x04recv\x18\x02 \x01(\x0b\x32\x15.tedapi.PayloadStringH\x01\x88\x01\x01\x42\x07\n\x05_sendB\x07\n\x05_recv\"\xac\x01\n\x10PayloadQuerySend\x12\x10\n\x03num\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12+\n\x07payload\x18\x02 \x01(\x0b\x32\x15.tedapi.PayloadStringH\x01\x88\x01\x01\x12\x11\n\x04\x63ode\x18\x03 \x01(\x0cH\x02\x88\x01\x01\x12#\n\x01\x62\x18\x04 \x01(\x0b\x32\x13.tedapi.StringValueH\x03\x88\x01\x01\x42\x06\n\x04_numB\n\n\x08_payloadB\x07\n\x05_codeB\x04\n\x02_b\"z\n\nConfigType\x12,\n\x04send\x18\x01 \x01(\x0b\x32\x19.tedapi.PayloadConfigSendH\x00\x88\x01\x01\x12,\n\x04recv\x18\x02 \x01(\x0b\x32\x19.tedapi.PayloadConfigRecvH\x01\x88\x01\x01\x42\x07\n\x05_sendB\x07\n\x05_recv\"8\n\x11PayloadConfigSend\x12#\n\x04\x66ile\x18\x01 \x01(\x0b\x32\x15.tedapi.PayloadString\"E\n\x11PayloadConfigRecv\x12\"\n\x04\x66ile\x18\x01 \x01(\x0b\x32\x14.tedapi.ConfigString\x12\x0c\n\x04\x63ode\x18\x02 \x01(\x0c\"*\n\x0c\x43onfigString\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x64 \x01(\t\",\n\rPayloadString\x12\r\n\x05value\x18\x01 \x01(\x05\x12\x0c\n\x04text\x18\x02 \x01(\t\"\x1c\n\x0bStringValue\x12\r\n\x05value\x18\x01 \x01(\t\"\x1c\n\x0bNumberValue\x12\r\n\x05value\x18\x03 \x01(\x05\x62\x06proto3' +) + + + + +_PARENTMESSAGE = _descriptor.Descriptor( + name='ParentMessage', + full_name='tedapi.ParentMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='message', full_name='tedapi.ParentMessage.message', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='tail', full_name='tedapi.ParentMessage.tail', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=24, + serialized_end=101, +) + + +_MESSAGE = _descriptor.Descriptor( + name='Message', + full_name='tedapi.Message', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='head', full_name='tedapi.Message.head', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='response', full_name='tedapi.Message.response', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='request', full_name='tedapi.Message.request', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='config', full_name='tedapi.Message.config', index=3, + number=15, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='payload', full_name='tedapi.Message.payload', index=4, + number=16, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_config', full_name='tedapi.Message._config', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_payload', full_name='tedapi.Message._payload', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=104, + serialized_end=311, +) + + +_STRINGNUMBER = _descriptor.Descriptor( + name='StringNumber', + full_name='tedapi.StringNumber', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='din', full_name='tedapi.StringNumber.din', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='tedapi.StringNumber.value', index=1, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_din', full_name='tedapi.StringNumber._din', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_value', full_name='tedapi.StringNumber._value', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=313, + serialized_end=383, +) + + +_TAIL = _descriptor.Descriptor( + name='Tail', + full_name='tedapi.Tail', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='tedapi.Tail.value', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=385, + serialized_end=406, +) + + +_QUERYTYPE = _descriptor.Descriptor( + name='QueryType', + full_name='tedapi.QueryType', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='send', full_name='tedapi.QueryType.send', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='recv', full_name='tedapi.QueryType.recv', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_send', full_name='tedapi.QueryType._send', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_recv', full_name='tedapi.QueryType._recv', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=408, + serialized_end=524, +) + + +_PAYLOADQUERYSEND = _descriptor.Descriptor( + name='PayloadQuerySend', + full_name='tedapi.PayloadQuerySend', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='num', full_name='tedapi.PayloadQuerySend.num', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='payload', full_name='tedapi.PayloadQuerySend.payload', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='code', full_name='tedapi.PayloadQuerySend.code', index=2, + number=3, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='b', full_name='tedapi.PayloadQuerySend.b', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_num', full_name='tedapi.PayloadQuerySend._num', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_payload', full_name='tedapi.PayloadQuerySend._payload', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_code', full_name='tedapi.PayloadQuerySend._code', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_b', full_name='tedapi.PayloadQuerySend._b', + index=3, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=527, + serialized_end=699, +) + + +_CONFIGTYPE = _descriptor.Descriptor( + name='ConfigType', + full_name='tedapi.ConfigType', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='send', full_name='tedapi.ConfigType.send', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='recv', full_name='tedapi.ConfigType.recv', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_send', full_name='tedapi.ConfigType._send', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_recv', full_name='tedapi.ConfigType._recv', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=701, + serialized_end=823, +) + + +_PAYLOADCONFIGSEND = _descriptor.Descriptor( + name='PayloadConfigSend', + full_name='tedapi.PayloadConfigSend', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='file', full_name='tedapi.PayloadConfigSend.file', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=825, + serialized_end=881, +) + + +_PAYLOADCONFIGRECV = _descriptor.Descriptor( + name='PayloadConfigRecv', + full_name='tedapi.PayloadConfigRecv', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='file', full_name='tedapi.PayloadConfigRecv.file', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='code', full_name='tedapi.PayloadConfigRecv.code', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=883, + serialized_end=952, +) + + +_CONFIGSTRING = _descriptor.Descriptor( + name='ConfigString', + full_name='tedapi.ConfigString', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='tedapi.ConfigString.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='text', full_name='tedapi.ConfigString.text', index=1, + number=100, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=954, + serialized_end=996, +) + + +_PAYLOADSTRING = _descriptor.Descriptor( + name='PayloadString', + full_name='tedapi.PayloadString', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='tedapi.PayloadString.value', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='text', full_name='tedapi.PayloadString.text', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=998, + serialized_end=1042, +) + + +_STRINGVALUE = _descriptor.Descriptor( + name='StringValue', + full_name='tedapi.StringValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='tedapi.StringValue.value', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1044, + serialized_end=1072, +) + + +_NUMBERVALUE = _descriptor.Descriptor( + name='NumberValue', + full_name='tedapi.NumberValue', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='tedapi.NumberValue.value', index=0, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1074, + serialized_end=1102, +) + +_PARENTMESSAGE.fields_by_name['message'].message_type = _MESSAGE +_PARENTMESSAGE.fields_by_name['tail'].message_type = _TAIL +_MESSAGE.fields_by_name['response'].message_type = _STRINGNUMBER +_MESSAGE.fields_by_name['request'].message_type = _STRINGNUMBER +_MESSAGE.fields_by_name['config'].message_type = _CONFIGTYPE +_MESSAGE.fields_by_name['payload'].message_type = _QUERYTYPE +_MESSAGE.oneofs_by_name['_config'].fields.append( + _MESSAGE.fields_by_name['config']) +_MESSAGE.fields_by_name['config'].containing_oneof = _MESSAGE.oneofs_by_name['_config'] +_MESSAGE.oneofs_by_name['_payload'].fields.append( + _MESSAGE.fields_by_name['payload']) +_MESSAGE.fields_by_name['payload'].containing_oneof = _MESSAGE.oneofs_by_name['_payload'] +_STRINGNUMBER.oneofs_by_name['_din'].fields.append( + _STRINGNUMBER.fields_by_name['din']) +_STRINGNUMBER.fields_by_name['din'].containing_oneof = _STRINGNUMBER.oneofs_by_name['_din'] +_STRINGNUMBER.oneofs_by_name['_value'].fields.append( + _STRINGNUMBER.fields_by_name['value']) +_STRINGNUMBER.fields_by_name['value'].containing_oneof = _STRINGNUMBER.oneofs_by_name['_value'] +_QUERYTYPE.fields_by_name['send'].message_type = _PAYLOADQUERYSEND +_QUERYTYPE.fields_by_name['recv'].message_type = _PAYLOADSTRING +_QUERYTYPE.oneofs_by_name['_send'].fields.append( + _QUERYTYPE.fields_by_name['send']) +_QUERYTYPE.fields_by_name['send'].containing_oneof = _QUERYTYPE.oneofs_by_name['_send'] +_QUERYTYPE.oneofs_by_name['_recv'].fields.append( + _QUERYTYPE.fields_by_name['recv']) +_QUERYTYPE.fields_by_name['recv'].containing_oneof = _QUERYTYPE.oneofs_by_name['_recv'] +_PAYLOADQUERYSEND.fields_by_name['payload'].message_type = _PAYLOADSTRING +_PAYLOADQUERYSEND.fields_by_name['b'].message_type = _STRINGVALUE +_PAYLOADQUERYSEND.oneofs_by_name['_num'].fields.append( + _PAYLOADQUERYSEND.fields_by_name['num']) +_PAYLOADQUERYSEND.fields_by_name['num'].containing_oneof = _PAYLOADQUERYSEND.oneofs_by_name['_num'] +_PAYLOADQUERYSEND.oneofs_by_name['_payload'].fields.append( + _PAYLOADQUERYSEND.fields_by_name['payload']) +_PAYLOADQUERYSEND.fields_by_name['payload'].containing_oneof = _PAYLOADQUERYSEND.oneofs_by_name['_payload'] +_PAYLOADQUERYSEND.oneofs_by_name['_code'].fields.append( + _PAYLOADQUERYSEND.fields_by_name['code']) +_PAYLOADQUERYSEND.fields_by_name['code'].containing_oneof = _PAYLOADQUERYSEND.oneofs_by_name['_code'] +_PAYLOADQUERYSEND.oneofs_by_name['_b'].fields.append( + _PAYLOADQUERYSEND.fields_by_name['b']) +_PAYLOADQUERYSEND.fields_by_name['b'].containing_oneof = _PAYLOADQUERYSEND.oneofs_by_name['_b'] +_CONFIGTYPE.fields_by_name['send'].message_type = _PAYLOADCONFIGSEND +_CONFIGTYPE.fields_by_name['recv'].message_type = _PAYLOADCONFIGRECV +_CONFIGTYPE.oneofs_by_name['_send'].fields.append( + _CONFIGTYPE.fields_by_name['send']) +_CONFIGTYPE.fields_by_name['send'].containing_oneof = _CONFIGTYPE.oneofs_by_name['_send'] +_CONFIGTYPE.oneofs_by_name['_recv'].fields.append( + _CONFIGTYPE.fields_by_name['recv']) +_CONFIGTYPE.fields_by_name['recv'].containing_oneof = _CONFIGTYPE.oneofs_by_name['_recv'] +_PAYLOADCONFIGSEND.fields_by_name['file'].message_type = _PAYLOADSTRING +_PAYLOADCONFIGRECV.fields_by_name['file'].message_type = _CONFIGSTRING +DESCRIPTOR.message_types_by_name['ParentMessage'] = _PARENTMESSAGE +DESCRIPTOR.message_types_by_name['Message'] = _MESSAGE +DESCRIPTOR.message_types_by_name['StringNumber'] = _STRINGNUMBER +DESCRIPTOR.message_types_by_name['Tail'] = _TAIL +DESCRIPTOR.message_types_by_name['QueryType'] = _QUERYTYPE +DESCRIPTOR.message_types_by_name['PayloadQuerySend'] = _PAYLOADQUERYSEND +DESCRIPTOR.message_types_by_name['ConfigType'] = _CONFIGTYPE +DESCRIPTOR.message_types_by_name['PayloadConfigSend'] = _PAYLOADCONFIGSEND +DESCRIPTOR.message_types_by_name['PayloadConfigRecv'] = _PAYLOADCONFIGRECV +DESCRIPTOR.message_types_by_name['ConfigString'] = _CONFIGSTRING +DESCRIPTOR.message_types_by_name['PayloadString'] = _PAYLOADSTRING +DESCRIPTOR.message_types_by_name['StringValue'] = _STRINGVALUE +DESCRIPTOR.message_types_by_name['NumberValue'] = _NUMBERVALUE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +ParentMessage = _reflection.GeneratedProtocolMessageType('ParentMessage', (_message.Message,), { + 'DESCRIPTOR' : _PARENTMESSAGE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.ParentMessage) + }) +_sym_db.RegisterMessage(ParentMessage) + +Message = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), { + 'DESCRIPTOR' : _MESSAGE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.Message) + }) +_sym_db.RegisterMessage(Message) + +StringNumber = _reflection.GeneratedProtocolMessageType('StringNumber', (_message.Message,), { + 'DESCRIPTOR' : _STRINGNUMBER, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.StringNumber) + }) +_sym_db.RegisterMessage(StringNumber) + +Tail = _reflection.GeneratedProtocolMessageType('Tail', (_message.Message,), { + 'DESCRIPTOR' : _TAIL, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.Tail) + }) +_sym_db.RegisterMessage(Tail) + +QueryType = _reflection.GeneratedProtocolMessageType('QueryType', (_message.Message,), { + 'DESCRIPTOR' : _QUERYTYPE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.QueryType) + }) +_sym_db.RegisterMessage(QueryType) + +PayloadQuerySend = _reflection.GeneratedProtocolMessageType('PayloadQuerySend', (_message.Message,), { + 'DESCRIPTOR' : _PAYLOADQUERYSEND, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.PayloadQuerySend) + }) +_sym_db.RegisterMessage(PayloadQuerySend) + +ConfigType = _reflection.GeneratedProtocolMessageType('ConfigType', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGTYPE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.ConfigType) + }) +_sym_db.RegisterMessage(ConfigType) + +PayloadConfigSend = _reflection.GeneratedProtocolMessageType('PayloadConfigSend', (_message.Message,), { + 'DESCRIPTOR' : _PAYLOADCONFIGSEND, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.PayloadConfigSend) + }) +_sym_db.RegisterMessage(PayloadConfigSend) + +PayloadConfigRecv = _reflection.GeneratedProtocolMessageType('PayloadConfigRecv', (_message.Message,), { + 'DESCRIPTOR' : _PAYLOADCONFIGRECV, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.PayloadConfigRecv) + }) +_sym_db.RegisterMessage(PayloadConfigRecv) + +ConfigString = _reflection.GeneratedProtocolMessageType('ConfigString', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGSTRING, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.ConfigString) + }) +_sym_db.RegisterMessage(ConfigString) + +PayloadString = _reflection.GeneratedProtocolMessageType('PayloadString', (_message.Message,), { + 'DESCRIPTOR' : _PAYLOADSTRING, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.PayloadString) + }) +_sym_db.RegisterMessage(PayloadString) + +StringValue = _reflection.GeneratedProtocolMessageType('StringValue', (_message.Message,), { + 'DESCRIPTOR' : _STRINGVALUE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.StringValue) + }) +_sym_db.RegisterMessage(StringValue) + +NumberValue = _reflection.GeneratedProtocolMessageType('NumberValue', (_message.Message,), { + 'DESCRIPTOR' : _NUMBERVALUE, + '__module__' : 'tedapi_pb2' + # @@protoc_insertion_point(class_scope:tedapi.NumberValue) + }) +_sym_db.RegisterMessage(NumberValue) + + +# @@protoc_insertion_point(module_scope)