This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
alarmdecoder
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Made SSL force the handshake instead of waiting until communication occurs. This allows us to grab the config automatically in open.
pyserial_fix
Scott Petersen
11 years ago
parent
cb4a570190
commit
6723d81813
9 changed files
with
4 additions
and
11 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-3
examples/alarm_email.py
+0
-1
examples/basics.py
+0
-1
examples/rf_device.py
+0
-1
examples/serialport.py
+0
-1
examples/socket_example.py
+0
-3
examples/ssl_socket.py
+0
-1
examples/virtual_zone_expander.py
+1
-0
pyad2/ad2.py
+3
-0
pyad2/devices.py
+ 0
- 3
examples/alarm_email.py
View File
@@ -26,9 +26,6 @@ def main():
device.on_alarm += handle_alarm
device.open()
# Retrieve the device configuration
device.get_config()
# Wait for events
while True:
time.sleep(1)
+ 0
- 1
examples/basics.py
View File
@@ -13,7 +13,6 @@ def main():
# Set up an event handler and open the device
device.on_message += handle_message
device.open()
device.get_config()
# Wait for events.
while True:
+ 0
- 1
examples/rf_device.py
View File
@@ -23,7 +23,6 @@ def main():
# Set up an event handler and open the device
device.on_rfx_message += handle_rfx
device.open()
device.get_config()
# Wait for events.
while True:
+ 0
- 1
examples/serialport.py
View File
@@ -17,7 +17,6 @@ def main():
# Set up an event handler and open the device
device.on_message += handle_message
device.open(baudrate=BAUDRATE) # Override the default SerialDevice baudrate.
device.get_config()
# Wait for events.
while True:
+ 0
- 1
examples/socket_example.py
View File
@@ -18,7 +18,6 @@ def main():
# Set up an event handler and open the device
device.on_message += handle_message
device.open()
device.get_config()
# Wait for events.
while True:
+ 0
- 3
examples/ssl_socket.py
View File
@@ -33,9 +33,6 @@ def main():
device.on_message += handle_message
device.open()
time.sleep(1) # Allow time for SSL handshake to complete.
device.get_config()
# Wait for events.
while True:
time.sleep(1)
+ 0
- 1
examples/virtual_zone_expander.py
View File
@@ -35,7 +35,6 @@ def main():
device.on_zone_restore += handle_zone_restore
device.open()
device.get_config()
# Wait for events.
last_update = time.time()
+ 1
- 0
pyad2/ad2.py
View File
@@ -105,6 +105,7 @@ class AD2(object):
"""
self._wire_events()
self._device.open(baudrate=baudrate, no_reader_thread=no_reader_thread)
self.get_config()
def close(self):
"""
+ 3
- 0
pyad2/devices.py
View File
@@ -880,6 +880,9 @@ class SocketDevice(Device):
self._device.connect((self._host, self._port))
if self._use_ssl:
self._device.do_handshake()
self._id = '{0}:{1}'.format(self._host, self._port)
except socket.error, err:
Write
Preview
Loading…
Cancel
Save