mirror of
https://github.com/meshtastic/python.git
synced 2025-12-26 09:27:52 -05:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23bb2e26f9 | ||
|
|
b59ecff272 | ||
|
|
17f3605736 | ||
|
|
a689fd73a2 | ||
|
|
da30e1141a | ||
|
|
b4bd9568e4 | ||
|
|
aed4f25cf5 | ||
|
|
5c312bedc1 | ||
|
|
428e9a228c | ||
|
|
4500850063 | ||
|
|
bcce5687c5 | ||
|
|
b9d805057f | ||
|
|
d77335caa7 | ||
|
|
b692ef4cfb | ||
|
|
e725292ee0 | ||
|
|
abf9e96d3d | ||
|
|
740f0f0961 | ||
|
|
abb00251c0 | ||
|
|
3335b3d651 | ||
|
|
4ad776f219 | ||
|
|
d5f732263a | ||
|
|
c59583e4bd | ||
|
|
28d8355547 | ||
|
|
d57186d1e4 | ||
|
|
a8d86dee2d |
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -28,6 +28,11 @@ jobs:
|
||||
run: >-
|
||||
poetry version patch
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: >-
|
||||
poetry version --short | sed 's/^/::set-output name=version::/'
|
||||
|
||||
- name: Commit updated version.
|
||||
id: commit_updated
|
||||
run: |
|
||||
@@ -35,14 +40,9 @@ jobs:
|
||||
git config --global user.email 'bot@noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
||||
git add pyproject.toml
|
||||
git commit -m "bump version" && git push || echo "No changes to commit"
|
||||
git commit -m "bump version to ${{ steps.get_version.outputs.version }}" && git push || echo "No changes to commit"
|
||||
git log -n 1 --pretty=format:"%H" | tail -n 1 | awk '{print "::set-output name=sha::"$0}'
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: >-
|
||||
poetry version --short | sed 's/^/::set-output name=version::/'
|
||||
|
||||
- name: Create GitHub release
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
@@ -52,6 +52,7 @@ jobs:
|
||||
prerelease: true
|
||||
release_name: Meshtastic Python ${{ steps.get_version.outputs.version }}
|
||||
tag_name: ${{ steps.get_version.outputs.version }}
|
||||
commitish: ${{ steps.commit_updated.outputs.sha }}
|
||||
body: |
|
||||
Autogenerated by github action, developer should edit as required before publishing...
|
||||
env:
|
||||
|
||||
@@ -314,35 +314,17 @@ def onConnected(interface):
|
||||
print("Setting device position and enabling fixed position setting")
|
||||
# can include lat/long/alt etc: latitude = 37.5, longitude = -122.1
|
||||
interface.localNode.setFixedPosition(lat, lon, alt)
|
||||
elif not args.no_time:
|
||||
# We normally provide a current time to the mesh when we connect
|
||||
if (
|
||||
interface.localNode.nodeNum in interface.nodesByNum
|
||||
and "position" in interface.nodesByNum[interface.localNode.nodeNum]
|
||||
):
|
||||
# send the same position the node already knows, just to update time
|
||||
position = interface.nodesByNum[interface.localNode.nodeNum]["position"]
|
||||
interface.sendPosition(
|
||||
position.get("latitude", 0.0),
|
||||
position.get("longitude", 0.0),
|
||||
position.get("altitude", 0.0),
|
||||
)
|
||||
else:
|
||||
interface.sendPosition()
|
||||
|
||||
if args.set_owner:
|
||||
if args.set_owner or args.set_owner_short:
|
||||
closeNow = True
|
||||
waitForAckNak = True
|
||||
print(f"Setting device owner to {args.set_owner}")
|
||||
interface.getNode(args.dest, False).setOwner(args.set_owner)
|
||||
|
||||
if args.set_owner_short:
|
||||
closeNow = True
|
||||
waitForAckNak = True
|
||||
print(f"Setting device owner short to {args.set_owner_short}")
|
||||
interface.getNode(args.dest, False).setOwner(
|
||||
long_name=None, short_name=args.set_owner_short
|
||||
)
|
||||
if args.set_owner and args.set_owner_short:
|
||||
print(f"Setting device owner to {args.set_owner} and short name to {args.set_owner_short}")
|
||||
elif args.set_owner:
|
||||
print(f"Setting device owner to {args.set_owner}")
|
||||
else: # short name only
|
||||
print(f"Setting device owner short to {args.set_owner_short}")
|
||||
interface.getNode(args.dest, False).setOwner(long_name=args.set_owner, short_name=args.set_owner_short)
|
||||
|
||||
# TODO: add to export-config and configure
|
||||
if args.set_canned_message:
|
||||
@@ -778,7 +760,8 @@ def onConnected(interface):
|
||||
channelIndex = mt_config.channel_index
|
||||
if channelIndex is None:
|
||||
meshtastic.util.our_exit("Warning: Need to specify '--ch-index'.", 1)
|
||||
ch = interface.getNode(args.dest).channels[channelIndex]
|
||||
node = interface.getNode(args.dest)
|
||||
ch = node.channels[channelIndex]
|
||||
|
||||
if args.ch_enable or args.ch_disable:
|
||||
print(
|
||||
@@ -836,7 +819,7 @@ def onConnected(interface):
|
||||
ch.role = channel_pb2.Channel.Role.DISABLED
|
||||
|
||||
print(f"Writing modified channels to device")
|
||||
interface.getNode(args.dest).writeChannel(channelIndex)
|
||||
node.writeChannel(channelIndex)
|
||||
|
||||
if args.get_canned_message:
|
||||
closeNow = True
|
||||
@@ -1466,6 +1449,10 @@ def initParser():
|
||||
|
||||
group.add_argument("--set-owner", help="Set device owner name", action="store")
|
||||
|
||||
group.add_argument(
|
||||
"--set-owner-short", help="Set device owner short name", action="store"
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--set-canned-message",
|
||||
help="Set the canned messages plugin message (up to 200 characters).",
|
||||
@@ -1478,10 +1465,6 @@ def initParser():
|
||||
action="store",
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--set-owner-short", help="Set device owner short name", action="store"
|
||||
)
|
||||
|
||||
group.add_argument(
|
||||
"--set-ham", help="Set licensed Ham ID and turn off encryption", action="store"
|
||||
)
|
||||
@@ -1587,7 +1570,7 @@ def initParser():
|
||||
|
||||
group.add_argument(
|
||||
"--no-time",
|
||||
help="Suppress sending the current time to the mesh",
|
||||
help="Deprecated. Retained for backwards compatibility in scripts, but is a no-op.",
|
||||
action="store_true",
|
||||
)
|
||||
|
||||
|
||||
@@ -442,7 +442,6 @@ class MeshInterface: # pylint: disable=R0902
|
||||
latitude: float = 0.0,
|
||||
longitude: float = 0.0,
|
||||
altitude: int = 0,
|
||||
timeSec: int = 0,
|
||||
destinationId: Union[int, str] = BROADCAST_ADDR,
|
||||
wantAck: bool = False,
|
||||
wantResponse: bool = False,
|
||||
@@ -454,8 +453,6 @@ class MeshInterface: # pylint: disable=R0902
|
||||
Also, the device software will notice this packet and use it to automatically
|
||||
set its notion of the local position.
|
||||
|
||||
If timeSec is not specified (recommended), we will use the local machine time.
|
||||
|
||||
Returns the sent packet. The id field will be populated in this packet and
|
||||
can be used to track future message acks/naks.
|
||||
"""
|
||||
@@ -472,11 +469,6 @@ class MeshInterface: # pylint: disable=R0902
|
||||
p.altitude = int(altitude)
|
||||
logging.debug(f"p.altitude:{p.altitude}")
|
||||
|
||||
if timeSec == 0:
|
||||
timeSec = int(time.time()) # returns unix timestamp in seconds
|
||||
p.time = timeSec
|
||||
logging.debug(f"p.time:{p.time}")
|
||||
|
||||
if wantResponse:
|
||||
onResponse = self.onResponsePosition
|
||||
else:
|
||||
@@ -812,19 +804,22 @@ class MeshInterface: # pylint: disable=R0902
|
||||
lambda: pub.sendMessage("meshtastic.connection.lost", interface=self)
|
||||
)
|
||||
|
||||
def sendHeartbeat(self):
|
||||
"""Sends a heartbeat to the radio. Can be used to verify the connection is healthy."""
|
||||
p = mesh_pb2.ToRadio()
|
||||
p.heartbeat.CopyFrom(mesh_pb2.Heartbeat())
|
||||
self._sendToRadio(p)
|
||||
|
||||
def _startHeartbeat(self):
|
||||
"""We need to send a heartbeat message to the device every X seconds"""
|
||||
|
||||
def callback():
|
||||
self.heartbeatTimer = None
|
||||
i = 300
|
||||
logging.debug(f"Sending heartbeat, interval {i} seconds")
|
||||
if i != 0:
|
||||
self.heartbeatTimer = threading.Timer(i, callback)
|
||||
self.heartbeatTimer.start()
|
||||
p = mesh_pb2.ToRadio()
|
||||
p.heartbeat.CopyFrom(mesh_pb2.Heartbeat())
|
||||
self._sendToRadio(p)
|
||||
interval = 300
|
||||
logging.debug(f"Sending heartbeat, interval {interval} seconds")
|
||||
self.heartbeatTimer = threading.Timer(interval, callback)
|
||||
self.heartbeatTimer.start()
|
||||
self.sendHeartbeat()
|
||||
|
||||
callback() # run our periodic callback now, it will make another timer if necessary
|
||||
|
||||
@@ -975,13 +970,6 @@ class MeshInterface: # pylint: disable=R0902
|
||||
self.localNode.nodeNum = self.myInfo.my_node_num
|
||||
logging.debug(f"Received myinfo: {stripnl(fromRadio.my_info)}")
|
||||
|
||||
failmsg = None
|
||||
|
||||
if failmsg:
|
||||
self.failure = MeshInterface.MeshInterfaceError(failmsg)
|
||||
self.isConnected.set() # let waitConnected return this exception
|
||||
self.close()
|
||||
|
||||
elif fromRadio.HasField("metadata"):
|
||||
self.metadata = fromRadio.metadata
|
||||
logging.debug(f"Received device metadata: {stripnl(fromRadio.metadata)}")
|
||||
|
||||
@@ -5,7 +5,7 @@ import base64
|
||||
import logging
|
||||
import time
|
||||
|
||||
from typing import Union
|
||||
from typing import Optional, Union
|
||||
|
||||
from meshtastic.protobuf import admin_pb2, apponly_pb2, channel_pb2, localonly_pb2, mesh_pb2, portnums_pb2
|
||||
from meshtastic.util import (
|
||||
@@ -279,7 +279,7 @@ class Node:
|
||||
return c.index
|
||||
return 0
|
||||
|
||||
def setOwner(self, long_name=None, short_name=None, is_licensed=False):
|
||||
def setOwner(self, long_name: Optional[str]=None, short_name: Optional[str]=None, is_licensed: bool=False):
|
||||
"""Set device owner name"""
|
||||
logging.debug(f"in setOwner nodeNum:{self.nodeNum}")
|
||||
p = admin_pb2.AdminMessage()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1378,6 +1378,7 @@ class Config(google.protobuf.message.Message):
|
||||
OVERRIDE_DUTY_CYCLE_FIELD_NUMBER: builtins.int
|
||||
SX126X_RX_BOOSTED_GAIN_FIELD_NUMBER: builtins.int
|
||||
OVERRIDE_FREQUENCY_FIELD_NUMBER: builtins.int
|
||||
PA_FAN_DISABLED_FIELD_NUMBER: builtins.int
|
||||
IGNORE_INCOMING_FIELD_NUMBER: builtins.int
|
||||
IGNORE_MQTT_FIELD_NUMBER: builtins.int
|
||||
use_preset: builtins.bool
|
||||
@@ -1465,6 +1466,10 @@ class Config(google.protobuf.message.Message):
|
||||
Please respect your local laws and regulations. If you are a HAM, make sure you
|
||||
enable HAM mode and turn off encryption.
|
||||
"""
|
||||
pa_fan_disabled: builtins.bool
|
||||
"""
|
||||
If true, disable the build-in PA FAN using pin define in RF95_FAN_EN.
|
||||
"""
|
||||
ignore_mqtt: builtins.bool
|
||||
"""
|
||||
If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it.
|
||||
@@ -1494,10 +1499,11 @@ class Config(google.protobuf.message.Message):
|
||||
override_duty_cycle: builtins.bool = ...,
|
||||
sx126x_rx_boosted_gain: builtins.bool = ...,
|
||||
override_frequency: builtins.float = ...,
|
||||
pa_fan_disabled: builtins.bool = ...,
|
||||
ignore_incoming: collections.abc.Iterable[builtins.int] | None = ...,
|
||||
ignore_mqtt: builtins.bool = ...,
|
||||
) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["bandwidth", b"bandwidth", "channel_num", b"channel_num", "coding_rate", b"coding_rate", "frequency_offset", b"frequency_offset", "hop_limit", b"hop_limit", "ignore_incoming", b"ignore_incoming", "ignore_mqtt", b"ignore_mqtt", "modem_preset", b"modem_preset", "override_duty_cycle", b"override_duty_cycle", "override_frequency", b"override_frequency", "region", b"region", "spread_factor", b"spread_factor", "sx126x_rx_boosted_gain", b"sx126x_rx_boosted_gain", "tx_enabled", b"tx_enabled", "tx_power", b"tx_power", "use_preset", b"use_preset"]) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["bandwidth", b"bandwidth", "channel_num", b"channel_num", "coding_rate", b"coding_rate", "frequency_offset", b"frequency_offset", "hop_limit", b"hop_limit", "ignore_incoming", b"ignore_incoming", "ignore_mqtt", b"ignore_mqtt", "modem_preset", b"modem_preset", "override_duty_cycle", b"override_duty_cycle", "override_frequency", b"override_frequency", "pa_fan_disabled", b"pa_fan_disabled", "region", b"region", "spread_factor", b"spread_factor", "sx126x_rx_boosted_gain", b"sx126x_rx_boosted_gain", "tx_enabled", b"tx_enabled", "tx_power", b"tx_power", "use_preset", b"use_preset"]) -> None: ...
|
||||
|
||||
@typing.final
|
||||
class BluetoothConfig(google.protobuf.message.Message):
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -324,6 +324,14 @@ class _HardwareModelEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._
|
||||
Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design,
|
||||
specifically adapted for the Meshtatic project
|
||||
"""
|
||||
SENSECAP_INDICATOR: _HardwareModel.ValueType # 70
|
||||
"""
|
||||
Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor
|
||||
"""
|
||||
TRACKER_T1000_E: _HardwareModel.ValueType # 71
|
||||
"""
|
||||
Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors.
|
||||
"""
|
||||
PRIVATE_HW: _HardwareModel.ValueType # 255
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -632,6 +640,14 @@ HELTEC_MESH_NODE_T114: HardwareModel.ValueType # 69
|
||||
Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design,
|
||||
specifically adapted for the Meshtatic project
|
||||
"""
|
||||
SENSECAP_INDICATOR: HardwareModel.ValueType # 70
|
||||
"""
|
||||
Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor
|
||||
"""
|
||||
TRACKER_T1000_E: HardwareModel.ValueType # 71
|
||||
"""
|
||||
Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors.
|
||||
"""
|
||||
PRIVATE_HW: HardwareModel.ValueType # 255
|
||||
"""
|
||||
------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -503,6 +503,8 @@ class ModuleConfig(google.protobuf.message.Message):
|
||||
NMEA: ModuleConfig.SerialConfig._Serial_Mode.ValueType # 4
|
||||
CALTOPO: ModuleConfig.SerialConfig._Serial_Mode.ValueType # 5
|
||||
"""NMEA messages specifically tailored for CalTopo"""
|
||||
WS85: ModuleConfig.SerialConfig._Serial_Mode.ValueType # 6
|
||||
"""Ecowitt WS85 weather station"""
|
||||
|
||||
class Serial_Mode(_Serial_Mode, metaclass=_Serial_ModeEnumTypeWrapper):
|
||||
"""
|
||||
@@ -516,6 +518,8 @@ class ModuleConfig(google.protobuf.message.Message):
|
||||
NMEA: ModuleConfig.SerialConfig.Serial_Mode.ValueType # 4
|
||||
CALTOPO: ModuleConfig.SerialConfig.Serial_Mode.ValueType # 5
|
||||
"""NMEA messages specifically tailored for CalTopo"""
|
||||
WS85: ModuleConfig.SerialConfig.Serial_Mode.ValueType # 6
|
||||
"""Ecowitt WS85 weather station"""
|
||||
|
||||
ENABLED_FIELD_NUMBER: builtins.int
|
||||
ECHO_FIELD_NUMBER: builtins.int
|
||||
@@ -701,6 +705,7 @@ class ModuleConfig(google.protobuf.message.Message):
|
||||
RECORDS_FIELD_NUMBER: builtins.int
|
||||
HISTORY_RETURN_MAX_FIELD_NUMBER: builtins.int
|
||||
HISTORY_RETURN_WINDOW_FIELD_NUMBER: builtins.int
|
||||
IS_SERVER_FIELD_NUMBER: builtins.int
|
||||
enabled: builtins.bool
|
||||
"""
|
||||
Enable the Store and Forward Module
|
||||
@@ -721,6 +726,10 @@ class ModuleConfig(google.protobuf.message.Message):
|
||||
"""
|
||||
TODO: REPLACE
|
||||
"""
|
||||
is_server: builtins.bool
|
||||
"""
|
||||
Set to true to let this node act as a server that stores received messages and resends them upon request.
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
@@ -729,8 +738,9 @@ class ModuleConfig(google.protobuf.message.Message):
|
||||
records: builtins.int = ...,
|
||||
history_return_max: builtins.int = ...,
|
||||
history_return_window: builtins.int = ...,
|
||||
is_server: builtins.bool = ...,
|
||||
) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "heartbeat", b"heartbeat", "history_return_max", b"history_return_max", "history_return_window", b"history_return_window", "records", b"records"]) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["enabled", b"enabled", "heartbeat", b"heartbeat", "history_return_max", b"history_return_max", "history_return_window", b"history_return_window", "is_server", b"is_server", "records", b"records"]) -> None: ...
|
||||
|
||||
@typing.final
|
||||
class RangeTestConfig(google.protobuf.message.Message):
|
||||
|
||||
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtastic/protobuf/telemetry.proto\x12\x13meshtastic.protobuf\"\x81\x01\n\rDeviceMetrics\x12\x15\n\rbattery_level\x18\x01 \x01(\r\x12\x0f\n\x07voltage\x18\x02 \x01(\x02\x12\x1b\n\x13\x63hannel_utilization\x18\x03 \x01(\x02\x12\x13\n\x0b\x61ir_util_tx\x18\x04 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x05 \x01(\r\"\xb6\x02\n\x12\x45nvironmentMetrics\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x12\x0b\n\x03iaq\x18\x07 \x01(\r\x12\x10\n\x08\x64istance\x18\x08 \x01(\x02\x12\x0b\n\x03lux\x18\t \x01(\x02\x12\x11\n\twhite_lux\x18\n \x01(\x02\x12\x0e\n\x06ir_lux\x18\x0b \x01(\x02\x12\x0e\n\x06uv_lux\x18\x0c \x01(\x02\x12\x16\n\x0ewind_direction\x18\r \x01(\r\x12\x12\n\nwind_speed\x18\x0e \x01(\x02\x12\x0e\n\x06weight\x18\x0f \x01(\x02\"\x8c\x01\n\x0cPowerMetrics\x12\x13\n\x0b\x63h1_voltage\x18\x01 \x01(\x02\x12\x13\n\x0b\x63h1_current\x18\x02 \x01(\x02\x12\x13\n\x0b\x63h2_voltage\x18\x03 \x01(\x02\x12\x13\n\x0b\x63h2_current\x18\x04 \x01(\x02\x12\x13\n\x0b\x63h3_voltage\x18\x05 \x01(\x02\x12\x13\n\x0b\x63h3_current\x18\x06 \x01(\x02\"\xbf\x02\n\x11\x41irQualityMetrics\x12\x15\n\rpm10_standard\x18\x01 \x01(\r\x12\x15\n\rpm25_standard\x18\x02 \x01(\r\x12\x16\n\x0epm100_standard\x18\x03 \x01(\r\x12\x1a\n\x12pm10_environmental\x18\x04 \x01(\r\x12\x1a\n\x12pm25_environmental\x18\x05 \x01(\r\x12\x1b\n\x13pm100_environmental\x18\x06 \x01(\r\x12\x16\n\x0eparticles_03um\x18\x07 \x01(\r\x12\x16\n\x0eparticles_05um\x18\x08 \x01(\r\x12\x16\n\x0eparticles_10um\x18\t \x01(\r\x12\x16\n\x0eparticles_25um\x18\n \x01(\r\x12\x16\n\x0eparticles_50um\x18\x0b \x01(\r\x12\x17\n\x0fparticles_100um\x18\x0c \x01(\r\"\xad\x02\n\tTelemetry\x12\x0c\n\x04time\x18\x01 \x01(\x07\x12<\n\x0e\x64\x65vice_metrics\x18\x02 \x01(\x0b\x32\".meshtastic.protobuf.DeviceMetricsH\x00\x12\x46\n\x13\x65nvironment_metrics\x18\x03 \x01(\x0b\x32\'.meshtastic.protobuf.EnvironmentMetricsH\x00\x12\x45\n\x13\x61ir_quality_metrics\x18\x04 \x01(\x0b\x32&.meshtastic.protobuf.AirQualityMetricsH\x00\x12:\n\rpower_metrics\x18\x05 \x01(\x0b\x32!.meshtastic.protobuf.PowerMetricsH\x00\x42\t\n\x07variant\">\n\rNau7802Config\x12\x12\n\nzeroOffset\x18\x01 \x01(\x05\x12\x19\n\x11\x63\x61librationFactor\x18\x02 \x01(\x02*\xea\x02\n\x13TelemetrySensorType\x12\x10\n\x0cSENSOR_UNSET\x10\x00\x12\n\n\x06\x42ME280\x10\x01\x12\n\n\x06\x42ME680\x10\x02\x12\x0b\n\x07MCP9808\x10\x03\x12\n\n\x06INA260\x10\x04\x12\n\n\x06INA219\x10\x05\x12\n\n\x06\x42MP280\x10\x06\x12\t\n\x05SHTC3\x10\x07\x12\t\n\x05LPS22\x10\x08\x12\x0b\n\x07QMC6310\x10\t\x12\x0b\n\x07QMI8658\x10\n\x12\x0c\n\x08QMC5883L\x10\x0b\x12\t\n\x05SHT31\x10\x0c\x12\x0c\n\x08PMSA003I\x10\r\x12\x0b\n\x07INA3221\x10\x0e\x12\n\n\x06\x42MP085\x10\x0f\x12\x0c\n\x08RCWL9620\x10\x10\x12\t\n\x05SHT4X\x10\x11\x12\x0c\n\x08VEML7700\x10\x12\x12\x0c\n\x08MLX90632\x10\x13\x12\x0b\n\x07OPT3001\x10\x14\x12\x0c\n\x08LTR390UV\x10\x15\x12\x0e\n\nTSL25911FN\x10\x16\x12\t\n\x05\x41HT10\x10\x17\x12\x10\n\x0c\x44\x46ROBOT_LARK\x10\x18\x12\x0b\n\x07NAU7802\x10\x19\x42\x64\n\x13\x63om.geeksville.meshB\x0fTelemetryProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3')
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#meshtastic/protobuf/telemetry.proto\x12\x13meshtastic.protobuf\"\x81\x01\n\rDeviceMetrics\x12\x15\n\rbattery_level\x18\x01 \x01(\r\x12\x0f\n\x07voltage\x18\x02 \x01(\x02\x12\x1b\n\x13\x63hannel_utilization\x18\x03 \x01(\x02\x12\x13\n\x0b\x61ir_util_tx\x18\x04 \x01(\x02\x12\x16\n\x0euptime_seconds\x18\x05 \x01(\r\"\xdc\x02\n\x12\x45nvironmentMetrics\x12\x13\n\x0btemperature\x18\x01 \x01(\x02\x12\x19\n\x11relative_humidity\x18\x02 \x01(\x02\x12\x1b\n\x13\x62\x61rometric_pressure\x18\x03 \x01(\x02\x12\x16\n\x0egas_resistance\x18\x04 \x01(\x02\x12\x0f\n\x07voltage\x18\x05 \x01(\x02\x12\x0f\n\x07\x63urrent\x18\x06 \x01(\x02\x12\x0b\n\x03iaq\x18\x07 \x01(\r\x12\x10\n\x08\x64istance\x18\x08 \x01(\x02\x12\x0b\n\x03lux\x18\t \x01(\x02\x12\x11\n\twhite_lux\x18\n \x01(\x02\x12\x0e\n\x06ir_lux\x18\x0b \x01(\x02\x12\x0e\n\x06uv_lux\x18\x0c \x01(\x02\x12\x16\n\x0ewind_direction\x18\r \x01(\r\x12\x12\n\nwind_speed\x18\x0e \x01(\x02\x12\x0e\n\x06weight\x18\x0f \x01(\x02\x12\x11\n\twind_gust\x18\x10 \x01(\x02\x12\x11\n\twind_lull\x18\x11 \x01(\x02\"\x8c\x01\n\x0cPowerMetrics\x12\x13\n\x0b\x63h1_voltage\x18\x01 \x01(\x02\x12\x13\n\x0b\x63h1_current\x18\x02 \x01(\x02\x12\x13\n\x0b\x63h2_voltage\x18\x03 \x01(\x02\x12\x13\n\x0b\x63h2_current\x18\x04 \x01(\x02\x12\x13\n\x0b\x63h3_voltage\x18\x05 \x01(\x02\x12\x13\n\x0b\x63h3_current\x18\x06 \x01(\x02\"\xbf\x02\n\x11\x41irQualityMetrics\x12\x15\n\rpm10_standard\x18\x01 \x01(\r\x12\x15\n\rpm25_standard\x18\x02 \x01(\r\x12\x16\n\x0epm100_standard\x18\x03 \x01(\r\x12\x1a\n\x12pm10_environmental\x18\x04 \x01(\r\x12\x1a\n\x12pm25_environmental\x18\x05 \x01(\r\x12\x1b\n\x13pm100_environmental\x18\x06 \x01(\r\x12\x16\n\x0eparticles_03um\x18\x07 \x01(\r\x12\x16\n\x0eparticles_05um\x18\x08 \x01(\r\x12\x16\n\x0eparticles_10um\x18\t \x01(\r\x12\x16\n\x0eparticles_25um\x18\n \x01(\r\x12\x16\n\x0eparticles_50um\x18\x0b \x01(\r\x12\x17\n\x0fparticles_100um\x18\x0c \x01(\r\"\xad\x02\n\tTelemetry\x12\x0c\n\x04time\x18\x01 \x01(\x07\x12<\n\x0e\x64\x65vice_metrics\x18\x02 \x01(\x0b\x32\".meshtastic.protobuf.DeviceMetricsH\x00\x12\x46\n\x13\x65nvironment_metrics\x18\x03 \x01(\x0b\x32\'.meshtastic.protobuf.EnvironmentMetricsH\x00\x12\x45\n\x13\x61ir_quality_metrics\x18\x04 \x01(\x0b\x32&.meshtastic.protobuf.AirQualityMetricsH\x00\x12:\n\rpower_metrics\x18\x05 \x01(\x0b\x32!.meshtastic.protobuf.PowerMetricsH\x00\x42\t\n\x07variant\">\n\rNau7802Config\x12\x12\n\nzeroOffset\x18\x01 \x01(\x05\x12\x19\n\x11\x63\x61librationFactor\x18\x02 \x01(\x02*\xea\x02\n\x13TelemetrySensorType\x12\x10\n\x0cSENSOR_UNSET\x10\x00\x12\n\n\x06\x42ME280\x10\x01\x12\n\n\x06\x42ME680\x10\x02\x12\x0b\n\x07MCP9808\x10\x03\x12\n\n\x06INA260\x10\x04\x12\n\n\x06INA219\x10\x05\x12\n\n\x06\x42MP280\x10\x06\x12\t\n\x05SHTC3\x10\x07\x12\t\n\x05LPS22\x10\x08\x12\x0b\n\x07QMC6310\x10\t\x12\x0b\n\x07QMI8658\x10\n\x12\x0c\n\x08QMC5883L\x10\x0b\x12\t\n\x05SHT31\x10\x0c\x12\x0c\n\x08PMSA003I\x10\r\x12\x0b\n\x07INA3221\x10\x0e\x12\n\n\x06\x42MP085\x10\x0f\x12\x0c\n\x08RCWL9620\x10\x10\x12\t\n\x05SHT4X\x10\x11\x12\x0c\n\x08VEML7700\x10\x12\x12\x0c\n\x08MLX90632\x10\x13\x12\x0b\n\x07OPT3001\x10\x14\x12\x0c\n\x08LTR390UV\x10\x15\x12\x0e\n\nTSL25911FN\x10\x16\x12\t\n\x05\x41HT10\x10\x17\x12\x10\n\x0c\x44\x46ROBOT_LARK\x10\x18\x12\x0b\n\x07NAU7802\x10\x19\x42\x64\n\x13\x63om.geeksville.meshB\x0fTelemetryProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00\x62\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
@@ -21,18 +21,18 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'meshtastic.protobuf.telemet
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b'\n\023com.geeksville.meshB\017TelemetryProtosZ\"github.com/meshtastic/go/generated\252\002\024Meshtastic.Protobufs\272\002\000'
|
||||
_globals['_TELEMETRYSENSORTYPE']._serialized_start=1339
|
||||
_globals['_TELEMETRYSENSORTYPE']._serialized_end=1701
|
||||
_globals['_TELEMETRYSENSORTYPE']._serialized_start=1377
|
||||
_globals['_TELEMETRYSENSORTYPE']._serialized_end=1739
|
||||
_globals['_DEVICEMETRICS']._serialized_start=61
|
||||
_globals['_DEVICEMETRICS']._serialized_end=190
|
||||
_globals['_ENVIRONMENTMETRICS']._serialized_start=193
|
||||
_globals['_ENVIRONMENTMETRICS']._serialized_end=503
|
||||
_globals['_POWERMETRICS']._serialized_start=506
|
||||
_globals['_POWERMETRICS']._serialized_end=646
|
||||
_globals['_AIRQUALITYMETRICS']._serialized_start=649
|
||||
_globals['_AIRQUALITYMETRICS']._serialized_end=968
|
||||
_globals['_TELEMETRY']._serialized_start=971
|
||||
_globals['_TELEMETRY']._serialized_end=1272
|
||||
_globals['_NAU7802CONFIG']._serialized_start=1274
|
||||
_globals['_NAU7802CONFIG']._serialized_end=1336
|
||||
_globals['_ENVIRONMENTMETRICS']._serialized_end=541
|
||||
_globals['_POWERMETRICS']._serialized_start=544
|
||||
_globals['_POWERMETRICS']._serialized_end=684
|
||||
_globals['_AIRQUALITYMETRICS']._serialized_start=687
|
||||
_globals['_AIRQUALITYMETRICS']._serialized_end=1006
|
||||
_globals['_TELEMETRY']._serialized_start=1009
|
||||
_globals['_TELEMETRY']._serialized_end=1310
|
||||
_globals['_NAU7802CONFIG']._serialized_start=1312
|
||||
_globals['_NAU7802CONFIG']._serialized_end=1374
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
|
||||
@@ -308,6 +308,8 @@ class EnvironmentMetrics(google.protobuf.message.Message):
|
||||
WIND_DIRECTION_FIELD_NUMBER: builtins.int
|
||||
WIND_SPEED_FIELD_NUMBER: builtins.int
|
||||
WEIGHT_FIELD_NUMBER: builtins.int
|
||||
WIND_GUST_FIELD_NUMBER: builtins.int
|
||||
WIND_LULL_FIELD_NUMBER: builtins.int
|
||||
temperature: builtins.float
|
||||
"""
|
||||
Temperature measured
|
||||
@@ -370,6 +372,14 @@ class EnvironmentMetrics(google.protobuf.message.Message):
|
||||
"""
|
||||
Weight in KG
|
||||
"""
|
||||
wind_gust: builtins.float
|
||||
"""
|
||||
Wind gust in m/s
|
||||
"""
|
||||
wind_lull: builtins.float
|
||||
"""
|
||||
Wind lull in m/s
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
@@ -388,8 +398,10 @@ class EnvironmentMetrics(google.protobuf.message.Message):
|
||||
wind_direction: builtins.int = ...,
|
||||
wind_speed: builtins.float = ...,
|
||||
weight: builtins.float = ...,
|
||||
wind_gust: builtins.float = ...,
|
||||
wind_lull: builtins.float = ...,
|
||||
) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["barometric_pressure", b"barometric_pressure", "current", b"current", "distance", b"distance", "gas_resistance", b"gas_resistance", "iaq", b"iaq", "ir_lux", b"ir_lux", "lux", b"lux", "relative_humidity", b"relative_humidity", "temperature", b"temperature", "uv_lux", b"uv_lux", "voltage", b"voltage", "weight", b"weight", "white_lux", b"white_lux", "wind_direction", b"wind_direction", "wind_speed", b"wind_speed"]) -> None: ...
|
||||
def ClearField(self, field_name: typing.Literal["barometric_pressure", b"barometric_pressure", "current", b"current", "distance", b"distance", "gas_resistance", b"gas_resistance", "iaq", b"iaq", "ir_lux", b"ir_lux", "lux", b"lux", "relative_humidity", b"relative_humidity", "temperature", b"temperature", "uv_lux", b"uv_lux", "voltage", b"voltage", "weight", b"weight", "white_lux", b"white_lux", "wind_direction", b"wind_direction", "wind_gust", b"wind_gust", "wind_lull", b"wind_lull", "wind_speed", b"wind_speed"]) -> None: ...
|
||||
|
||||
global___EnvironmentMetrics = EnvironmentMetrics
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ def test_sendPosition(caplog):
|
||||
with caplog.at_level(logging.DEBUG):
|
||||
iface.sendPosition()
|
||||
iface.close()
|
||||
assert re.search(r"p.time:", caplog.text, re.MULTILINE)
|
||||
# assert re.search(r"p.time:", caplog.text, re.MULTILINE)
|
||||
|
||||
|
||||
# TODO
|
||||
|
||||
Submodule protobufs updated: 1198b7dbab...b1a79d5db0
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "meshtastic"
|
||||
version = "2.3.14"
|
||||
version = "2.4.1"
|
||||
description = "Python API & client shell for talking to Meshtastic devices"
|
||||
authors = ["Meshtastic Developers <contact@meshtastic.org>"]
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
Reference in New Issue
Block a user