pymammotion 0.2.13__py3-none-any.whl → 0.2.14__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."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymammotion
3
- Version: 0.2.13
3
+ Version: 0.2.14
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
@@ -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.14.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
115
+ pymammotion-0.2.14.dist-info/METADATA,sha256=mdcQH7AqMEKODoyghFU8tjC6Pw13xv6MK8QQCP_sXh4,3969
116
+ pymammotion-0.2.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
117
+ pymammotion-0.2.14.dist-info/RECORD,,