python-mobius 0.8.3__py3-none-any.whl → 0.9.0__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.
- mobius/__init__.py +18 -15
- mobius/cli.py +488 -884
- mobius/coap.py +60 -152
- mobius/constants.py +250 -277
- mobius/crc.py +3 -5
- mobius/device.py +1486 -3153
- mobius/device_status.py +169 -493
- mobius/discovery.py +79 -181
- mobius/dump.py +65 -189
- mobius/frame.py +74 -124
- mobius/manufacturer.py +28 -36
- mobius/mesh_address.py +34 -74
- mobius/mob.py +58 -114
- mobius/modifiers.py +38 -73
- mobius/power.py +18 -44
- mobius/pump_status.py +12 -23
- mobius/relay.py +60 -343
- mobius/scenes.py +51 -38
- mobius/schedule.py +175 -240
- python_mobius-0.9.0.dist-info/METADATA +161 -0
- python_mobius-0.9.0.dist-info/RECORD +24 -0
- {python_mobius-0.8.3.dist-info → python_mobius-0.9.0.dist-info}/WHEEL +1 -1
- python_mobius-0.8.3.dist-info/METADATA +0 -208
- python_mobius-0.8.3.dist-info/RECORD +0 -24
- {python_mobius-0.8.3.dist-info → python_mobius-0.9.0.dist-info}/entry_points.txt +0 -0
- {python_mobius-0.8.3.dist-info → python_mobius-0.9.0.dist-info}/licenses/LICENSE +0 -0
mobius/__init__.py
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"""
|
|
2
2
|
python-mobius: a reverse-engineered Python client for the BLE protocol used
|
|
3
3
|
by EcoTech Marine (VorTech, Radion), AquaIllumination (Prime, Hydra),
|
|
4
|
-
Neptune Systems
|
|
4
|
+
Neptune Systems and NYOS "Mobius" aquarium devices.
|
|
5
5
|
|
|
6
6
|
Not affiliated with or endorsed by any of those companies. This is an
|
|
7
|
-
independent
|
|
8
|
-
|
|
9
|
-
publicly-distributed Mobius Android app. See documentation/ for the full
|
|
10
|
-
protocol writeup and confirmation evidence for every field.
|
|
7
|
+
independent implementation of the wire protocol for interoperability. See
|
|
8
|
+
documentation/ for the protocol description.
|
|
11
9
|
"""
|
|
12
10
|
|
|
13
11
|
from .crc import crc16, CRC16_TABLE
|
|
@@ -22,9 +20,10 @@ from .frame import (
|
|
|
22
20
|
)
|
|
23
21
|
from .constants import (
|
|
24
22
|
PrimitiveType, PRIMITIVE_SIZE, LIGHT_PRIMITIVES,
|
|
25
|
-
PUMP_PRIMITIVES_VERIFIED, PUMP_PRIMITIVES_EXPERIMENTAL,
|
|
23
|
+
PUMP_PRIMITIVES_VERIFIED, PUMP_PRIMITIVES_EXPERIMENTAL, PUMP_PRIMITIVES, enum_or_none,
|
|
24
|
+
primitive_type_from_name, support_tier, PumpParamRange, pump_param_range, pump_param_errors,
|
|
26
25
|
Model, MODEL_MANUFACTURER, manufacturer_for_model,
|
|
27
|
-
ErrorState, C2Attribute, PhysicalValueID, VisualID,
|
|
26
|
+
ErrorState, C2Attribute, OperationMode, PhysicalValueID, VisualID,
|
|
28
27
|
SceneID, OperationState, FsciStatus,
|
|
29
28
|
PumpMode, PumpOverrideMode, RampType, PumpParam, PUMP_PARAM_SIZE, PUMP_MODE_PARAMS,
|
|
30
29
|
supported_pump_modes,
|
|
@@ -37,11 +36,11 @@ from .schedule import (
|
|
|
37
36
|
LightPrimitive, SchedulePoint, interpolate_light_schedule,
|
|
38
37
|
PumpPrimitiveValue, PumpSchedulePoint, get_active_pump_block,
|
|
39
38
|
light_schedule_to_dict, light_schedule_from_dict,
|
|
40
|
-
pump_schedule_to_dict, pump_schedule_from_dict,
|
|
39
|
+
pump_schedule_to_dict, pump_schedule_from_dict, pump_params_to_dict,
|
|
41
40
|
MAX_PUMP_SCHEDULE_POINT_SIZE,
|
|
42
41
|
)
|
|
43
42
|
from .scenes import Scene, ActiveScene, decode_configured_scenes, decode_active_scene
|
|
44
|
-
from .manufacturer import MOBIUS_COMPANY_ID_ECOTECH, MOBIUS_COMPANY_ID_AQUAILLUMINATION, MOBIUS_COMPANY_IDS, MobiusAdvertisement, parse_manufacturer_data
|
|
43
|
+
from .manufacturer import MOBIUS_COMPANY_ID_ECOTECH, MOBIUS_COMPANY_ID_AQUAILLUMINATION, MOBIUS_COMPANY_IDS, MobiusAdvertisement, parse_manufacturer_data, parse_advertisement
|
|
45
44
|
from .modifiers import (
|
|
46
45
|
AcclimationInfo, is_night_segment,
|
|
47
46
|
julian_day_from_date, lunar_days_into_phase, lunar_percent_reduction,
|
|
@@ -58,11 +57,12 @@ from .coap import (
|
|
|
58
57
|
from .mesh_address import (
|
|
59
58
|
mesh_local_prefix_from_own_address, mesh_local_prefix_from_mlprefix,
|
|
60
59
|
is_valid_mesh_address, build_rloc_address, extract_short_address,
|
|
61
|
-
is_short_address_derived,
|
|
60
|
+
is_short_address_derived, format_mesh_address,
|
|
62
61
|
)
|
|
63
62
|
from .relay import RelayedMobiusDevice
|
|
64
63
|
from .device import (
|
|
65
64
|
MobiusDevice, MobiusPump, LightIntensityResult, LightPollResult, FullPollResult,
|
|
65
|
+
schedule_capacity, min_schedule_capacity, tank_group,
|
|
66
66
|
SERVICE_GENERAL, CHAR_RX_DATA, CHAR_RX_FINAL, CHAR_TX_DATA, CHAR_TX_FINAL,
|
|
67
67
|
)
|
|
68
68
|
from .discovery import (
|
|
@@ -82,7 +82,7 @@ from .mob import (
|
|
|
82
82
|
MAX_PUMP_PRIMITIVE_SIZE,
|
|
83
83
|
)
|
|
84
84
|
|
|
85
|
-
__version__ = "0.
|
|
85
|
+
__version__ = "0.9.0"
|
|
86
86
|
|
|
87
87
|
__all__ = [
|
|
88
88
|
"__version__",
|
|
@@ -98,9 +98,10 @@ __all__ = [
|
|
|
98
98
|
"OPCODE_GET_ATTR_ELEMENTS", "OPCODE_GET_ATTR_ELEMENTS_EXT", "OPCODE_GET_OPCODES",
|
|
99
99
|
# constants
|
|
100
100
|
"PrimitiveType", "PRIMITIVE_SIZE", "LIGHT_PRIMITIVES",
|
|
101
|
-
"PUMP_PRIMITIVES_VERIFIED", "PUMP_PRIMITIVES_EXPERIMENTAL",
|
|
101
|
+
"PUMP_PRIMITIVES_VERIFIED", "PUMP_PRIMITIVES_EXPERIMENTAL", "PUMP_PRIMITIVES", "enum_or_none",
|
|
102
|
+
"primitive_type_from_name", "support_tier", "PumpParamRange", "pump_param_range", "pump_param_errors",
|
|
102
103
|
"Model", "MODEL_MANUFACTURER", "manufacturer_for_model",
|
|
103
|
-
"ErrorState", "C2Attribute", "PhysicalValueID", "VisualID",
|
|
104
|
+
"ErrorState", "C2Attribute", "OperationMode", "PhysicalValueID", "VisualID",
|
|
104
105
|
"SceneID", "OperationState", "FsciStatus",
|
|
105
106
|
"PumpMode", "PumpOverrideMode", "RampType", "PumpParam", "PUMP_PARAM_SIZE", "PUMP_MODE_PARAMS",
|
|
106
107
|
"supported_pump_modes",
|
|
@@ -112,12 +113,12 @@ __all__ = [
|
|
|
112
113
|
"LightPrimitive", "SchedulePoint", "interpolate_light_schedule",
|
|
113
114
|
"PumpPrimitiveValue", "PumpSchedulePoint", "get_active_pump_block",
|
|
114
115
|
"light_schedule_to_dict", "light_schedule_from_dict",
|
|
115
|
-
"pump_schedule_to_dict", "pump_schedule_from_dict",
|
|
116
|
+
"pump_schedule_to_dict", "pump_schedule_from_dict", "pump_params_to_dict",
|
|
116
117
|
"MAX_PUMP_SCHEDULE_POINT_SIZE",
|
|
117
118
|
# scenes
|
|
118
119
|
"Scene", "ActiveScene", "decode_configured_scenes", "decode_active_scene",
|
|
119
120
|
# manufacturer
|
|
120
|
-
"MOBIUS_COMPANY_ID_ECOTECH", "MOBIUS_COMPANY_ID_AQUAILLUMINATION", "MOBIUS_COMPANY_IDS", "MobiusAdvertisement", "parse_manufacturer_data",
|
|
121
|
+
"MOBIUS_COMPANY_ID_ECOTECH", "MOBIUS_COMPANY_ID_AQUAILLUMINATION", "MOBIUS_COMPANY_IDS", "MobiusAdvertisement", "parse_manufacturer_data", "parse_advertisement",
|
|
121
122
|
# modifiers
|
|
122
123
|
"AcclimationInfo", "is_night_segment",
|
|
123
124
|
"julian_day_from_date", "lunar_days_into_phase", "lunar_percent_reduction",
|
|
@@ -133,9 +134,11 @@ __all__ = [
|
|
|
133
134
|
"next_coap_token",
|
|
134
135
|
"mesh_local_prefix_from_own_address", "mesh_local_prefix_from_mlprefix", "is_valid_mesh_address",
|
|
135
136
|
"build_rloc_address", "extract_short_address", "is_short_address_derived",
|
|
137
|
+
"format_mesh_address",
|
|
136
138
|
"RelayedMobiusDevice",
|
|
137
139
|
# device
|
|
138
140
|
"MobiusDevice", "MobiusPump", "LightIntensityResult", "LightPollResult", "FullPollResult",
|
|
141
|
+
"schedule_capacity", "min_schedule_capacity", "tank_group",
|
|
139
142
|
"SERVICE_GENERAL", "CHAR_RX_DATA", "CHAR_RX_FINAL", "CHAR_TX_DATA", "CHAR_TX_FINAL",
|
|
140
143
|
# discovery
|
|
141
144
|
"scan_for_mobius_devices", "scan_for_mobius_devices_with_info", "group_by_pan_id",
|