pymammotion 0.2.59__py3-none-any.whl → 0.2.60__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.
- pymammotion/data/mqtt/event.py +16 -0
- pymammotion/mammotion/devices/mammotion_cloud.py +6 -2
- {pymammotion-0.2.59.dist-info → pymammotion-0.2.60.dist-info}/METADATA +1 -1
- {pymammotion-0.2.59.dist-info → pymammotion-0.2.60.dist-info}/RECORD +6 -6
- {pymammotion-0.2.59.dist-info → pymammotion-0.2.60.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.59.dist-info → pymammotion-0.2.60.dist-info}/WHEEL +0 -0
pymammotion/data/mqtt/event.py
CHANGED
@@ -64,6 +64,13 @@ class DeviceNotificationEventValue(DataClassORJSONMixin):
|
|
64
64
|
data: str # parsed to DeviceNotificationEventCode
|
65
65
|
|
66
66
|
|
67
|
+
@dataclass
|
68
|
+
class DeviceBizReqEventValue(DataClassORJSONMixin):
|
69
|
+
bizType: str
|
70
|
+
bizId: str
|
71
|
+
params: str
|
72
|
+
|
73
|
+
|
67
74
|
@dataclass
|
68
75
|
class GeneralParams(DataClassORJSONMixin):
|
69
76
|
groupIdList: list[str]
|
@@ -115,6 +122,13 @@ class DeviceNotificationEventParams(GeneralParams):
|
|
115
122
|
value: DeviceNotificationEventValue
|
116
123
|
|
117
124
|
|
125
|
+
@dataclass
|
126
|
+
class DeviceBizReqEventParams(GeneralParams):
|
127
|
+
identifier: Literal["device_biz_req_event"]
|
128
|
+
type: Literal["info"]
|
129
|
+
value: DeviceBizReqEventValue
|
130
|
+
|
131
|
+
|
118
132
|
@dataclass
|
119
133
|
class DeviceWarningEventParams(GeneralParams):
|
120
134
|
identifier: Literal["device_warning_event"]
|
@@ -152,6 +166,8 @@ class ThingEventMessage(DataClassORJSONMixin):
|
|
152
166
|
params_obj = DeviceProtobufMsgEventParams.from_dict(params_dict)
|
153
167
|
elif identifier == "device_warning_event":
|
154
168
|
params_obj = DeviceWarningEventParams.from_dict(params_dict)
|
169
|
+
elif identifier == "device_biz_req_event":
|
170
|
+
params_obj = DeviceBizReqEventParams.from_dict(params_dict)
|
155
171
|
elif identifier == "device_config_req_event":
|
156
172
|
params_obj = payload.get("params", {})
|
157
173
|
elif identifier == "device_notification_event" or identifier == "device_warning_code_event":
|
@@ -258,11 +258,15 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
258
258
|
|
259
259
|
async def _parse_message_for_device(self, event: ThingEventMessage) -> None:
|
260
260
|
params = event.params
|
261
|
+
new_msg = LubaMsg()
|
261
262
|
if event.params.iotId != self.iot_id:
|
262
263
|
return
|
263
264
|
binary_data = base64.b64decode(params.value.content)
|
264
|
-
|
265
|
-
|
265
|
+
try:
|
266
|
+
self._update_raw_data(binary_data)
|
267
|
+
new_msg = LubaMsg().parse(binary_data)
|
268
|
+
except (KeyError, ValueError, IndexError):
|
269
|
+
_LOGGER.exception("Error parsing message %s", binary_data)
|
266
270
|
|
267
271
|
if (
|
268
272
|
self._commands.get_device_product_key() == ""
|
@@ -36,7 +36,7 @@ pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9
|
|
36
36
|
pymammotion/data/model/region_data.py,sha256=OTV15vRyn9JORXsQPjWMNF1ZujuNhsOKl25KeqwMObA,3007
|
37
37
|
pymammotion/data/model/report_info.py,sha256=AE2u64uKgcJtVooldJcxXBsEHfDyCvH5DnQFUQ5qWmk,2226
|
38
38
|
pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
39
|
-
pymammotion/data/mqtt/event.py,sha256=
|
39
|
+
pymammotion/data/mqtt/event.py,sha256=z6j8t-ZOjEeKjFt7S0wV8vV5L0-iHD3RbwI9hCfzGTY,5044
|
40
40
|
pymammotion/data/mqtt/properties.py,sha256=kvphcjrDuJHuX8Az98-wKeFv_rSmu2Fz9YKLGodGSj0,3759
|
41
41
|
pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
|
42
42
|
pymammotion/data/state_manager.py,sha256=DjWi_ojheZFB_KfdMnOJgxMTQ46HpbwtATK2ebgwRHE,4634
|
@@ -63,7 +63,7 @@ pymammotion/mammotion/devices/__init__.py,sha256=f2qQFPgLGmV85W2hSlMUh5BYuht9o_A
|
|
63
63
|
pymammotion/mammotion/devices/base.py,sha256=Q5acOJEevJji_fI09R6qbupzvkxGsteJxcWsfTjqLXc,9861
|
64
64
|
pymammotion/mammotion/devices/mammotion.py,sha256=KRtGSoDY9FxeehOZAlzasmk0fO-2Ru1fkw6McFEovzA,12373
|
65
65
|
pymammotion/mammotion/devices/mammotion_bluetooth.py,sha256=nyO7pkKgAoRPs-28ESf6ee-y3G5JTYRO-MCp4wKPMlE,17476
|
66
|
-
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=
|
66
|
+
pymammotion/mammotion/devices/mammotion_cloud.py,sha256=EbIdtOYOZS6E0RoIDgHJmGBOTjGIKx77ZDtA9BerF-M,11945
|
67
67
|
pymammotion/mqtt/__init__.py,sha256=Ocs5e-HLJvTuDpVXyECEsWIvwsUaxzj7lZ9mSYutNDY,105
|
68
68
|
pymammotion/mqtt/mammotion_future.py,sha256=_OWqKOlUGl2yT1xOsXFQYpGd-1zQ63OxqXgy7KRQgYc,710
|
69
69
|
pymammotion/mqtt/mammotion_mqtt.py,sha256=LaySave_hf0gU3crUTLqzpdQtxIwK8vu5DM8F8fbU2Y,8748
|
@@ -118,7 +118,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
118
118
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
119
119
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
120
120
|
pymammotion/utility/rocker_util.py,sha256=6tX7sS87qoQC_tsxbx3NLL-HgS08wtzXiZkhDiz7uo0,7179
|
121
|
-
pymammotion-0.2.
|
122
|
-
pymammotion-0.2.
|
123
|
-
pymammotion-0.2.
|
124
|
-
pymammotion-0.2.
|
121
|
+
pymammotion-0.2.60.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
122
|
+
pymammotion-0.2.60.dist-info/METADATA,sha256=j7Wek8S1oT8yaIKyoK6aKbqaLiboeMm1J--yDMwMyX0,3874
|
123
|
+
pymammotion-0.2.60.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
124
|
+
pymammotion-0.2.60.dist-info/RECORD,,
|
File without changes
|
File without changes
|