pymammotion 0.2.13__py3-none-any.whl → 0.2.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pymammotion might be problematic. Click here for more details.

@@ -95,9 +95,9 @@ class DeviceWarningEventParams(GeneralParams):
95
95
 
96
96
  @dataclass
97
97
  class ThingEventMessage(DataClassORJSONMixin):
98
- method: Literal["thing.events"]
98
+ method: Literal["thing.events", "thing.properties"]
99
99
  id: str
100
- params: Union[DeviceProtobufMsgEventParams, DeviceWarningEventParams]
100
+ params: Union[DeviceProtobufMsgEventParams, DeviceWarningEventParams, str]
101
101
  version: Literal["1.0"]
102
102
 
103
103
  @classmethod
@@ -114,6 +114,8 @@ class ThingEventMessage(DataClassORJSONMixin):
114
114
  params_obj = DeviceProtobufMsgEventParams(**params_dict)
115
115
  elif identifier == "device_warning_event":
116
116
  params_obj = DeviceWarningEventParams(**params_dict)
117
+ elif identifier == "device_config_req_event":
118
+ params_obj = payload.get("params", '')
117
119
  else:
118
120
  raise ValueError(f"Unknown identifier: {identifier}")
119
121
 
@@ -1147,7 +1147,10 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
1147
1147
  _LOGGER.debug("Thing event received")
1148
1148
  event = ThingEventMessage.from_dicts(payload)
1149
1149
  params = event.params
1150
- if params.identifier == "device_protobuf_msg_event":
1150
+ if isinstance(params, str):
1151
+ _LOGGER.debug("config event %s", str)
1152
+ return
1153
+ if params.identifier == "device_protobuf_msg_event" and params.thingType == "thing.events":
1151
1154
  _LOGGER.debug("Protobuf event")
1152
1155
  binary_data = base64.b64decode(params.value.get("content", ""))
1153
1156
  self._update_raw_data(cast(bytes, binary_data))
@@ -1168,6 +1171,8 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
1168
1171
  if not fut.fut.cancelled():
1169
1172
  fut.resolve(cast(bytes, binary_data))
1170
1173
  await self._state_manager.notification(new_msg)
1174
+ if params.thingType == "thing.properties":
1175
+ _LOGGER.debug(event)
1171
1176
 
1172
1177
  async def _handle_mqtt_message(self, topic: str, payload: dict) -> None:
1173
1178
  """Async handler for incoming MQTT messages."""
@@ -196,7 +196,7 @@ message LoraCfgRsp {
196
196
  int32 result = 1;
197
197
  int32 op = 2;
198
198
  string cfg = 3;
199
- string fac_cfg = 4;
199
+ bytes fac_cfg = 4;
200
200
  }
201
201
 
