linknlink 0.2.3__tar.gz → 0.2.4__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.
- {linknlink-0.2.3 → linknlink-0.2.4}/PKG-INFO +1 -1
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/remote.py +8 -4
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/PKG-INFO +1 -1
- {linknlink-0.2.3 → linknlink-0.2.4}/setup.py +1 -1
- {linknlink-0.2.3 → linknlink-0.2.4}/LICENSE +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/README.md +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/__init__.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/const.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/device.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/exceptions.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/protocol.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink/sensor.py +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/SOURCES.txt +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/dependency_links.txt +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/not-zip-safe +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/requires.txt +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/linknlink.egg-info/top_level.txt +0 -0
- {linknlink-0.2.3 → linknlink-0.2.4}/setup.cfg +0 -0
|
@@ -29,8 +29,10 @@ class ehub(Device):
|
|
|
29
29
|
resp = self.send_packet(0x6A, packet)
|
|
30
30
|
e.check_error(resp[0x22:0x24])
|
|
31
31
|
payload = self.decrypt(resp[0x38:])
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
if 20000 <= self.devtype <= 29999:
|
|
33
|
+
p_len = struct.unpack("<H", payload[:0x2])[0]
|
|
34
|
+
return payload[0x6 : p_len + 2]
|
|
35
|
+
return payload[0x4:]
|
|
34
36
|
|
|
35
37
|
def check_sensors(self) -> dict:
|
|
36
38
|
"""Return the state of the sensors."""
|
|
@@ -105,8 +107,10 @@ class eremote(Device):
|
|
|
105
107
|
resp = self.send_packet(0x6A, packet)
|
|
106
108
|
e.check_error(resp[0x22:0x24])
|
|
107
109
|
payload = self.decrypt(resp[0x38:])
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
if 20000 <= self.devtype <= 29999:
|
|
111
|
+
p_len = struct.unpack("<H", payload[:0x2])[0]
|
|
112
|
+
return payload[0x6 : p_len + 2]
|
|
113
|
+
return payload[0x4:]
|
|
110
114
|
|
|
111
115
|
def _sendV2(self, command: int, data: bytes = b"") -> bytes:
|
|
112
116
|
"""Send a packet to the device."""
|
|
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
|