pyialarm
Advanced tools
+6
-3
@@ -1,4 +0,4 @@ | ||
| Metadata-Version: 1.1 | ||
| Metadata-Version: 2.1 | ||
| Name: pyialarm | ||
| Version: 1.5 | ||
| Version: 1.7 | ||
| Summary: A simple library to interface with iAlarm systems, built for use with Home-Assistant | ||
@@ -10,3 +10,2 @@ Home-page: https://github.com/RyuzakiKK/pyialarm | ||
| Download-URL: https://github.com/RyuzakiKK/pyialarm | ||
| Description: UNKNOWN | ||
| Keywords: ialarm,antifurtocasa365,alarm | ||
@@ -17,1 +16,5 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3 | ||
| License-File: LICENSE | ||
| UNKNOWN | ||
@@ -1,4 +0,4 @@ | ||
| Metadata-Version: 1.1 | ||
| Metadata-Version: 2.1 | ||
| Name: pyialarm | ||
| Version: 1.5 | ||
| Version: 1.7 | ||
| Summary: A simple library to interface with iAlarm systems, built for use with Home-Assistant | ||
@@ -10,3 +10,2 @@ Home-page: https://github.com/RyuzakiKK/pyialarm | ||
| Download-URL: https://github.com/RyuzakiKK/pyialarm | ||
| Description: UNKNOWN | ||
| Keywords: ialarm,antifurtocasa365,alarm | ||
@@ -17,1 +16,5 @@ Platform: UNKNOWN | ||
| Classifier: Programming Language :: Python :: 3 | ||
| License-File: LICENSE | ||
| UNKNOWN | ||
+8
-28
@@ -41,3 +41,2 @@ import logging | ||
| self.port = port | ||
| self.seq = 0 | ||
| self.sock = None | ||
@@ -59,2 +58,6 @@ | ||
| def _close_connection(self) -> None: | ||
| if self.sock and self.sock.fileno() != 1: | ||
| self.sock.close() | ||
| def _send_request_list(self, xpath, command, offset=0, partial_list=None): | ||
@@ -78,2 +81,4 @@ if offset > 0: | ||
| self._send_request_list(xpath, command, offset, partial_list) | ||
| self._close_connection() | ||
| return partial_list | ||
@@ -85,2 +90,3 @@ | ||
| response = self._receive() | ||
| self._close_connection() | ||
| return self._clean_response_dict(response, xpath) | ||
@@ -171,5 +177,3 @@ | ||
| self.seq += 1 | ||
| msg = b'@ieM%04d%04d0000%s%04d' % (len(xml), self.seq, self._xor(xml), | ||
| self.seq) | ||
| msg = b'@ieM%04d00010000%s0001' % (len(xml), self._xor(xml)) | ||
| self.sock.send(msg) | ||
@@ -248,25 +252,1 @@ | ||
| return buf | ||
| if __name__ == "__main__": | ||
| ialarm = IAlarm("alarm") | ||
| print("ok") | ||
| print(ialarm.get_status()) | ||
| print(ialarm.get_mac()) | ||
| # try: | ||
| # print(ialarm.get_status()) | ||
| # except ConnectionError: | ||
| # print("no connection") | ||
| # import time | ||
| # time.sleep(10) | ||
| # print("done sleeping") | ||
| # try: | ||
| # print(ialarm.get_status()) | ||
| # except ConnectionError: | ||
| # print("no connection") | ||
| # time.sleep(10) | ||
| # print("done sleeping") | ||
| # try: | ||
| # print(ialarm.get_status()) | ||
| # except ConnectionError: | ||
| # print("no connection") |
+1
-1
| from setuptools import setup | ||
| __version__ = '1.5' | ||
| __version__ = '1.7' | ||
@@ -5,0 +5,0 @@ setup( |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
22483
-2.09%233
-7.91%