202
202
  message mod_fw_info {
@@ -312,7 +312,7 @@ class LoraCfgRsp(betterproto.Message):
312
312
  result: int = betterproto.int32_field(1)
313
313
  op: int = betterproto.int32_field(2)
314
314
  cfg: str = betterproto.string_field(3)
315
- fac_cfg: str = betterproto.string_field(4)
315
+ fac_cfg: bytes = betterproto.bytes_field(4)
316
316
 
317
317
 
318
318
  @dataclass
@@ -82,7 +82,7 @@ class LoraCfgRsp(_message.Message):
82
82
  OP_FIELD_NUMBER: _ClassVar[int]
83
83
  RESULT_FIELD_NUMBER: _ClassVar[int]
84
84
  cfg: str
85
- fac_cfg: str
85
+ fac_cfg: bytes
86
86
  op: int
87
87
  result: int
88
88
  def __init__(self, result: _Optional[int] = ..., op: _Optional[int] = ..., cfg: _Optional[str] = ..., fac_cfg: _Optional[str] = ...) -> None: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary:
5
5
  License: GNU-3.0
6
6
  Author: Michael Arthur
@@ -35,7 +35,7 @@ pymammotion/data/model/rapid_state.py,sha256=_e9M-65AbkvIqXyMYzLKBxbNvpso42qD8R-
35
35
  pymammotion/data/model/region_data.py,sha256=75xOTM1qeRbSROp53eIczw3yCmYM9DgMjMh8qE9xkKo,2880
36
36
  pymammotion/data/model/report_info.py,sha256=1Rj_yRZ9apWX296QHae5prdObDbs32bsQf9rzMz2KEQ,4458
37
37
  pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
38
- pymammotion/data/mqtt/event.py,sha256=7hq-dl-HdKJB-TQ2kKfYfrebR_8qWE_lF2nQLlPyphU,3437
38
+ pymammotion/data/mqtt/event.py,sha256=j2bo__p7ROPPeiBH-74YyOAOMV7tlYYfl30nnZ81XgQ,3567
39
39
  pymammotion/data/mqtt/properties.py,sha256=HkBPghr26L9_b4QaOi1DtPgb0UoPIOGSe9wb3kgnM6Y,2815
40
40
  pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
41
41
  pymammotion/data/state_manager.py,sha256=mNIAhP8f1Cb6-wFm2R5e-NlZauj-71iDGz8oZvdTq3Y,2826
@@ -58,7 +58,7 @@ pymammotion/mammotion/commands/messages/video.py,sha256=_8lJsU4sLm2CGnc7RDkueA0A
58
58
  pymammotion/mammotion/control/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  pymammotion/mammotion/control/joystick.py,sha256=EWV20MMzQuhbLlNlXbsyZKSEpeM7x1CQL7saU4Pn0-g,6165
60
60
  pymammotion/mammotion/devices/__init__.py,sha256=T72jt0ejtMjo1rPmn_FeMF3pmp0LLeRRpc9WcDKEYYY,126
61
- pymammotion/mammotion/devices/mammotion.py,sha256=2aTMvODVOQnhSI1Sh5JcioApuQfGqjFTTWnAK33kXM4,47620
61
+ pymammotion/mammotion/devices/mammotion.py,sha256=Mml0L_eGUbLzJtQ97xThDpYzDhoaT6oDY9rHo8riAJ8,47868
62
62
  pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
63
63
  pymammotion/mqtt/mammotion_future.py,sha256=WKnHqeHiS2Ut-SaDBNOxqh1jDLeTiyLTsJ7PNUexrjk,687
64
64
  pymammotion/mqtt/mammotion_mqtt.py,sha256=7V0JW2N9dshUJAGlg6d6Y5LKWYoXvlQd0o-9l6idPNg,8071
@@ -99,10 +99,10 @@ pymammotion/proto/mctrl_pept.proto,sha256=HBTRiP1XJB5w9hT1V38aePPREpePBk5jkjupu_
99
99
  pymammotion/proto/mctrl_pept.py,sha256=utMtbXsCwGS14YggTqUdVIbTZsR0w49B6gKU8jHzbJg,1332
100
100
  pymammotion/proto/mctrl_pept_pb2.py,sha256=QqQ1BXo_EBs7cLmQGtRbnNy0rRxvaqtrGfKxXS8R5A8,2134
101
101
  pymammotion/proto/mctrl_pept_pb2.pyi,sha256=gr0lxUPqhyEnDdni9vpIQnAIhqAGtHlv1rFeb5EJnMY,2840
102
- pymammotion/proto/mctrl_sys.proto,sha256=6SONb-xEqIlDUQFR_bi0AQEWAeAirFgz1Y-1Ormoko0,10194
103
- pymammotion/proto/mctrl_sys.py,sha256=F1XQTqfGqvaWvgx6IQb4jJDxV7i4unzOs9Kmf9Bh8DU,19107
102
+ pymammotion/proto/mctrl_sys.proto,sha256=OHQ86tlBxzvWOaUeDt2OafVhgxvRA0a0naBPVYMLLfA,10193
103
+ pymammotion/proto/mctrl_sys.py,sha256=GVciaKPcp4h1qrIILHX_Pd76tKSBFlaEvFPF7FZsj8I,19108
104
104
  pymammotion/proto/mctrl_sys_pb2.py,sha256=DYemb514mlC7c27t-k1YqqBif0xxhLmnIWk8rXtSj1c,21497
105
- pymammotion/proto/mctrl_sys_pb2.pyi,sha256=BrivyEP8s7nnuSQkezTbnse9A4J1ad5o6yFcufELLVU,38910
105
+ pymammotion/proto/mctrl_sys_pb2.pyi,sha256=Dj_1UM86kZ5MfcVyNC76Z0gKrfl5YFsVWP2b-bKoZvk,38912
106
106
  pymammotion/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
107
  pymammotion/utility/constant/__init__.py,sha256=tZz7szqIhrzNjfcLU3ysfINfg5VEBUAisd9AhP4mvT0,38
108
108
  pymammotion/utility/constant/device_constant.py,sha256=aM69DJJy-h-btLP9RJezld1zm1rGz4gZRdRSpArVtmc,7109
@@ -111,7 +111,7 @@ pymammotion/utility/device_type.py,sha256=KYawu2glZMVlPmxRbA4kVFujXz3miHp3rJiOWR
111
111
  pymammotion/utility/map.py,sha256=aoi-Luzuph02hKynTofMoq3mnPstanx75MDAVv49CuY,2211
112
112
  pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
113
113
  pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
114
- pymammotion-0.2.13.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
115
- pymammotion-0.2.13.dist-info/METADATA,sha256=M0g1tC2ywqh4-m4zpy9ezjbhBNj-X9ffbz-GPPKJHUM,3969
116
- pymammotion-0.2.13.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
117
- pymammotion-0.2.13.dist-info/RECORD,,
114
+ pymammotion-0.2.15.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
115
+ pymammotion-0.2.15.dist-info/METADATA,sha256=aep84UH19vOBx8r-xrONsANEUg9IeBOu3Fb4k42VoT8,3969
116
+ pymammotion-0.2.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
117
+ pymammotion-0.2.15.dist-info/RECORD,,