pymammotion 0.2.16__tar.gz → 0.2.17__tar.gz
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.
- {pymammotion-0.2.16 → pymammotion-0.2.17}/PKG-INFO +1 -1
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/state_manager.py +4 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/devices/mammotion.py +5 -2
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pyproject.toml +3 -3
- {pymammotion-0.2.16 → pymammotion-0.2.17}/LICENSE +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/README.md +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/cloud_gateway.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/cloud_service.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/aep_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/connect_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/dev_by_account_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/login_by_oauth_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/regions_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/session_by_authcode_response.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/tmp_constant.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/ble.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/ble_message.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/const.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/data/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/data/convert.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/data/framectrldata.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/bluetooth/data/notifydata.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/const.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/account.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/device.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/device_config.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/enums.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/excute_boarder_params.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/execute_boarder.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/generate_route_information.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/hash_list.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/location.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/mowing_modes.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/plan.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/rapid_state.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/region_data.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/report_info.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/mqtt/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/mqtt/event.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/mqtt/properties.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/mqtt/status.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/event/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/event/event.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/http/_init_.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/http/http.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/abstract_message.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/driver.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/media.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/network.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/ota.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/system.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/video.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/control/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/control/joystick.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/devices/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mqtt/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mqtt/mammotion_future.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mqtt/mammotion_mqtt.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/basestation.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/basestation.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/basestation_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/basestation_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/common.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/common.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/common_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/common_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/dev_net.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/dev_net.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/dev_net_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/dev_net_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_msg.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_msg.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_msg_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_mul.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_mul.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_mul_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_driver.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_driver.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_nav.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_nav.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_ota.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_ota.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_pept.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_pept.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_sys.proto +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_sys.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/py.typed +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/constant/__init__.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/constant/device_constant.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/datatype_converter.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/device_type.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/map.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/periodic.py +0 -0
- {pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/utility/rocker_util.py +0 -0
|
@@ -17,6 +17,7 @@ class StateManager:
|
|
|
17
17
|
self._device = device
|
|
18
18
|
self.gethash_ack_callback: Optional[Callable[[NavGetHashListAck],Awaitable[None]]] = None
|
|
19
19
|
self.get_commondata_ack_callback: Optional[Callable[[NavGetCommDataAck],Awaitable[None]]] = None
|
|
20
|
+
self.on_notification_callback: Optional[Callable[[],Awaitable[None]]] = None
|
|
20
21
|
|
|
21
22
|
def get_device(self) -> MowingDevice:
|
|
22
23
|
"""Get device."""
|
|
@@ -44,6 +45,9 @@ class StateManager:
|
|
|
44
45
|
case "ota":
|
|
45
46
|
self._update_ota_data(message)
|
|
46
47
|
|
|
48
|
+
if self.on_notification_callback:
|
|
49
|
+
await self.on_notification_callback()
|
|
50
|
+
|
|
47
51
|
async def _update_nav_data(self, message):
|
|
48
52
|
"""Update nav data."""
|
|
49
53
|
nav_msg = betterproto.which_one_of(message.nav, "SubNavMsg")
|
|
@@ -346,6 +346,9 @@ class MammotionBaseDevice:
|
|
|
346
346
|
self._notify_future: asyncio.Future[bytes] | None = None
|
|
347
347
|
self._cloud_device = cloud_device
|
|
348
348
|
|
|
349
|
+
def set_notifiction_callback(self, func: Callable[[],Awaitable[None]]):
|
|
350
|
+
self._state_manager.on_notification_callback = func
|
|
351
|
+
|
|
349
352
|
async def datahash_response(self, hash_ack: NavGetHashListAck):
|
|
350
353
|
"""Handle datahash responses."""
|
|
351
354
|
result_hash = 0
|
|
@@ -1150,7 +1153,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
|
1150
1153
|
if isinstance(params, str):
|
|
1151
1154
|
_LOGGER.debug("config event %s", str)
|
|
1152
1155
|
return
|
|
1153
|
-
if params.identifier == "device_protobuf_msg_event" and
|
|
1156
|
+
if params.identifier == "device_protobuf_msg_event" and event.method == "thing.events":
|
|
1154
1157
|
_LOGGER.debug("Protobuf event")
|
|
1155
1158
|
binary_data = base64.b64decode(params.value.get("content", ""))
|
|
1156
1159
|
self._update_raw_data(cast(bytes, binary_data))
|
|
@@ -1171,7 +1174,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
|
1171
1174
|
if not fut.fut.cancelled():
|
|
1172
1175
|
fut.resolve(cast(bytes, binary_data))
|
|
1173
1176
|
await self._state_manager.notification(new_msg)
|
|
1174
|
-
if
|
|
1177
|
+
if event.method == "thing.properties":
|
|
1175
1178
|
_LOGGER.debug(event)
|
|
1176
1179
|
|
|
1177
1180
|
async def _handle_mqtt_message(self, topic: str, payload: dict) -> None:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pymammotion"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.17"
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "pymammotion"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.17"
|
|
8
8
|
license = "GNU-3.0"
|
|
9
9
|
description = ""
|
|
10
10
|
readme = "README.md"
|
|
@@ -53,7 +53,7 @@ mypy = "^1.10.0"
|
|
|
53
53
|
pre-commit = "^3.7.1"
|
|
54
54
|
|
|
55
55
|
[tool.bumpver]
|
|
56
|
-
current_version = "0.2.
|
|
56
|
+
current_version = "0.2.17"
|
|
57
57
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
58
58
|
commit_message = "Bump version {old_version} -> {new_version}"
|
|
59
59
|
commit = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/dev_by_account_response.py
RENAMED
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/aliyun/dataclass/login_by_oauth_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/data/model/generate_route_information.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/abstract_message.py
RENAMED
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/mammotion_command.py
RENAMED
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/navigation.py
RENAMED
|
File without changes
|
{pymammotion-0.2.16 → pymammotion-0.2.17}/pymammotion/mammotion/commands/messages/network.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|