pymammotion 0.2.5__tar.gz → 0.2.6__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.5 → pymammotion-0.2.6}/PKG-INFO +1 -1
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/cloud_gateway.py +7 -2
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/devices/mammotion.py +45 -9
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mqtt/mammotion_mqtt.py +3 -2
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pyproject.toml +3 -3
- {pymammotion-0.2.5 → pymammotion-0.2.6}/LICENSE +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/README.md +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/cloud_service.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/aep_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/connect_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/dev_by_account_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/login_by_oauth_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/regions_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/session_by_authcode_response.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/tmp_constant.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/ble.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/ble_message.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/const.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/data/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/data/convert.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/data/framectrldata.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/bluetooth/data/notifydata.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/const.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/account.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/device.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/device_config.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/enums.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/excute_boarder_params.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/execute_boarder.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/generate_route_information.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/hash_list.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/location.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/mowing_modes.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/plan.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/rapid_state.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/region_data.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/model/report_info.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/mqtt/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/mqtt/event.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/mqtt/properties.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/mqtt/status.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/data/state_manager.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/event/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/event/event.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/http/_init_.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/http/http.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/abstract_message.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/driver.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/media.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/navigation.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/network.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/ota.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/system.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/video.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/control/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/control/joystick.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/devices/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mqtt/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/basestation.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/basestation.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/basestation_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/basestation_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/common.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/common.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/common_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/common_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/dev_net.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/dev_net.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/dev_net_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/dev_net_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_msg.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_msg.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_msg_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_mul.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_mul.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_mul_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_driver.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_driver.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_nav.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_nav.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_ota.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_ota.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_pept.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_pept.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_sys.proto +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_sys.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/py.typed +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/constant/__init__.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/constant/device_constant.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/datatype_converter.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/device_type.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/map.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/periodic.py +0 -0
- {pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/utility/rocker_util.py +0 -0
|
@@ -9,7 +9,7 @@ import random
|
|
|
9
9
|
import string
|
|
10
10
|
import time
|
|
11
11
|
import uuid
|
|
12
|
-
from logging import getLogger
|
|
12
|
+
from logging import getLogger, exception
|
|
13
13
|
|
|
14
14
|
from aiohttp import ClientSession
|
|
15
15
|
from alibabacloud_iot_api_gateway.client import Client
|
|
@@ -45,6 +45,10 @@ MOVE_HEADERS = (
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
class SetupException(Exception):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
|
|
48
52
|
class CloudIOTGateway:
|
|
49
53
|
"""Class for interacting with Aliyun Cloud IoT Gateway."""
|
|
50
54
|
|
|
@@ -524,7 +528,8 @@ class CloudIOTGateway:
|
|
|
524
528
|
str(response_body_dict.get("code")),
|
|
525
529
|
str(response_body_dict.get("msg")),
|
|
526
530
|
)
|
|
527
|
-
|
|
531
|
+
if response_body_dict.get("code") == 29003:
|
|
532
|
+
raise SetupException(response_body_dict.get("code"))
|
|
528
533
|
|
|
529
534
|
return message_id
|
|
530
535
|
|
|
@@ -40,6 +40,7 @@ from pymammotion.mammotion.commands.mammotion_command import MammotionCommand
|
|
|
40
40
|
from pymammotion.mqtt import MammotionMQTT
|
|
41
41
|
from pymammotion.proto.luba_msg import LubaMsg
|
|
42
42
|
from pymammotion.proto.mctrl_nav import NavGetCommDataAck, NavGetHashListAck
|
|
43
|
+
from pymammotion.utility.rocker_util import RockerControlUtil
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
class CharacteristicMissingError(Exception):
|
|
@@ -116,8 +117,10 @@ async def _handle_retry(fut: asyncio.Future[None], func, command: bytes) -> None
|
|
|
116
117
|
|
|
117
118
|
async def _handle_retry_cloud(fut: asyncio.Future[None], func, iotId: str, command: bytes) -> None:
|
|
118
119
|
"""Handle a retry."""
|
|
120
|
+
|
|
119
121
|
if not fut.done():
|
|
120
|
-
|
|
122
|
+
loop = asyncio.get_running_loop()
|
|
123
|
+
await loop.run_in_executor(None, func, iotId, command)
|
|
121
124
|
|
|
122
125
|
|
|
123
126
|
class ConnectionPreference(Enum):
|
|
@@ -223,10 +226,8 @@ class Mammotion(object):
|
|
|
223
226
|
|
|
224
227
|
async def initiate_cloud_connection(self, cloud_client: CloudIOTGateway) -> None:
|
|
225
228
|
if self._mammotion_mqtt is not None:
|
|
226
|
-
if
|
|
227
|
-
|
|
228
|
-
await loop.run_in_executor(None, self._mammotion_mqtt.connect_async)
|
|
229
|
-
return
|
|
229
|
+
if self._mammotion_mqtt.is_connected:
|
|
230
|
+
return
|
|
230
231
|
|
|
231
232
|
|
|
232
233
|
self._mammotion_mqtt = MammotionMQTT(region_id=cloud_client._region.data.regionId,
|
|
@@ -244,6 +245,11 @@ class Mammotion(object):
|
|
|
244
245
|
if device.deviceName.startswith(("Luba-", "Yuka-")):
|
|
245
246
|
self.devices.add_device(MammotionMixedDeviceManager(name=device.deviceName, cloud_device=device, mqtt=self._mammotion_mqtt))
|
|
246
247
|
|
|
248
|
+
def set_disconnect_strategy(self, disconnect: bool):
|
|
249
|
+
for device_name, device in self.devices.devices:
|
|
250
|
+
if device.ble() is not None:
|
|
251
|
+
ble_device: MammotionBaseBLEDevice = device.ble()
|
|
252
|
+
ble_device.set_disconnect_strategy(disconnect)
|
|
247
253
|
|
|
248
254
|
@staticmethod
|
|
249
255
|
async def login(account: str, password: str) -> CloudIOTGateway:
|
|
@@ -504,6 +510,28 @@ class MammotionBaseDevice:
|
|
|
504
510
|
# jobs list
|
|
505
511
|
# hash_list_result = await self._send_command_with_args("get_all_boundary_hash_list", sub_cmd=3)
|
|
506
512
|
|
|
513
|
+
async def move_forward(self):
|
|
514
|
+
linear_speed = 1.0
|
|
515
|
+
angular_speed = 0.0
|
|
516
|
+
transfrom3 = RockerControlUtil.getInstance().transfrom3(90, 1000)
|
|
517
|
+
transform4 = RockerControlUtil.getInstance().transfrom3(0, 0)
|
|
518
|
+
|
|
519
|
+
if transfrom3 is not None and len(transfrom3) > 0:
|
|
520
|
+
linear_speed = transfrom3[0] * 10
|
|
521
|
+
angular_speed = int(transform4[1] * 4.5)
|
|
522
|
+
await self._send_command_with_args("send_movement", linear_speed=linear_speed, angular_speed=angular_speed)
|
|
523
|
+
|
|
524
|
+
async def move_stop(self):
|
|
525
|
+
linear_speed = 0.0
|
|
526
|
+
angular_speed = 0.0
|
|
527
|
+
transfrom3 = RockerControlUtil.getInstance().transfrom3(0, 0)
|
|
528
|
+
transform4 = RockerControlUtil.getInstance().transfrom3(0, 0)
|
|
529
|
+
|
|
530
|
+
if transfrom3 is not None and len(transfrom3) > 0:
|
|
531
|
+
linear_speed = transfrom3[0] * 10
|
|
532
|
+
angular_speed = int(transform4[1] * 4.5)
|
|
533
|
+
await self._send_command_with_args("send_movement", linear_speed=linear_speed, angular_speed=angular_speed)
|
|
534
|
+
|
|
507
535
|
async def command(self, key: str, **kwargs):
|
|
508
536
|
"""Send a command to the device."""
|
|
509
537
|
return await self._send_command_with_args(key, **kwargs)
|
|
@@ -515,6 +543,7 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
515
543
|
def __init__(self, mowing_state: MowingDevice, device: BLEDevice, interface: int = 0, **kwargs: Any) -> None:
|
|
516
544
|
"""Initialize MammotionBaseBLEDevice."""
|
|
517
545
|
super().__init__(mowing_state)
|
|
546
|
+
self._disconnect_strategy = True
|
|
518
547
|
self._ble_sync_task = None
|
|
519
548
|
self._prev_notification = None
|
|
520
549
|
self._interface = f"hci{interface}"
|
|
@@ -621,7 +650,10 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
621
650
|
@property
|
|
622
651
|
def rssi(self) -> int:
|
|
623
652
|
"""Return RSSI of device."""
|
|
624
|
-
|
|
653
|
+
try:
|
|
654
|
+
return self._mower.device.sys.toapp_report_data.connect.ble_rssi
|
|
655
|
+
finally:
|
|
656
|
+
return 0
|
|
625
657
|
|
|
626
658
|
async def _ensure_connected(self):
|
|
627
659
|
"""Ensure connection to device is established."""
|
|
@@ -651,12 +683,11 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
651
683
|
return
|
|
652
684
|
_LOGGER.debug("%s: Connecting; RSSI: %s", self.name, self.rssi)
|
|
653
685
|
client: BleakClientWithServiceCache = await establish_connection(
|
|
654
|
-
|
|
686
|
+
BleakClientWithServiceCache,
|
|
655
687
|
self._device,
|
|
656
688
|
self.name,
|
|
657
689
|
self._disconnected,
|
|
658
690
|
max_attempts=10,
|
|
659
|
-
use_services_cache=True,
|
|
660
691
|
ble_device_callback=lambda: self._device,
|
|
661
692
|
)
|
|
662
693
|
_LOGGER.debug("%s: Connected; RSSI: %s", self.name, self.rssi)
|
|
@@ -838,6 +869,8 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
838
869
|
|
|
839
870
|
async def _execute_timed_disconnect(self) -> None:
|
|
840
871
|
"""Execute timed disconnection."""
|
|
872
|
+
if not self._disconnect_strategy:
|
|
873
|
+
return
|
|
841
874
|
_LOGGER.debug(
|
|
842
875
|
"%s: Executing timed disconnect after timeout of %s",
|
|
843
876
|
self.name,
|
|
@@ -887,6 +920,9 @@ class MammotionBaseBLEDevice(MammotionBaseDevice):
|
|
|
887
920
|
if self._client is not None:
|
|
888
921
|
return await self._client.disconnect()
|
|
889
922
|
|
|
923
|
+
def set_disconnect_strategy(self, disconnect):
|
|
924
|
+
self._disconnect_strategy = disconnect
|
|
925
|
+
|
|
890
926
|
|
|
891
927
|
class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
892
928
|
"""Base class for Mammotion Cloud devices."""
|
|
@@ -1003,7 +1039,7 @@ class MammotionBaseCloudDevice(MammotionBaseDevice):
|
|
|
1003
1039
|
await loop.run_in_executor(None, self._mqtt_client.get_cloud_client().send_cloud_command, self.iot_id, command)
|
|
1004
1040
|
|
|
1005
1041
|
retry_handle = self.loop.call_at(
|
|
1006
|
-
self.loop.time() +
|
|
1042
|
+
self.loop.time() + 10,
|
|
1007
1043
|
lambda: asyncio.ensure_future(
|
|
1008
1044
|
_handle_retry_cloud(
|
|
1009
1045
|
self._notify_future, self._mqtt_client.get_cloud_client().send_cloud_command, self.iot_id, command
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"""MammotionMQTT."""
|
|
2
|
-
|
|
2
|
+
import asyncio
|
|
3
3
|
import hashlib
|
|
4
4
|
import hmac
|
|
5
5
|
import json
|
|
@@ -81,7 +81,7 @@ class MammotionMQTT:
|
|
|
81
81
|
logger.info("Connecting...")
|
|
82
82
|
self._linkkit_client.thing_setup()
|
|
83
83
|
self._linkkit_client.connect_async()
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
|
|
86
86
|
def disconnect(self):
|
|
87
87
|
"""Disconnect from MQTT Server."""
|
|
@@ -91,6 +91,7 @@ class MammotionMQTT:
|
|
|
91
91
|
def _thing_on_thing_enable(self, user_data):
|
|
92
92
|
"""Is called when Thing is enabled."""
|
|
93
93
|
logger.debug("on_thing_enable")
|
|
94
|
+
self.is_connected = True
|
|
94
95
|
# logger.debug('subscribe_topic, topic:%s' % echo_topic)
|
|
95
96
|
# self._linkkit_client.subscribe_topic(echo_topic, 0)
|
|
96
97
|
self._linkkit_client.subscribe_topic(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pymammotion"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.6"
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "pymammotion"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
license = "GNU-3.0"
|
|
9
9
|
description = ""
|
|
10
10
|
readme = "README.md"
|
|
@@ -52,7 +52,7 @@ mypy = "^1.10.0"
|
|
|
52
52
|
pre-commit = "^3.7.1"
|
|
53
53
|
|
|
54
54
|
[tool.bumpver]
|
|
55
|
-
current_version = "0.2.
|
|
55
|
+
current_version = "0.2.6"
|
|
56
56
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
57
57
|
commit_message = "Bump version {old_version} -> {new_version}"
|
|
58
58
|
commit = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/dev_by_account_response.py
RENAMED
|
File without changes
|
{pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/login_by_oauth_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/aliyun/dataclass/session_by_authcode_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
|
{pymammotion-0.2.5 → pymammotion-0.2.6}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymammotion-0.2.5 → pymammotion-0.2.6}/pymammotion/mammotion/commands/messages/navigation.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
|