pymammotion 0.2.60__py3-none-any.whl → 0.2.62__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/aliyun/cloud_gateway.py +0 -1
- pymammotion/data/model/device.py +3 -1
- pymammotion/data/model/device_info.py +25 -0
- pymammotion/data/model/report_info.py +14 -0
- pymammotion/data/state_manager.py +15 -1
- pymammotion/proto/mctrl_nav.proto +2 -2
- pymammotion/proto/mctrl_nav.py +2 -2
- {pymammotion-0.2.60.dist-info → pymammotion-0.2.62.dist-info}/METADATA +1 -1
- {pymammotion-0.2.60.dist-info → pymammotion-0.2.62.dist-info}/RECORD +11 -10
- {pymammotion-0.2.60.dist-info → pymammotion-0.2.62.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.60.dist-info → pymammotion-0.2.62.dist-info}/WHEEL +0 -0
@@ -664,7 +664,6 @@ class CloudIOTGateway:
|
|
664
664
|
"args": {"content": self.converter.printBase64Binary(command)},
|
665
665
|
"identifier": "device_protobuf_sync_service",
|
666
666
|
"iotId": f"{iot_id}",
|
667
|
-
"identityId": f"{self._session_by_authcode_response.data.identityId}"
|
668
667
|
},
|
669
668
|
request=request,
|
670
669
|
version="1.0",
|
pymammotion/data/model/device.py
CHANGED
@@ -8,6 +8,7 @@ from mashumaro.mixins.orjson import DataClassORJSONMixin
|
|
8
8
|
|
9
9
|
from pymammotion.data.model import HashList, RapidState
|
10
10
|
from pymammotion.data.model.device_config import DeviceLimits
|
11
|
+
from pymammotion.data.model.device_info import MowerInfo
|
11
12
|
from pymammotion.data.model.location import Location
|
12
13
|
from pymammotion.data.model.report_info import ReportData
|
13
14
|
from pymammotion.data.mqtt.properties import ThingPropertiesMessage
|
@@ -34,7 +35,8 @@ from pymammotion.utility.map import CoordinateConverter
|
|
34
35
|
class MowingDevice(DataClassORJSONMixin):
|
35
36
|
"""Wraps the betterproto dataclasses, so we can bypass the groups for keeping all data."""
|
36
37
|
|
37
|
-
|
38
|
+
mower_state: MowerInfo = field(default_factory=MowerInfo)
|
39
|
+
mqtt_properties: ThingPropertiesMessage = field(default_factory=ThingPropertiesMessage)
|
38
40
|
map: HashList = field(default_factory=HashList)
|
39
41
|
location: Location = field(default_factory=Location)
|
40
42
|
mowing_state: RapidState = field(default_factory=RapidState)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
from dataclasses import dataclass, field
|
2
|
+
|
3
|
+
from mashumaro.mixins.orjson import DataClassORJSONMixin
|
4
|
+
|
5
|
+
|
6
|
+
@dataclass
|
7
|
+
class SideLight(DataClassORJSONMixin):
|
8
|
+
operate: int = 0
|
9
|
+
enable: int = 0
|
10
|
+
start_hour: int = 0
|
11
|
+
start_min: int = 0
|
12
|
+
end_hour: int = 0
|
13
|
+
end_min: int = 0
|
14
|
+
action: int = 0
|
15
|
+
|
16
|
+
|
17
|
+
@dataclass
|
18
|
+
class MowerInfo(DataClassORJSONMixin):
|
19
|
+
blade_status: bool = False
|
20
|
+
side_led: SideLight = field(default_factory=SideLight)
|
21
|
+
collector_installation_status: bool = False
|
22
|
+
model: str = ""
|
23
|
+
swversion: str = ""
|
24
|
+
product_key: str = ""
|
25
|
+
model_id: str = ""
|
@@ -10,6 +10,18 @@ class ConnectData(DataClassORJSONMixin):
|
|
10
10
|
wifi_rssi: int = 0
|
11
11
|
|
12
12
|
|
13
|
+
@dataclass
|
14
|
+
class CollectorStatus(DataClassORJSONMixin):
|
15
|
+
collector_installation_status: int = 0
|
16
|
+
|
17
|
+
|
18
|
+
@dataclass
|
19
|
+
class MnetInfo(DataClassORJSONMixin):
|
20
|
+
model: str = ""
|
21
|
+
revision: str = ""
|
22
|
+
imei: str = ""
|
23
|
+
|
24
|
+
|
13
25
|
@dataclass
|
14
26
|
class DeviceData(DataClassORJSONMixin):
|
15
27
|
sys_status: int = 0
|
@@ -18,6 +30,8 @@ class DeviceData(DataClassORJSONMixin):
|
|
18
30
|
sensor_status: int = 0
|
19
31
|
last_status: int = 0
|
20
32
|
sys_time_stamp: str = ""
|
33
|
+
collector_status: CollectorStatus = field(default_factory=CollectorStatus)
|
34
|
+
mnet_info: MnetInfo = field(default_factory=MnetInfo)
|
21
35
|
|
22
36
|
|
23
37
|
@dataclass
|
@@ -6,12 +6,15 @@ from typing import Any, Awaitable, Callable, Optional
|
|
6
6
|
|
7
7
|
import betterproto
|
8
8
|
|
9
|
+
from pymammotion.proto.dev_net import WifiIotStatusReport
|
9
10
|
from pymammotion.aliyun.cloud_gateway import SetupException
|
10
11
|
from pymammotion.data.model.device import MowingDevice
|
12
|
+
from pymammotion.data.model.device_info import SideLight
|
11
13
|
from pymammotion.data.model.hash_list import AreaHashNameList
|
12
14
|
from pymammotion.data.mqtt.properties import ThingPropertiesMessage
|
13
15
|
from pymammotion.proto.luba_msg import LubaMsg
|
14
16
|
from pymammotion.proto.mctrl_nav import AppGetAllAreaHashName, NavGetCommDataAck, NavGetHashListAck
|
17
|
+
from pymammotion.proto.mctrl_sys import TimeCtrlLight, DeviceProductTypeInfoT
|
15
18
|
from pymammotion.utility.constant import WorkMode
|
16
19
|
|
17
20
|
logger = logging.getLogger(__name__)
|
@@ -102,12 +105,23 @@ class StateManager:
|
|
102
105
|
self._device.mow_info(sys_msg[1])
|
103
106
|
case "system_tard_state_tunnel":
|
104
107
|
self._device.run_state_update(sys_msg[1])
|
108
|
+
case "todev_time_ctrl_light":
|
109
|
+
ctrl_light: TimeCtrlLight = sys_msg[1]
|
110
|
+
side_led: SideLight = SideLight.from_dict(ctrl_light.to_dict(casing=betterproto.Casing.SNAKE))
|
111
|
+
self._device.mower_state.side_led = side_led
|
112
|
+
case "device_product_type_info":
|
113
|
+
device_product_type: DeviceProductTypeInfoT = sys_msg[1]
|
114
|
+
self._device.mower_state.model_id = device_product_type.main_product_type
|
105
115
|
|
106
116
|
def _update_driver_data(self, message) -> None:
|
107
117
|
pass
|
108
118
|
|
109
119
|
def _update_net_data(self, message) -> None:
|
110
|
-
|
120
|
+
net_msg = betterproto.which_one_of(message.net, "NetSubType")
|
121
|
+
match net_msg[0]:
|
122
|
+
case "toapp_wifi_iot_status":
|
123
|
+
wifi_iot_status: WifiIotStatusReport = net_msg[1]
|
124
|
+
self._device.mower_state.product_key = wifi_iot_status.productkey
|
111
125
|
|
112
126
|
def _update_mul_data(self, message) -> None:
|
113
127
|
pass
|
@@ -461,8 +461,8 @@ message SvgMessageAckT {
|
|
461
461
|
int32 sub_cmd = 2; // Represents SUBCMD field
|
462
462
|
int32 total_frame = 3; // Represents TOTALFRAME field
|
463
463
|
int32 current_frame = 4; // Represents CURRENTFRAME field
|
464
|
-
|
465
|
-
|
464
|
+
fixed64 data_hash = 5; // Represents DATAHASH field
|
465
|
+
fixed64 paternal_hash_a = 6; // Represents PATERNALHASHA field
|
466
466
|
int32 type = 7; // Represents TYPE field
|
467
467
|
int32 result = 8; // Represents RESULT field
|
468
468
|
svg_message_t svg_message = 9; // Represents SVG_MESSAGE field
|
pymammotion/proto/mctrl_nav.py
CHANGED
@@ -516,8 +516,8 @@ class SvgMessageAckT(betterproto.Message):
|
|
516
516
|
sub_cmd: int = betterproto.int32_field(2)
|
517
517
|
total_frame: int = betterproto.int32_field(3)
|
518
518
|
current_frame: int = betterproto.int32_field(4)
|
519
|
-
data_hash: int = betterproto.
|
520
|
-
paternal_hash_a: int = betterproto.
|
519
|
+
data_hash: int = betterproto.fixed64_field(5)
|
520
|
+
paternal_hash_a: int = betterproto.fixed64_field(6)
|
521
521
|
type: int = betterproto.int32_field(7)
|
522
522
|
result: int = betterproto.int32_field(8)
|
523
523
|
svg_message: "SvgMessageT" = betterproto.message_field(9)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
pymammotion/__init__.py,sha256=jHCQrpJaG1jAoID9T4RT3g4JsZc0JpJqIcqjnA7cXd0,1605
|
2
2
|
pymammotion/aliyun/__init__.py,sha256=T1lkX7TRYiL4nqYanG4l4MImV-SlavSbuooC-W-uUGw,29
|
3
|
-
pymammotion/aliyun/cloud_gateway.py,sha256=
|
3
|
+
pymammotion/aliyun/cloud_gateway.py,sha256=m-cVJ0p3-v1mKM24lTKTj3t0PEseO5ca2FbyK_iT_S8,25657
|
4
4
|
pymammotion/aliyun/cloud_service.py,sha256=px7dUKow5Z7VyebjYzuKkzkm77XbUXYiFiYO_2e-UQ0,2207
|
5
5
|
pymammotion/aliyun/model/aep_response.py,sha256=8f6GIP58ve8gd6AL3HBoXxsy0n2q4ygWvjELGnoOnVc,452
|
6
6
|
pymammotion/aliyun/model/connect_response.py,sha256=Yz-fEbDzgGPTo5Of2oAjmFkSv08T7ze80pQU4k-gKIU,824
|
@@ -22,8 +22,9 @@ pymammotion/const.py,sha256=lWRxvTVdXnNHuxqvRkjO5ziK0Ic-fZMM6J2dbe5M6Nc,385
|
|
22
22
|
pymammotion/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
pymammotion/data/model/__init__.py,sha256=aSyroxYQQS-WMRi6WmWm2js4wLa9nmsi160gx9tts4o,323
|
24
24
|
pymammotion/data/model/account.py,sha256=vJM-KTf2q6eBfVC-UlNHBSmJvqHiCawZ40vnuhXhaz8,140
|
25
|
-
pymammotion/data/model/device.py,sha256=
|
25
|
+
pymammotion/data/model/device.py,sha256=C0zi5rhmCXPuxpTh-ckzFkAhC1oGQcHUxNb0Li2N1ag,12349
|
26
26
|
pymammotion/data/model/device_config.py,sha256=SMBrG-rjN58Z59V-ok3wQ0721BQxM9zSdYXI3Q8GFdY,2828
|
27
|
+
pymammotion/data/model/device_info.py,sha256=ahz2xILdSYdX6SIVuVzz8QCfSQLefbQnpXrsiDpBDbY,585
|
27
28
|
pymammotion/data/model/enums.py,sha256=EpKmO8yVUZyEnTY4yH0DMMVKYNQM42zpW1maUu0i3IE,1582
|
28
29
|
pymammotion/data/model/excute_boarder_params.py,sha256=9CpUqrygcle1C_1hDW-riLmm4map4ZbE842NXjcomEI,1394
|
29
30
|
pymammotion/data/model/execute_boarder.py,sha256=9rd_h4fbcsXxgnLOd2rO2hWyD1abnTGc47QTEpp8DD0,1103
|
@@ -34,12 +35,12 @@ pymammotion/data/model/mowing_modes.py,sha256=5TrHSijUyPtIDWpNtgzx_vFQukRJWRz4gI
|
|
34
35
|
pymammotion/data/model/plan.py,sha256=mcadkSL7fQXy0iJ0q786I3GEQY4i6kmQXfW6Ri69lcQ,2906
|
35
36
|
pymammotion/data/model/rapid_state.py,sha256=mIdhAG_LZXpVcybxqTLgLXkNOmVmDTn04B9PGIDA8Ls,1251
|
36
37
|
pymammotion/data/model/region_data.py,sha256=OTV15vRyn9JORXsQPjWMNF1ZujuNhsOKl25KeqwMObA,3007
|
37
|
-
pymammotion/data/model/report_info.py,sha256=
|
38
|
+
pymammotion/data/model/report_info.py,sha256=m3T2P2mLfy5wDDpyjM2q1y9zCKJJKIItNX0M-Ge1ijg,2577
|
38
39
|
pymammotion/data/mqtt/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
39
40
|
pymammotion/data/mqtt/event.py,sha256=z6j8t-ZOjEeKjFt7S0wV8vV5L0-iHD3RbwI9hCfzGTY,5044
|
40
41
|
pymammotion/data/mqtt/properties.py,sha256=kvphcjrDuJHuX8Az98-wKeFv_rSmu2Fz9YKLGodGSj0,3759
|
41
42
|
pymammotion/data/mqtt/status.py,sha256=zqnlo-MzejEQZszl0i0Wucoc3E76x6UtI9JLxoBnu54,1067
|
42
|
-
pymammotion/data/state_manager.py,sha256=
|
43
|
+
pymammotion/data/state_manager.py,sha256=Pj5cuaPJVBUkZS_IgGk5StD-gPXxHtrkTeIGe3z3Lik,5577
|
43
44
|
pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
|
44
45
|
pymammotion/event/event.py,sha256=UzYnxV5DfvMDK3E06UvSzvzuBbaXOOUwO6xYt_zn9To,2034
|
45
46
|
pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -92,8 +93,8 @@ pymammotion/proto/mctrl_driver.proto,sha256=I0BncdAa3laeqT17Sn95r_1HuBD3dSc9IVu9
|
|
92
93
|
pymammotion/proto/mctrl_driver.py,sha256=sseY2MxUtaQZvg7fvbA_gNvtqx9MVDW_rvUcfA2CWVs,2971
|
93
94
|
pymammotion/proto/mctrl_driver_pb2.py,sha256=bfLwZb5Hehb6OIkgFrZMkQ0oTBXoOBxpruszKz-UM1U,3785
|
94
95
|
pymammotion/proto/mctrl_driver_pb2.pyi,sha256=9_rcQELsSeOfeIQMTEFIpeXICpDe3arQeA4kAYWNSWw,5860
|
95
|
-
pymammotion/proto/mctrl_nav.proto,sha256=
|
96
|
-
pymammotion/proto/mctrl_nav.py,sha256=
|
96
|
+
pymammotion/proto/mctrl_nav.proto,sha256=FODYEh8AsCgyDVHU3xiFrkxyOjVubY0WRN5Ge2J1GLk,12378
|
97
|
+
pymammotion/proto/mctrl_nav.py,sha256=_Nss6v10WkYS1z3D6v96L71WZ3FoRqk98s-dwEJpCpA,24888
|
97
98
|
pymammotion/proto/mctrl_nav_pb2.py,sha256=LAHfEmGfNVZCN6vuLSZF6s2wd1Qk-siaWe4mdPWPdxc,24213
|
98
99
|
pymammotion/proto/mctrl_nav_pb2.pyi,sha256=qmGYfKh2o63e5ppl9QIWnwDbmGVUVOf7EqhC9ApE5fg,51336
|
99
100
|
pymammotion/proto/mctrl_ota.proto,sha256=4iHr-v1R0QiNndCnv3b6mhXiERLukB67ZzhTgt1iMc0,629
|
@@ -118,7 +119,7 @@ pymammotion/utility/map.py,sha256=GYscVMg2cX3IPlNpCBNHDW0S55yS1WGRf1iHnNZ7TfQ,22
|
|
118
119
|
pymammotion/utility/movement.py,sha256=N75oAoAgFydqoaOedYIxGUHmuTCtPzAOtb-d_29tpfI,615
|
119
120
|
pymammotion/utility/periodic.py,sha256=MbeSb9cfhxzYmdT_RiE0dZe3H9IfbQW_zSqhmSX2RUc,3321
|
120
121
|
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.
|
122
|
+
pymammotion-0.2.62.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
123
|
+
pymammotion-0.2.62.dist-info/METADATA,sha256=6UplkWzRMBFIE91ezexuQlA-QNGxHuTChMkbbTYWrEg,3874
|
124
|
+
pymammotion-0.2.62.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
125
|
+
pymammotion-0.2.62.dist-info/RECORD,,
|
File without changes
|
File without changes
|