+class _SET_PHONE(BeeSurePkt):
+ OUT_KWARGS = (("phonenumber", str, ""),)
+
+ def out_encode(self) -> str:
+ self.phonenumber: str
+ return self.phonenumber
+
+
class _LOC_DATA(BeeSurePkt):
def in_decode(self, *args: str) -> None:
p = SimpleNamespace()
class _LOC_DATA(BeeSurePkt):
def in_decode(self, *args: str) -> None:
p = SimpleNamespace()
# self.gps_valid is supposed to mean it, but it does not. Perfectly
# good looking coordinates, with ten satellites, still get 'V'.
# I suspect that in reality, 'A' means "hint data is absent".
if self.gps_valid or self.num_of_sats > 3:
# self.gps_valid is supposed to mean it, but it does not. Perfectly
# good looking coordinates, with ten satellites, still get 'V'.
# I suspect that in reality, 'A' means "hint data is absent".
if self.gps_valid or self.num_of_sats > 3:
devtime=str(self.devtime),
battery_percentage=self.battery_percentage,
accuracy=self.positioning_accuracy,
devtime=str(self.devtime),
battery_percentage=self.battery_percentage,
accuracy=self.positioning_accuracy,
devtime=str(self.devtime),
battery_percentage=self.battery_percentage,
mcc=self.mcc,
devtime=str(self.devtime),
battery_percentage=self.battery_percentage,
mcc=self.mcc,
class FLOWER(BeeSurePkt):
OUT_KWARGS = (("number", int, 1),)
class FLOWER(BeeSurePkt):
OUT_KWARGS = (("number", int, 1),)
+class LZ(BeeSurePkt):
+ OUT_KWARGS = (("language", int, 1), ("timezone", int, 0))
+
+ def out_encode(self) -> str:
+ return f"{self.language},{self.timezone}"
+
+
class MESSAGE(BeeSurePkt):
OUT_KWARGS = (("message", str, ""),)
class MESSAGE(BeeSurePkt):
OUT_KWARGS = (("message", str, ""),)
class _PHB(BeeSurePkt):
OUT_KWARGS: Tuple[Tuple[str, Callable[[Any], Any], Any], ...] = (
("entries", pblist, []),
class _PHB(BeeSurePkt):
OUT_KWARGS: Tuple[Tuple[str, Callable[[Any], Any], Any], ...] = (
("entries", pblist, []),
-class _SET_PHONE(BeeSurePkt):
- OUT_KWARGS = (("phonenumber", str, ""),)
-
- def out_encode(self) -> str:
- self.phonenumber: str
- return self.phonenumber
-
-
+class UPLOAD(BeeSurePkt):
+ OUT_KWARGS = (("interval", int, 600),)
+
+ def out_encode(self) -> str:
+ return str(self.interval)
+
+
# Build dicts protocol number -> class and class name -> protocol number
CLASSES = {}
if True: # just to indent the code, sorry!
# Build dicts protocol number -> class and class name -> protocol number
CLASSES = {}
if True: # just to indent the code, sorry!
for cls in CLASSES.values()
if hasattr(cls, "rectified")
]
for cls in CLASSES.values()
if hasattr(cls, "rectified")
]