A clone of: https://github.com/nutechsoftware/alarmdecoder This is requires as they dropped support for older firmware releases w/o building in backward compatibility code, and they had previously hardcoded pyserial to a python2 only version.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1768 lines
112 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>alarmdecoder Package &mdash; alarmdecoder documentation</title>
  7. <link rel="stylesheet" href="_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="top" title="alarmdecoder documentation" href="index.html" />
  22. <link rel="prev" title="Welcome to Alarm Decoder’s documentation!" href="index.html" />
  23. </head>
  24. <body>
  25. <div class="related">
  26. <h3>Navigation</h3>
  27. <ul>
  28. <li class="right" style="margin-right: 10px">
  29. <a href="genindex.html" title="General Index"
  30. accesskey="I">index</a></li>
  31. <li class="right" >
  32. <a href="py-modindex.html" title="Python Module Index"
  33. >modules</a> |</li>
  34. <li class="right" >
  35. <a href="index.html" title="Welcome to Alarm Decoder’s documentation!"
  36. accesskey="P">previous</a> |</li>
  37. <li><a href="index.html">alarmdecoder documentation</a> &raquo;</li>
  38. </ul>
  39. </div>
  40. <div class="document">
  41. <div class="documentwrapper">
  42. <div class="bodywrapper">
  43. <div class="body">
  44. <div class="section" id="alarmdecoder-package">
  45. <h1>alarmdecoder Package<a class="headerlink" href="#alarmdecoder-package" title="Permalink to this headline">¶</a></h1>
  46. <div class="section" id="module-alarmdecoder.decoder">
  47. <span id="decoder-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">decoder</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.decoder" title="Permalink to this headline">¶</a></h2>
  48. <p>Provides the main AlarmDecoder class.</p>
  49. <dl class="class">
  50. <dt id="alarmdecoder.decoder.AlarmDecoder">
  51. <em class="property">class </em><tt class="descclassname">alarmdecoder.decoder.</tt><tt class="descname">AlarmDecoder</tt><big>(</big><em>device</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder" title="Permalink to this definition">¶</a></dt>
  52. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  53. <p>High-level wrapper around <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) devices.</p>
  54. <dl class="attribute">
  55. <dt id="alarmdecoder.decoder.AlarmDecoder.on_arm">
  56. <tt class="descname">on_arm</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_arm" title="Permalink to this definition">¶</a></dt>
  57. <dd><p>This event is called when the panel is armed.</p>
  58. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  59. </dd></dl>
  60. <dl class="attribute">
  61. <dt id="alarmdecoder.decoder.AlarmDecoder.on_disarm">
  62. <tt class="descname">on_disarm</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_disarm" title="Permalink to this definition">¶</a></dt>
  63. <dd><p>This event is called when the panel is disarmed.</p>
  64. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  65. </dd></dl>
  66. <dl class="attribute">
  67. <dt id="alarmdecoder.decoder.AlarmDecoder.on_power_changed">
  68. <tt class="descname">on_power_changed</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_power_changed" title="Permalink to this definition">¶</a></dt>
  69. <dd><p>This event is called when panel power switches between AC and DC.</p>
  70. <p><strong>Callback definition:</strong> <em>def callback(device, status)</em></p>
  71. </dd></dl>
  72. <dl class="attribute">
  73. <dt id="alarmdecoder.decoder.AlarmDecoder.on_alarm">
  74. <tt class="descname">on_alarm</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_alarm" title="Permalink to this definition">¶</a></dt>
  75. <dd><p>This event is called when the alarm is triggered.</p>
  76. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  77. </dd></dl>
  78. <dl class="attribute">
  79. <dt id="alarmdecoder.decoder.AlarmDecoder.on_alarm_restored">
  80. <tt class="descname">on_alarm_restored</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_alarm_restored" title="Permalink to this definition">¶</a></dt>
  81. <dd><p>This event is called when the alarm stops sounding.</p>
  82. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  83. </dd></dl>
  84. <dl class="attribute">
  85. <dt id="alarmdecoder.decoder.AlarmDecoder.on_fire">
  86. <tt class="descname">on_fire</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_fire" title="Permalink to this definition">¶</a></dt>
  87. <dd><p>This event is called when a fire is detected.</p>
  88. <p><strong>Callback definition:</strong> <em>def callback(device, status)</em></p>
  89. </dd></dl>
  90. <dl class="attribute">
  91. <dt id="alarmdecoder.decoder.AlarmDecoder.on_bypass">
  92. <tt class="descname">on_bypass</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_bypass" title="Permalink to this definition">¶</a></dt>
  93. <dd><p>This event is called when a zone is bypassed.</p>
  94. <p><strong>Callback definition:</strong> <em>def callback(device, status)</em></p>
  95. </dd></dl>
  96. <dl class="attribute">
  97. <dt id="alarmdecoder.decoder.AlarmDecoder.on_boot">
  98. <tt class="descname">on_boot</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_boot" title="Permalink to this definition">¶</a></dt>
  99. <dd><p>This event is called when the device finishes booting.</p>
  100. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  101. </dd></dl>
  102. <dl class="attribute">
  103. <dt id="alarmdecoder.decoder.AlarmDecoder.on_config_received">
  104. <tt class="descname">on_config_received</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_config_received" title="Permalink to this definition">¶</a></dt>
  105. <dd><p>This event is called when the device receives its configuration.</p>
  106. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  107. </dd></dl>
  108. <dl class="attribute">
  109. <dt id="alarmdecoder.decoder.AlarmDecoder.on_zone_fault">
  110. <tt class="descname">on_zone_fault</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_zone_fault" title="Permalink to this definition">¶</a></dt>
  111. <dd><p>This event is called when <a class="reference internal" href="#alarmdecoder.zonetracking.Zonetracker" title="alarmdecoder.zonetracking.Zonetracker"><tt class="xref py py-class docutils literal"><span class="pre">Zonetracker</span></tt></a> detects a zone fault.</p>
  112. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  113. </dd></dl>
  114. <dl class="attribute">
  115. <dt id="alarmdecoder.decoder.AlarmDecoder.on_zone_restore">
  116. <tt class="descname">on_zone_restore</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_zone_restore" title="Permalink to this definition">¶</a></dt>
  117. <dd><p>This event is called when <a class="reference internal" href="#alarmdecoder.zonetracking.Zonetracker" title="alarmdecoder.zonetracking.Zonetracker"><tt class="xref py py-class docutils literal"><span class="pre">Zonetracker</span></tt></a> detects that a fault is restored.</p>
  118. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  119. </dd></dl>
  120. <dl class="attribute">
  121. <dt id="alarmdecoder.decoder.AlarmDecoder.on_low_battery">
  122. <tt class="descname">on_low_battery</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_low_battery" title="Permalink to this definition">¶</a></dt>
  123. <dd><p>This event is called when the device detects a low battery.</p>
  124. <p><strong>Callback definition:</strong> <em>def callback(device, status)</em></p>
  125. </dd></dl>
  126. <dl class="attribute">
  127. <dt id="alarmdecoder.decoder.AlarmDecoder.on_panic">
  128. <tt class="descname">on_panic</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_panic" title="Permalink to this definition">¶</a></dt>
  129. <dd><p>This event is called when the device detects a panic.</p>
  130. <p><strong>Callback definition:</strong> <em>def callback(device, status)</em></p>
  131. </dd></dl>
  132. <dl class="attribute">
  133. <dt id="alarmdecoder.decoder.AlarmDecoder.on_relay_changed">
  134. <tt class="descname">on_relay_changed</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_relay_changed" title="Permalink to this definition">¶</a></dt>
  135. <dd><p>This event is called when a relay is opened or closed on an expander board.</p>
  136. <p><strong>Callback definition:</strong> <em>def callback(device, message)</em></p>
  137. </dd></dl>
  138. <dl class="attribute">
  139. <dt id="alarmdecoder.decoder.AlarmDecoder.on_message">
  140. <tt class="descname">on_message</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_message" title="Permalink to this definition">¶</a></dt>
  141. <dd><p>This event is called when standard panel <a class="reference internal" href="#alarmdecoder.messages.Message" title="alarmdecoder.messages.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a> is received.</p>
  142. <p><strong>Callback definition:</strong> <em>def callback(device, message)</em></p>
  143. </dd></dl>
  144. <dl class="attribute">
  145. <dt id="alarmdecoder.decoder.AlarmDecoder.on_expander_message">
  146. <tt class="descname">on_expander_message</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_expander_message" title="Permalink to this definition">¶</a></dt>
  147. <dd><p>This event is called when an <a class="reference internal" href="#alarmdecoder.messages.ExpanderMessage" title="alarmdecoder.messages.ExpanderMessage"><tt class="xref py py-class docutils literal"><span class="pre">ExpanderMessage</span></tt></a> is received.</p>
  148. <p><strong>Callback definition:</strong> <em>def callback(device, message)</em></p>
  149. </dd></dl>
  150. <dl class="attribute">
  151. <dt id="alarmdecoder.decoder.AlarmDecoder.on_lrr_message">
  152. <tt class="descname">on_lrr_message</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_lrr_message" title="Permalink to this definition">¶</a></dt>
  153. <dd><p>This event is called when an <a class="reference internal" href="#alarmdecoder.messages.LRRMessage" title="alarmdecoder.messages.LRRMessage"><tt class="xref py py-class docutils literal"><span class="pre">LRRMessage</span></tt></a> is received.</p>
  154. <p><strong>Callback definition:</strong> <em>def callback(device, message)</em></p>
  155. </dd></dl>
  156. <dl class="attribute">
  157. <dt id="alarmdecoder.decoder.AlarmDecoder.on_rfx_message">
  158. <tt class="descname">on_rfx_message</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_rfx_message" title="Permalink to this definition">¶</a></dt>
  159. <dd><p>This event is called when an <a class="reference internal" href="#alarmdecoder.messages.RFMessage" title="alarmdecoder.messages.RFMessage"><tt class="xref py py-class docutils literal"><span class="pre">RFMessage</span></tt></a> is received.</p>
  160. <p><strong>Callback definition:</strong> <em>def callback(device, message)</em></p>
  161. </dd></dl>
  162. <dl class="attribute">
  163. <dt id="alarmdecoder.decoder.AlarmDecoder.on_sending_received">
  164. <tt class="descname">on_sending_received</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_sending_received" title="Permalink to this definition">¶</a></dt>
  165. <dd><p>This event is called when a !Sending.done message is received from the AlarmDecoder.</p>
  166. <p><strong>Callback definition:</strong> <em>def callback(device, status, message)</em></p>
  167. </dd></dl>
  168. <dl class="attribute">
  169. <dt id="alarmdecoder.decoder.AlarmDecoder.on_open">
  170. <tt class="descname">on_open</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_open" title="Permalink to this definition">¶</a></dt>
  171. <dd><p>This event is called when the device has been opened.</p>
  172. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  173. </dd></dl>
  174. <dl class="attribute">
  175. <dt id="alarmdecoder.decoder.AlarmDecoder.on_close">
  176. <tt class="descname">on_close</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_close" title="Permalink to this definition">¶</a></dt>
  177. <dd><p>This event is called when the device has been closed.</p>
  178. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  179. </dd></dl>
  180. <dl class="attribute">
  181. <dt id="alarmdecoder.decoder.AlarmDecoder.on_read">
  182. <tt class="descname">on_read</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_read" title="Permalink to this definition">¶</a></dt>
  183. <dd><p>This event is called when a line has been read from the device.</p>
  184. <p><strong>Callback definition:</strong> <em>def callback(device, data)</em></p>
  185. </dd></dl>
  186. <dl class="attribute">
  187. <dt id="alarmdecoder.decoder.AlarmDecoder.on_write">
  188. <tt class="descname">on_write</tt><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.on_write" title="Permalink to this definition">¶</a></dt>
  189. <dd><p>This event is called when data has been written to the device.</p>
  190. <p><strong>Callback definition:</strong> <em>def callback(device, data)</em></p>
  191. </dd></dl>
  192. <dl class="attribute">
  193. <dt id="alarmdecoder.decoder.AlarmDecoder.KEY_F1">
  194. <tt class="descname">KEY_F1</tt><em class="property"> = u'\x01\x01\x01'</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.KEY_F1" title="Permalink to this definition">¶</a></dt>
  195. <dd><p>Represents panel function key #1</p>
  196. </dd></dl>
  197. <dl class="attribute">
  198. <dt id="alarmdecoder.decoder.AlarmDecoder.KEY_F2">
  199. <tt class="descname">KEY_F2</tt><em class="property"> = u'\x02\x02\x02'</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.KEY_F2" title="Permalink to this definition">¶</a></dt>
  200. <dd><p>Represents panel function key #2</p>
  201. </dd></dl>
  202. <dl class="attribute">
  203. <dt id="alarmdecoder.decoder.AlarmDecoder.KEY_F3">
  204. <tt class="descname">KEY_F3</tt><em class="property"> = u'\x03\x03\x03'</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.KEY_F3" title="Permalink to this definition">¶</a></dt>
  205. <dd><p>Represents panel function key #3</p>
  206. </dd></dl>
  207. <dl class="attribute">
  208. <dt id="alarmdecoder.decoder.AlarmDecoder.KEY_F4">
  209. <tt class="descname">KEY_F4</tt><em class="property"> = u'\x04\x04\x04'</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.KEY_F4" title="Permalink to this definition">¶</a></dt>
  210. <dd><p>Represents panel function key #4</p>
  211. </dd></dl>
  212. <dl class="attribute">
  213. <dt id="alarmdecoder.decoder.AlarmDecoder.KEY_PANIC">
  214. <tt class="descname">KEY_PANIC</tt><em class="property"> = u'\x05\x05\x05'</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.KEY_PANIC" title="Permalink to this definition">¶</a></dt>
  215. <dd><p>Represents a panic keypress</p>
  216. </dd></dl>
  217. <dl class="attribute">
  218. <dt id="alarmdecoder.decoder.AlarmDecoder.BATTERY_TIMEOUT">
  219. <tt class="descname">BATTERY_TIMEOUT</tt><em class="property"> = 30</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.BATTERY_TIMEOUT" title="Permalink to this definition">¶</a></dt>
  220. <dd><p>Default timeout (in seconds) before the battery status reverts.</p>
  221. </dd></dl>
  222. <dl class="attribute">
  223. <dt id="alarmdecoder.decoder.AlarmDecoder.FIRE_TIMEOUT">
  224. <tt class="descname">FIRE_TIMEOUT</tt><em class="property"> = 30</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.FIRE_TIMEOUT" title="Permalink to this definition">¶</a></dt>
  225. <dd><p>Default tTimeout (in seconds) before the fire status reverts.</p>
  226. </dd></dl>
  227. <dl class="attribute">
  228. <dt id="alarmdecoder.decoder.AlarmDecoder.address">
  229. <tt class="descname">address</tt><em class="property"> = 18</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.address" title="Permalink to this definition">¶</a></dt>
  230. <dd><p>The keypad address in use by the device.</p>
  231. </dd></dl>
  232. <dl class="attribute">
  233. <dt id="alarmdecoder.decoder.AlarmDecoder.configbits">
  234. <tt class="descname">configbits</tt><em class="property"> = 65280</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.configbits" title="Permalink to this definition">¶</a></dt>
  235. <dd><p>The configuration bits set on the device.</p>
  236. </dd></dl>
  237. <dl class="attribute">
  238. <dt id="alarmdecoder.decoder.AlarmDecoder.address_mask">
  239. <tt class="descname">address_mask</tt><em class="property"> = 4294967295</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.address_mask" title="Permalink to this definition">¶</a></dt>
  240. <dd><p>The address mask configured on the device.</p>
  241. </dd></dl>
  242. <dl class="attribute">
  243. <dt id="alarmdecoder.decoder.AlarmDecoder.emulate_zone">
  244. <tt class="descname">emulate_zone</tt><em class="property"> = [False, False, False, False, False]</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.emulate_zone" title="Permalink to this definition">¶</a></dt>
  245. <dd><p>List containing the devices zone emulation status.</p>
  246. </dd></dl>
  247. <dl class="attribute">
  248. <dt id="alarmdecoder.decoder.AlarmDecoder.emulate_relay">
  249. <tt class="descname">emulate_relay</tt><em class="property"> = [False, False, False, False]</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.emulate_relay" title="Permalink to this definition">¶</a></dt>
  250. <dd><p>List containing the devices relay emulation status.</p>
  251. </dd></dl>
  252. <dl class="attribute">
  253. <dt id="alarmdecoder.decoder.AlarmDecoder.emulate_lrr">
  254. <tt class="descname">emulate_lrr</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.emulate_lrr" title="Permalink to this definition">¶</a></dt>
  255. <dd><p>The status of the devices LRR emulation.</p>
  256. </dd></dl>
  257. <dl class="attribute">
  258. <dt id="alarmdecoder.decoder.AlarmDecoder.deduplicate">
  259. <tt class="descname">deduplicate</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.deduplicate" title="Permalink to this definition">¶</a></dt>
  260. <dd><p>The status of message deduplication as configured on the device.</p>
  261. </dd></dl>
  262. <dl class="attribute">
  263. <dt id="alarmdecoder.decoder.AlarmDecoder.mode">
  264. <tt class="descname">mode</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.mode" title="Permalink to this definition">¶</a></dt>
  265. <dd><p>The panel mode that the AlarmDecoder is in. Currently supports ADEMCO and DSC.</p>
  266. </dd></dl>
  267. <dl class="attribute">
  268. <dt id="alarmdecoder.decoder.AlarmDecoder.id">
  269. <tt class="descname">id</tt><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.id" title="Permalink to this definition">¶</a></dt>
  270. <dd><p>The ID of the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> device.</p>
  271. <table class="docutils field-list" frame="void" rules="none">
  272. <col class="field-name" />
  273. <col class="field-body" />
  274. <tbody valign="top">
  275. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">identification string for the device</td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. </dd></dl>
  280. <dl class="attribute">
  281. <dt id="alarmdecoder.decoder.AlarmDecoder.battery_timeout">
  282. <tt class="descname">battery_timeout</tt><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.battery_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.battery_timeout" title="Permalink to this definition">¶</a></dt>
  283. <dd><p>Retrieves the timeout for restoring the battery status, in seconds.</p>
  284. <table class="docutils field-list" frame="void" rules="none">
  285. <col class="field-name" />
  286. <col class="field-body" />
  287. <tbody valign="top">
  288. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">battery status timeout</td>
  289. </tr>
  290. </tbody>
  291. </table>
  292. </dd></dl>
  293. <dl class="attribute">
  294. <dt id="alarmdecoder.decoder.AlarmDecoder.fire_timeout">
  295. <tt class="descname">fire_timeout</tt><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.fire_timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.fire_timeout" title="Permalink to this definition">¶</a></dt>
  296. <dd><p>Retrieves the timeout for restoring the fire status, in seconds.</p>
  297. <table class="docutils field-list" frame="void" rules="none">
  298. <col class="field-name" />
  299. <col class="field-body" />
  300. <tbody valign="top">
  301. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">fire status timeout</td>
  302. </tr>
  303. </tbody>
  304. </table>
  305. </dd></dl>
  306. <dl class="method">
  307. <dt id="alarmdecoder.decoder.AlarmDecoder.open">
  308. <tt class="descname">open</tt><big>(</big><em>baudrate=None</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.open" title="Permalink to this definition">¶</a></dt>
  309. <dd><p>Opens the device.</p>
  310. <table class="docutils field-list" frame="void" rules="none">
  311. <col class="field-name" />
  312. <col class="field-body" />
  313. <tbody valign="top">
  314. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  315. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate used for the device. Defaults to the lower-level device default.</li>
  316. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; Specifies whether or not the automatic reader
  317. thread should be started.</li>
  318. </ul>
  319. </td>
  320. </tr>
  321. </tbody>
  322. </table>
  323. </dd></dl>
  324. <dl class="method">
  325. <dt id="alarmdecoder.decoder.AlarmDecoder.close">
  326. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.close" title="Permalink to this definition">¶</a></dt>
  327. <dd><p>Closes the device.</p>
  328. </dd></dl>
  329. <dl class="method">
  330. <dt id="alarmdecoder.decoder.AlarmDecoder.send">
  331. <tt class="descname">send</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.send"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.send" title="Permalink to this definition">¶</a></dt>
  332. <dd><p>Sends data to the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> device.</p>
  333. <table class="docutils field-list" frame="void" rules="none">
  334. <col class="field-name" />
  335. <col class="field-body" />
  336. <tbody valign="top">
  337. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>string</em>) &#8211; data to send</td>
  338. </tr>
  339. </tbody>
  340. </table>
  341. </dd></dl>
  342. <dl class="method">
  343. <dt id="alarmdecoder.decoder.AlarmDecoder.get_config">
  344. <tt class="descname">get_config</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.get_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.get_config" title="Permalink to this definition">¶</a></dt>
  345. <dd><p>Retrieves the configuration from the device. Called automatically by <tt class="xref py py-meth docutils literal"><span class="pre">_on_open()</span></tt>.</p>
  346. </dd></dl>
  347. <dl class="method">
  348. <dt id="alarmdecoder.decoder.AlarmDecoder.save_config">
  349. <tt class="descname">save_config</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.save_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.save_config" title="Permalink to this definition">¶</a></dt>
  350. <dd><p>Sets configuration entries on the device.</p>
  351. </dd></dl>
  352. <dl class="method">
  353. <dt id="alarmdecoder.decoder.AlarmDecoder.reboot">
  354. <tt class="descname">reboot</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.reboot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.reboot" title="Permalink to this definition">¶</a></dt>
  355. <dd><p>Reboots the device.</p>
  356. </dd></dl>
  357. <dl class="method">
  358. <dt id="alarmdecoder.decoder.AlarmDecoder.fault_zone">
  359. <tt class="descname">fault_zone</tt><big>(</big><em>zone</em>, <em>simulate_wire_problem=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.fault_zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.fault_zone" title="Permalink to this definition">¶</a></dt>
  360. <dd><p>Faults a zone if we are emulating a zone expander.</p>
  361. <table class="docutils field-list" frame="void" rules="none">
  362. <col class="field-name" />
  363. <col class="field-body" />
  364. <tbody valign="top">
  365. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  366. <li><strong>zone</strong> (<em>int</em>) &#8211; zone to fault</li>
  367. <li><strong>simulate_wire_problem</strong> (<em>bool</em>) &#8211; Whether or not to simulate a wire fault</li>
  368. </ul>
  369. </td>
  370. </tr>
  371. </tbody>
  372. </table>
  373. </dd></dl>
  374. <dl class="method">
  375. <dt id="alarmdecoder.decoder.AlarmDecoder.clear_zone">
  376. <tt class="descname">clear_zone</tt><big>(</big><em>zone</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.clear_zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.clear_zone" title="Permalink to this definition">¶</a></dt>
  377. <dd><p>Clears a zone if we are emulating a zone expander.</p>
  378. <table class="docutils field-list" frame="void" rules="none">
  379. <col class="field-name" />
  380. <col class="field-body" />
  381. <tbody valign="top">
  382. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>zone</strong> (<em>int</em>) &#8211; zone to clear</td>
  383. </tr>
  384. </tbody>
  385. </table>
  386. </dd></dl>
  387. </dd></dl>
  388. </div>
  389. <div class="section" id="module-alarmdecoder.devices">
  390. <span id="devices-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">devices</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.devices" title="Permalink to this headline">¶</a></h2>
  391. <p>This module contains different types of devices belonging to the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) family.</p>
  392. <ul class="simple">
  393. <li><a class="reference internal" href="#alarmdecoder.devices.USBDevice" title="alarmdecoder.devices.USBDevice"><tt class="xref py py-class docutils literal"><span class="pre">USBDevice</span></tt></a>: Interfaces with the <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device.</li>
  394. <li><a class="reference internal" href="#alarmdecoder.devices.SerialDevice" title="alarmdecoder.devices.SerialDevice"><tt class="xref py py-class docutils literal"><span class="pre">SerialDevice</span></tt></a>: Interfaces with the <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a>, <a class="reference external" href="http://www.alarmdecoder.com">AD2SERIAL</a> or <a class="reference external" href="http://www.alarmdecoder.com">AD2PI</a>.</li>
  395. <li><a class="reference internal" href="#alarmdecoder.devices.SocketDevice" title="alarmdecoder.devices.SocketDevice"><tt class="xref py py-class docutils literal"><span class="pre">SocketDevice</span></tt></a>: Interfaces with devices exposed through <a class="reference external" href="http://github.com/nutechsoftware/ser2sock">ser2sock</a> or another IP to Serial solution.
  396. Also supports SSL if using <a class="reference external" href="http://github.com/nutechsoftware/ser2sock">ser2sock</a>.</li>
  397. </ul>
  398. <dl class="class">
  399. <dt id="alarmdecoder.devices.Device">
  400. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">Device</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device" title="Permalink to this definition">¶</a></dt>
  401. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  402. <p>Base class for all <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) device types.</p>
  403. <dl class="attribute">
  404. <dt id="alarmdecoder.devices.Device.on_open">
  405. <tt class="descname">on_open</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_open" title="Permalink to this definition">¶</a></dt>
  406. <dd><p>This event is called when the device has been opened.</p>
  407. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  408. </dd></dl>
  409. <dl class="attribute">
  410. <dt id="alarmdecoder.devices.Device.on_close">
  411. <tt class="descname">on_close</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_close" title="Permalink to this definition">¶</a></dt>
  412. <dd><p>This event is called when the device has been closed.</p>
  413. <p><strong>Callback definition:</strong> def callback(device)*</p>
  414. </dd></dl>
  415. <dl class="attribute">
  416. <dt id="alarmdecoder.devices.Device.on_read">
  417. <tt class="descname">on_read</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_read" title="Permalink to this definition">¶</a></dt>
  418. <dd><p>This event is called when a line has been read from the device.</p>
  419. <p><strong>Callback definition:</strong> def callback(device, data)*</p>
  420. </dd></dl>
  421. <dl class="attribute">
  422. <dt id="alarmdecoder.devices.Device.on_write">
  423. <tt class="descname">on_write</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_write" title="Permalink to this definition">¶</a></dt>
  424. <dd><p>This event is called when data has been written to the device.</p>
  425. <p><strong>Callback definition:</strong> def callback(device, data)*</p>
  426. </dd></dl>
  427. <dl class="attribute">
  428. <dt id="alarmdecoder.devices.Device.id">
  429. <tt class="descname">id</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.id" title="Permalink to this definition">¶</a></dt>
  430. <dd><p>Retrieve the device ID.</p>
  431. <table class="docutils field-list" frame="void" rules="none">
  432. <col class="field-name" />
  433. <col class="field-body" />
  434. <tbody valign="top">
  435. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">identification string for the device</td>
  436. </tr>
  437. </tbody>
  438. </table>
  439. </dd></dl>
  440. <dl class="method">
  441. <dt id="alarmdecoder.devices.Device.is_reader_alive">
  442. <tt class="descname">is_reader_alive</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.is_reader_alive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.is_reader_alive" title="Permalink to this definition">¶</a></dt>
  443. <dd><p>Indicates whether or not the reader thread is alive.</p>
  444. <table class="docutils field-list" frame="void" rules="none">
  445. <col class="field-name" />
  446. <col class="field-body" />
  447. <tbody valign="top">
  448. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">whether or not the reader thread is alive</td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. </dd></dl>
  453. <dl class="method">
  454. <dt id="alarmdecoder.devices.Device.stop_reader">
  455. <tt class="descname">stop_reader</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.stop_reader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.stop_reader" title="Permalink to this definition">¶</a></dt>
  456. <dd><p>Stops the reader thread.</p>
  457. </dd></dl>
  458. <dl class="method">
  459. <dt id="alarmdecoder.devices.Device.close">
  460. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.close" title="Permalink to this definition">¶</a></dt>
  461. <dd><p>Closes the device.</p>
  462. </dd></dl>
  463. <dl class="class">
  464. <dt id="alarmdecoder.devices.Device.ReadThread">
  465. <em class="property">class </em><tt class="descname">ReadThread</tt><big>(</big><em>device</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread" title="Permalink to this definition">¶</a></dt>
  466. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  467. <p>Reader thread which processes messages from the device.</p>
  468. <dl class="attribute">
  469. <dt id="alarmdecoder.devices.Device.ReadThread.READ_TIMEOUT">
  470. <tt class="descname">READ_TIMEOUT</tt><em class="property"> = 10</em><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.READ_TIMEOUT" title="Permalink to this definition">¶</a></dt>
  471. <dd><p>Timeout for the reader thread.</p>
  472. </dd></dl>
  473. <dl class="method">
  474. <dt id="alarmdecoder.devices.Device.ReadThread.stop">
  475. <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.stop" title="Permalink to this definition">¶</a></dt>
  476. <dd><p>Stops the running thread.</p>
  477. </dd></dl>
  478. <dl class="method">
  479. <dt id="alarmdecoder.devices.Device.ReadThread.run">
  480. <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#Device.ReadThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.Device.ReadThread.run" title="Permalink to this definition">¶</a></dt>
  481. <dd><p>The actual read process.</p>
  482. </dd></dl>
  483. </dd></dl>
  484. </dd></dl>
  485. <dl class="class">
  486. <dt id="alarmdecoder.devices.USBDevice">
  487. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">USBDevice</tt><big>(</big><em>interface=0</em>, <em>vid=None</em>, <em>pid=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice" title="Permalink to this definition">¶</a></dt>
  488. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  489. <p><a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device utilizing PyFTDI&#8217;s interface.</p>
  490. <dl class="attribute">
  491. <dt id="alarmdecoder.devices.USBDevice.PRODUCT_IDS">
  492. <tt class="descname">PRODUCT_IDS</tt><em class="property"> = ((1027, 24577), (1027, 24597))</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.PRODUCT_IDS" title="Permalink to this definition">¶</a></dt>
  493. <dd><p>List of Vendor and Product IDs used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  494. </dd></dl>
  495. <dl class="attribute">
  496. <dt id="alarmdecoder.devices.USBDevice.DEFAULT_VENDOR_ID">
  497. <tt class="descname">DEFAULT_VENDOR_ID</tt><em class="property"> = 1027</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DEFAULT_VENDOR_ID" title="Permalink to this definition">¶</a></dt>
  498. <dd><p>Default Vendor ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  499. </dd></dl>
  500. <dl class="attribute">
  501. <dt id="alarmdecoder.devices.USBDevice.DEFAULT_PRODUCT_ID">
  502. <tt class="descname">DEFAULT_PRODUCT_ID</tt><em class="property"> = 24577</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DEFAULT_PRODUCT_ID" title="Permalink to this definition">¶</a></dt>
  503. <dd><p>Default Product ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  504. </dd></dl>
  505. <dl class="attribute">
  506. <dt id="alarmdecoder.devices.USBDevice.FTDI_VENDOR_ID">
  507. <tt class="descname">FTDI_VENDOR_ID</tt><em class="property"> = 1027</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.FTDI_VENDOR_ID" title="Permalink to this definition">¶</a></dt>
  508. <dd><p>DEPRECATED: Vendor ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  509. </dd></dl>
  510. <dl class="attribute">
  511. <dt id="alarmdecoder.devices.USBDevice.FTDI_PRODUCT_ID">
  512. <tt class="descname">FTDI_PRODUCT_ID</tt><em class="property"> = 24577</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.FTDI_PRODUCT_ID" title="Permalink to this definition">¶</a></dt>
  513. <dd><p>DEPRECATED: Product ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  514. </dd></dl>
  515. <dl class="attribute">
  516. <dt id="alarmdecoder.devices.USBDevice.BAUDRATE">
  517. <tt class="descname">BAUDRATE</tt><em class="property"> = 115200</em><a class="headerlink" href="#alarmdecoder.devices.USBDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
  518. <dd><p>Default baudrate for <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  519. </dd></dl>
  520. <dl class="classmethod">
  521. <dt id="alarmdecoder.devices.USBDevice.find_all">
  522. <em class="property">classmethod </em><tt class="descname">find_all</tt><big>(</big><em>vid=None</em>, <em>pid=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.find_all" title="Permalink to this definition">¶</a></dt>
  523. <dd><p>Returns all FTDI devices matching our vendor and product IDs.</p>
  524. <table class="docutils field-list" frame="void" rules="none">
  525. <col class="field-name" />
  526. <col class="field-body" />
  527. <tbody valign="top">
  528. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  529. </tr>
  530. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  531. </tr>
  532. </tbody>
  533. </table>
  534. </dd></dl>
  535. <dl class="classmethod">
  536. <dt id="alarmdecoder.devices.USBDevice.devices">
  537. <em class="property">classmethod </em><tt class="descname">devices</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.devices"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.devices" title="Permalink to this definition">¶</a></dt>
  538. <dd><p>Returns a cached list of <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices located on the system.</p>
  539. <table class="docutils field-list" frame="void" rules="none">
  540. <col class="field-name" />
  541. <col class="field-body" />
  542. <tbody valign="top">
  543. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">cached list of devices found</td>
  544. </tr>
  545. </tbody>
  546. </table>
  547. </dd></dl>
  548. <dl class="classmethod">
  549. <dt id="alarmdecoder.devices.USBDevice.find">
  550. <em class="property">classmethod </em><tt class="descname">find</tt><big>(</big><em>device=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.find"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.find" title="Permalink to this definition">¶</a></dt>
  551. <dd><p>Factory method that returns the requested <a class="reference internal" href="#alarmdecoder.devices.USBDevice" title="alarmdecoder.devices.USBDevice"><tt class="xref py py-class docutils literal"><span class="pre">USBDevice</span></tt></a> device, or the
  552. first device.</p>
  553. <table class="docutils field-list" frame="void" rules="none">
  554. <col class="field-name" />
  555. <col class="field-body" />
  556. <tbody valign="top">
  557. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>device</strong> (<em>tuple</em>) &#8211; Tuple describing the USB device to open, as returned
  558. by find_all().</td>
  559. </tr>
  560. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.devices.USBDevice" title="alarmdecoder.devices.USBDevice"><tt class="xref py py-class docutils literal"><span class="pre">USBDevice</span></tt></a> object utilizing the specified device</td>
  561. </tr>
  562. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.NoDeviceError" title="alarmdecoder.util.NoDeviceError"><tt class="xref py py-class docutils literal"><span class="pre">NoDeviceError</span></tt></a></td>
  563. </tr>
  564. </tbody>
  565. </table>
  566. </dd></dl>
  567. <dl class="classmethod">
  568. <dt id="alarmdecoder.devices.USBDevice.start_detection">
  569. <em class="property">classmethod </em><tt class="descname">start_detection</tt><big>(</big><em>on_attached=None</em>, <em>on_detached=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.start_detection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.start_detection" title="Permalink to this definition">¶</a></dt>
  570. <dd><p>Starts the device detection thread.</p>
  571. <table class="docutils field-list" frame="void" rules="none">
  572. <col class="field-name" />
  573. <col class="field-body" />
  574. <tbody valign="top">
  575. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  576. <li><strong>on_attached</strong> (<em>function</em>) &#8211; function to be called when a device is attached <strong>Callback definition:</strong> <em>def callback(thread, device)</em></li>
  577. <li><strong>on_detached</strong> (<em>function</em>) &#8211; function to be called when a device is detached <strong>Callback definition:</strong> <em>def callback(thread, device)</em></li>
  578. </ul>
  579. </td>
  580. </tr>
  581. </tbody>
  582. </table>
  583. </dd></dl>
  584. <dl class="classmethod">
  585. <dt id="alarmdecoder.devices.USBDevice.stop_detection">
  586. <em class="property">classmethod </em><tt class="descname">stop_detection</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.stop_detection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.stop_detection" title="Permalink to this definition">¶</a></dt>
  587. <dd><p>Stops the device detection thread.</p>
  588. </dd></dl>
  589. <dl class="attribute">
  590. <dt id="alarmdecoder.devices.USBDevice.serial_number">
  591. <tt class="descname">serial_number</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.serial_number"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.serial_number" title="Permalink to this definition">¶</a></dt>
  592. <dd><p>Retrieves the serial number of the device.</p>
  593. <table class="docutils field-list" frame="void" rules="none">
  594. <col class="field-name" />
  595. <col class="field-body" />
  596. <tbody valign="top">
  597. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">serial number of the device</td>
  598. </tr>
  599. </tbody>
  600. </table>
  601. </dd></dl>
  602. <dl class="attribute">
  603. <dt id="alarmdecoder.devices.USBDevice.description">
  604. <tt class="descname">description</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.description" title="Permalink to this definition">¶</a></dt>
  605. <dd><p>Retrieves the description of the device.</p>
  606. <table class="docutils field-list" frame="void" rules="none">
  607. <col class="field-name" />
  608. <col class="field-body" />
  609. <tbody valign="top">
  610. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">description of the device</td>
  611. </tr>
  612. </tbody>
  613. </table>
  614. </dd></dl>
  615. <dl class="attribute">
  616. <dt id="alarmdecoder.devices.USBDevice.interface">
  617. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.interface" title="Permalink to this definition">¶</a></dt>
  618. <dd><p>Retrieves the interface used to connect to the device.</p>
  619. <table class="docutils field-list" frame="void" rules="none">
  620. <col class="field-name" />
  621. <col class="field-body" />
  622. <tbody valign="top">
  623. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the interface used to connect to the device</td>
  624. </tr>
  625. </tbody>
  626. </table>
  627. </dd></dl>
  628. <dl class="method">
  629. <dt id="alarmdecoder.devices.USBDevice.open">
  630. <tt class="descname">open</tt><big>(</big><em>baudrate=115200</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.open" title="Permalink to this definition">¶</a></dt>
  631. <dd><p>Opens the device.</p>
  632. <table class="docutils field-list" frame="void" rules="none">
  633. <col class="field-name" />
  634. <col class="field-body" />
  635. <tbody valign="top">
  636. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  637. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use</li>
  638. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically start the
  639. reader thread.</li>
  640. </ul>
  641. </td>
  642. </tr>
  643. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.NoDeviceError" title="alarmdecoder.util.NoDeviceError"><tt class="xref py py-class docutils literal"><span class="pre">NoDeviceError</span></tt></a></p>
  644. </td>
  645. </tr>
  646. </tbody>
  647. </table>
  648. </dd></dl>
  649. <dl class="method">
  650. <dt id="alarmdecoder.devices.USBDevice.close">
  651. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.close" title="Permalink to this definition">¶</a></dt>
  652. <dd><p>Closes the device.</p>
  653. </dd></dl>
  654. <dl class="method">
  655. <dt id="alarmdecoder.devices.USBDevice.fileno">
  656. <tt class="descname">fileno</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.fileno"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.fileno" title="Permalink to this definition">¶</a></dt>
  657. <dd></dd></dl>
  658. <dl class="method">
  659. <dt id="alarmdecoder.devices.USBDevice.write">
  660. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.write" title="Permalink to this definition">¶</a></dt>
  661. <dd><p>Writes data to the device.</p>
  662. <table class="docutils field-list" frame="void" rules="none">
  663. <col class="field-name" />
  664. <col class="field-body" />
  665. <tbody valign="top">
  666. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>string</em>) &#8211; data to write</td>
  667. </tr>
  668. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  669. </tr>
  670. </tbody>
  671. </table>
  672. </dd></dl>
  673. <dl class="method">
  674. <dt id="alarmdecoder.devices.USBDevice.read">
  675. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.read" title="Permalink to this definition">¶</a></dt>
  676. <dd><p>Reads a single character from the device.</p>
  677. <table class="docutils field-list" frame="void" rules="none">
  678. <col class="field-name" />
  679. <col class="field-body" />
  680. <tbody valign="top">
  681. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  682. </tr>
  683. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  684. </tr>
  685. </tbody>
  686. </table>
  687. </dd></dl>
  688. <dl class="method">
  689. <dt id="alarmdecoder.devices.USBDevice.read_line">
  690. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.read_line" title="Permalink to this definition">¶</a></dt>
  691. <dd><p>Reads a line from the device.</p>
  692. <table class="docutils field-list" frame="void" rules="none">
  693. <col class="field-name" />
  694. <col class="field-body" />
  695. <tbody valign="top">
  696. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  697. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  698. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  699. reading.</li>
  700. </ul>
  701. </td>
  702. </tr>
  703. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  704. </td>
  705. </tr>
  706. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a>, <a class="reference internal" href="#alarmdecoder.util.TimeoutError" title="alarmdecoder.util.TimeoutError"><tt class="xref py py-class docutils literal"><span class="pre">TimeoutError</span></tt></a></p>
  707. </td>
  708. </tr>
  709. </tbody>
  710. </table>
  711. </dd></dl>
  712. <dl class="class">
  713. <dt id="alarmdecoder.devices.USBDevice.DetectThread">
  714. <em class="property">class </em><tt class="descname">DetectThread</tt><big>(</big><em>on_attached=None</em>, <em>on_detached=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread" title="Permalink to this definition">¶</a></dt>
  715. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  716. <p>Thread that handles detection of added/removed devices.</p>
  717. <dl class="attribute">
  718. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_attached">
  719. <tt class="descname">on_attached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_attached" title="Permalink to this definition">¶</a></dt>
  720. <dd><p>This event is called when an <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device has been detected.</p>
  721. <p><strong>Callback definition:</strong> def callback(thread, device*</p>
  722. </dd></dl>
  723. <dl class="attribute">
  724. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_detached">
  725. <tt class="descname">on_detached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_detached" title="Permalink to this definition">¶</a></dt>
  726. <dd><p>This event is called when an <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device has been removed.</p>
  727. <p><strong>Callback definition:</strong> def callback(thread, device*</p>
  728. </dd></dl>
  729. <dl class="method">
  730. <dt id="alarmdecoder.devices.USBDevice.DetectThread.stop">
  731. <tt class="descname">stop</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread.stop"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.stop" title="Permalink to this definition">¶</a></dt>
  732. <dd><p>Stops the thread.</p>
  733. </dd></dl>
  734. <dl class="method">
  735. <dt id="alarmdecoder.devices.USBDevice.DetectThread.run">
  736. <tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#USBDevice.DetectThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.run" title="Permalink to this definition">¶</a></dt>
  737. <dd><p>The actual detection process.</p>
  738. </dd></dl>
  739. </dd></dl>
  740. </dd></dl>
  741. <dl class="class">
  742. <dt id="alarmdecoder.devices.SerialDevice">
  743. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">SerialDevice</tt><big>(</big><em>interface=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice" title="Permalink to this definition">¶</a></dt>
  744. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  745. <p><a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a>, <a class="reference external" href="http://www.alarmdecoder.com">AD2SERIAL</a> or <a class="reference external" href="http://www.alarmdecoder.com">AD2PI</a> device utilizing the PySerial interface.</p>
  746. <dl class="attribute">
  747. <dt id="alarmdecoder.devices.SerialDevice.BAUDRATE">
  748. <tt class="descname">BAUDRATE</tt><em class="property"> = 19200</em><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.BAUDRATE" title="Permalink to this definition">¶</a></dt>
  749. <dd><p>Default baudrate for Serial devices.</p>
  750. </dd></dl>
  751. <dl class="staticmethod">
  752. <dt id="alarmdecoder.devices.SerialDevice.find_all">
  753. <em class="property">static </em><tt class="descname">find_all</tt><big>(</big><em>pattern=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.find_all"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.find_all" title="Permalink to this definition">¶</a></dt>
  754. <dd><p>Returns all serial ports present.</p>
  755. <table class="docutils field-list" frame="void" rules="none">
  756. <col class="field-name" />
  757. <col class="field-body" />
  758. <tbody valign="top">
  759. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>pattern</strong> (<em>string</em>) &#8211; pattern to search for when retrieving serial ports</td>
  760. </tr>
  761. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  762. </tr>
  763. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  764. </tr>
  765. </tbody>
  766. </table>
  767. </dd></dl>
  768. <dl class="attribute">
  769. <dt id="alarmdecoder.devices.SerialDevice.interface">
  770. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.interface" title="Permalink to this definition">¶</a></dt>
  771. <dd><p>Retrieves the interface used to connect to the device.</p>
  772. <table class="docutils field-list" frame="void" rules="none">
  773. <col class="field-name" />
  774. <col class="field-body" />
  775. <tbody valign="top">
  776. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">interface used to connect to the device</td>
  777. </tr>
  778. </tbody>
  779. </table>
  780. </dd></dl>
  781. <dl class="method">
  782. <dt id="alarmdecoder.devices.SerialDevice.open">
  783. <tt class="descname">open</tt><big>(</big><em>baudrate=19200</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.open" title="Permalink to this definition">¶</a></dt>
  784. <dd><p>Opens the device.</p>
  785. <table class="docutils field-list" frame="void" rules="none">
  786. <col class="field-name" />
  787. <col class="field-body" />
  788. <tbody valign="top">
  789. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  790. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use with the device</li>
  791. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically start the
  792. reader thread.</li>
  793. </ul>
  794. </td>
  795. </tr>
  796. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.NoDeviceError" title="alarmdecoder.util.NoDeviceError"><tt class="xref py py-class docutils literal"><span class="pre">NoDeviceError</span></tt></a></p>
  797. </td>
  798. </tr>
  799. </tbody>
  800. </table>
  801. </dd></dl>
  802. <dl class="method">
  803. <dt id="alarmdecoder.devices.SerialDevice.close">
  804. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.close" title="Permalink to this definition">¶</a></dt>
  805. <dd><p>Closes the device.</p>
  806. </dd></dl>
  807. <dl class="method">
  808. <dt id="alarmdecoder.devices.SerialDevice.fileno">
  809. <tt class="descname">fileno</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.fileno"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.fileno" title="Permalink to this definition">¶</a></dt>
  810. <dd></dd></dl>
  811. <dl class="method">
  812. <dt id="alarmdecoder.devices.SerialDevice.write">
  813. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.write" title="Permalink to this definition">¶</a></dt>
  814. <dd><p>Writes data to the device.</p>
  815. <table class="docutils field-list" frame="void" rules="none">
  816. <col class="field-name" />
  817. <col class="field-body" />
  818. <tbody valign="top">
  819. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>string</em>) &#8211; data to write</td>
  820. </tr>
  821. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body">py:class:<cite>~alarmdecoder.util.CommError</cite></td>
  822. </tr>
  823. </tbody>
  824. </table>
  825. </dd></dl>
  826. <dl class="method">
  827. <dt id="alarmdecoder.devices.SerialDevice.read">
  828. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.read" title="Permalink to this definition">¶</a></dt>
  829. <dd><p>Reads a single character from the device.</p>
  830. <table class="docutils field-list" frame="void" rules="none">
  831. <col class="field-name" />
  832. <col class="field-body" />
  833. <tbody valign="top">
  834. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  835. </tr>
  836. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  837. </tr>
  838. </tbody>
  839. </table>
  840. </dd></dl>
  841. <dl class="method">
  842. <dt id="alarmdecoder.devices.SerialDevice.read_line">
  843. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SerialDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SerialDevice.read_line" title="Permalink to this definition">¶</a></dt>
  844. <dd><p>Reads a line from the device.</p>
  845. <table class="docutils field-list" frame="void" rules="none">
  846. <col class="field-name" />
  847. <col class="field-body" />
  848. <tbody valign="top">
  849. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  850. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  851. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  852. reading.</li>
  853. </ul>
  854. </td>
  855. </tr>
  856. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  857. </td>
  858. </tr>
  859. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a>, <a class="reference internal" href="#alarmdecoder.util.TimeoutError" title="alarmdecoder.util.TimeoutError"><tt class="xref py py-class docutils literal"><span class="pre">TimeoutError</span></tt></a></p>
  860. </td>
  861. </tr>
  862. </tbody>
  863. </table>
  864. </dd></dl>
  865. </dd></dl>
  866. <dl class="class">
  867. <dt id="alarmdecoder.devices.SocketDevice">
  868. <em class="property">class </em><tt class="descclassname">alarmdecoder.devices.</tt><tt class="descname">SocketDevice</tt><big>(</big><em>interface=('localhost'</em>, <em>10000)</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice" title="Permalink to this definition">¶</a></dt>
  869. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.devices.Device" title="alarmdecoder.devices.Device"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.devices.Device</span></tt></a></p>
  870. <p>Device that supports communication with an <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) that is
  871. exposed via <a class="reference external" href="http://github.com/nutechsoftware/ser2sock">ser2sock</a> or another Serial to IP interface.</p>
  872. <dl class="attribute">
  873. <dt id="alarmdecoder.devices.SocketDevice.interface">
  874. <tt class="descname">interface</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.interface"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.interface" title="Permalink to this definition">¶</a></dt>
  875. <dd><p>Retrieves the interface used to connect to the device.</p>
  876. <table class="docutils field-list" frame="void" rules="none">
  877. <col class="field-name" />
  878. <col class="field-body" />
  879. <tbody valign="top">
  880. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">interface used to connect to the device</td>
  881. </tr>
  882. </tbody>
  883. </table>
  884. </dd></dl>
  885. <dl class="attribute">
  886. <dt id="alarmdecoder.devices.SocketDevice.ssl">
  887. <tt class="descname">ssl</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl" title="Permalink to this definition">¶</a></dt>
  888. <dd><p>Retrieves whether or not the device is using SSL.</p>
  889. <table class="docutils field-list" frame="void" rules="none">
  890. <col class="field-name" />
  891. <col class="field-body" />
  892. <tbody valign="top">
  893. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">whether or not the device is using SSL</td>
  894. </tr>
  895. </tbody>
  896. </table>
  897. </dd></dl>
  898. <dl class="attribute">
  899. <dt id="alarmdecoder.devices.SocketDevice.ssl_certificate">
  900. <tt class="descname">ssl_certificate</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_certificate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_certificate" title="Permalink to this definition">¶</a></dt>
  901. <dd><p>Retrieves the SSL client certificate path used for authentication.</p>
  902. <table class="docutils field-list" frame="void" rules="none">
  903. <col class="field-name" />
  904. <col class="field-body" />
  905. <tbody valign="top">
  906. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">path to the certificate path or <tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.crypto.X509</span></tt></td>
  907. </tr>
  908. </tbody>
  909. </table>
  910. </dd></dl>
  911. <dl class="attribute">
  912. <dt id="alarmdecoder.devices.SocketDevice.ssl_key">
  913. <tt class="descname">ssl_key</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_key" title="Permalink to this definition">¶</a></dt>
  914. <dd><p>Retrieves the SSL client certificate key used for authentication.</p>
  915. <table class="docutils field-list" frame="void" rules="none">
  916. <col class="field-name" />
  917. <col class="field-body" />
  918. <tbody valign="top">
  919. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">jpath to the SSL key or <tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.crypto.PKey</span></tt></td>
  920. </tr>
  921. </tbody>
  922. </table>
  923. </dd></dl>
  924. <dl class="attribute">
  925. <dt id="alarmdecoder.devices.SocketDevice.ssl_ca">
  926. <tt class="descname">ssl_ca</tt><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.ssl_ca"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.ssl_ca" title="Permalink to this definition">¶</a></dt>
  927. <dd><p>Retrieves the SSL Certificate Authority certificate used for
  928. authentication.</p>
  929. <table class="docutils field-list" frame="void" rules="none">
  930. <col class="field-name" />
  931. <col class="field-body" />
  932. <tbody valign="top">
  933. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">path to the CA certificate or <tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.crypto.X509</span></tt></td>
  934. </tr>
  935. </tbody>
  936. </table>
  937. </dd></dl>
  938. <dl class="method">
  939. <dt id="alarmdecoder.devices.SocketDevice.open">
  940. <tt class="descname">open</tt><big>(</big><em>baudrate=None</em>, <em>no_reader_thread=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.open"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.open" title="Permalink to this definition">¶</a></dt>
  941. <dd><p>Opens the device.</p>
  942. <table class="docutils field-list" frame="void" rules="none">
  943. <col class="field-name" />
  944. <col class="field-body" />
  945. <tbody valign="top">
  946. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  947. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use</li>
  948. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically open the reader
  949. thread.</li>
  950. </ul>
  951. </td>
  952. </tr>
  953. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.NoDeviceError" title="alarmdecoder.util.NoDeviceError"><tt class="xref py py-class docutils literal"><span class="pre">NoDeviceError</span></tt></a>, <a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></p>
  954. </td>
  955. </tr>
  956. </tbody>
  957. </table>
  958. </dd></dl>
  959. <dl class="method">
  960. <dt id="alarmdecoder.devices.SocketDevice.close">
  961. <tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.close" title="Permalink to this definition">¶</a></dt>
  962. <dd><p>Closes the device.</p>
  963. </dd></dl>
  964. <dl class="method">
  965. <dt id="alarmdecoder.devices.SocketDevice.fileno">
  966. <tt class="descname">fileno</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.fileno"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.fileno" title="Permalink to this definition">¶</a></dt>
  967. <dd></dd></dl>
  968. <dl class="method">
  969. <dt id="alarmdecoder.devices.SocketDevice.write">
  970. <tt class="descname">write</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.write" title="Permalink to this definition">¶</a></dt>
  971. <dd><p>Writes data to the device.</p>
  972. <table class="docutils field-list" frame="void" rules="none">
  973. <col class="field-name" />
  974. <col class="field-body" />
  975. <tbody valign="top">
  976. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>string</em>) &#8211; data to write</td>
  977. </tr>
  978. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">number of bytes sent</td>
  979. </tr>
  980. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  981. </tr>
  982. </tbody>
  983. </table>
  984. </dd></dl>
  985. <dl class="method">
  986. <dt id="alarmdecoder.devices.SocketDevice.read">
  987. <tt class="descname">read</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.read" title="Permalink to this definition">¶</a></dt>
  988. <dd><p>Reads a single character from the device.</p>
  989. <table class="docutils field-list" frame="void" rules="none">
  990. <col class="field-name" />
  991. <col class="field-body" />
  992. <tbody valign="top">
  993. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  994. </tr>
  995. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a></td>
  996. </tr>
  997. </tbody>
  998. </table>
  999. </dd></dl>
  1000. <dl class="method">
  1001. <dt id="alarmdecoder.devices.SocketDevice.read_line">
  1002. <tt class="descname">read_line</tt><big>(</big><em>timeout=0.0</em>, <em>purge_buffer=False</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/devices.html#SocketDevice.read_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.devices.SocketDevice.read_line" title="Permalink to this definition">¶</a></dt>
  1003. <dd><p>Reads a line from the device.</p>
  1004. <table class="docutils field-list" frame="void" rules="none">
  1005. <col class="field-name" />
  1006. <col class="field-body" />
  1007. <tbody valign="top">
  1008. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1009. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  1010. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  1011. reading.</li>
  1012. </ul>
  1013. </td>
  1014. </tr>
  1015. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  1016. </td>
  1017. </tr>
  1018. <tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.CommError" title="alarmdecoder.util.CommError"><tt class="xref py py-class docutils literal"><span class="pre">CommError</span></tt></a>, <a class="reference internal" href="#alarmdecoder.util.TimeoutError" title="alarmdecoder.util.TimeoutError"><tt class="xref py py-class docutils literal"><span class="pre">TimeoutError</span></tt></a></p>
  1019. </td>
  1020. </tr>
  1021. </tbody>
  1022. </table>
  1023. </dd></dl>
  1024. </dd></dl>
  1025. </div>
  1026. <div class="section" id="module-alarmdecoder.messages">
  1027. <span id="messages-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">messages</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.messages" title="Permalink to this headline">¶</a></h2>
  1028. <p>Message representations received from the panel through the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2)
  1029. devices.</p>
  1030. <ul class="simple">
  1031. <li><a class="reference internal" href="#alarmdecoder.messages.Message" title="alarmdecoder.messages.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>: The standard and most common message received from a panel.</li>
  1032. <li><a class="reference internal" href="#alarmdecoder.messages.ExpanderMessage" title="alarmdecoder.messages.ExpanderMessage"><tt class="xref py py-class docutils literal"><span class="pre">ExpanderMessage</span></tt></a>: Messages received from Relay or Zone expander modules.</li>
  1033. <li><a class="reference internal" href="#alarmdecoder.messages.RFMessage" title="alarmdecoder.messages.RFMessage"><tt class="xref py py-class docutils literal"><span class="pre">RFMessage</span></tt></a>: Message received from an RF receiver module.</li>
  1034. <li><a class="reference internal" href="#alarmdecoder.messages.LRRMessage" title="alarmdecoder.messages.LRRMessage"><tt class="xref py py-class docutils literal"><span class="pre">LRRMessage</span></tt></a>: Message received from a long-range radio module.</li>
  1035. </ul>
  1036. <dl class="class">
  1037. <dt id="alarmdecoder.messages.BaseMessage">
  1038. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">BaseMessage</tt><a class="reference internal" href="_modules/alarmdecoder/messages.html#BaseMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.BaseMessage" title="Permalink to this definition">¶</a></dt>
  1039. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1040. <p>Base class for messages.</p>
  1041. <dl class="attribute">
  1042. <dt id="alarmdecoder.messages.BaseMessage.raw">
  1043. <tt class="descname">raw</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.BaseMessage.raw" title="Permalink to this definition">¶</a></dt>
  1044. <dd><p>The raw message text</p>
  1045. </dd></dl>
  1046. <dl class="attribute">
  1047. <dt id="alarmdecoder.messages.BaseMessage.timestamp">
  1048. <tt class="descname">timestamp</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.BaseMessage.timestamp" title="Permalink to this definition">¶</a></dt>
  1049. <dd><p>The timestamp of the message</p>
  1050. </dd></dl>
  1051. <dl class="method">
  1052. <dt id="alarmdecoder.messages.BaseMessage.dict">
  1053. <tt class="descname">dict</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#BaseMessage.dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.BaseMessage.dict" title="Permalink to this definition">¶</a></dt>
  1054. <dd><p>Dictionary representation.</p>
  1055. </dd></dl>
  1056. </dd></dl>
  1057. <dl class="class">
  1058. <dt id="alarmdecoder.messages.Message">
  1059. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">Message</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#Message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.Message" title="Permalink to this definition">¶</a></dt>
  1060. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  1061. <p>Represents a message from the alarm panel.</p>
  1062. <dl class="attribute">
  1063. <dt id="alarmdecoder.messages.Message.ready">
  1064. <tt class="descname">ready</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.ready" title="Permalink to this definition">¶</a></dt>
  1065. <dd><p>Indicates whether or not the panel is in a ready state.</p>
  1066. </dd></dl>
  1067. <dl class="attribute">
  1068. <dt id="alarmdecoder.messages.Message.armed_away">
  1069. <tt class="descname">armed_away</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.armed_away" title="Permalink to this definition">¶</a></dt>
  1070. <dd><p>Indicates whether or not the panel is armed away.</p>
  1071. </dd></dl>
  1072. <dl class="attribute">
  1073. <dt id="alarmdecoder.messages.Message.armed_home">
  1074. <tt class="descname">armed_home</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.armed_home" title="Permalink to this definition">¶</a></dt>
  1075. <dd><p>Indicates whether or not the panel is armed home.</p>
  1076. </dd></dl>
  1077. <dl class="attribute">
  1078. <dt id="alarmdecoder.messages.Message.backlight_on">
  1079. <tt class="descname">backlight_on</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.backlight_on" title="Permalink to this definition">¶</a></dt>
  1080. <dd><p>Indicates whether or not the keypad backlight is on.</p>
  1081. </dd></dl>
  1082. <dl class="attribute">
  1083. <dt id="alarmdecoder.messages.Message.programming_mode">
  1084. <tt class="descname">programming_mode</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.programming_mode" title="Permalink to this definition">¶</a></dt>
  1085. <dd><p>Indicates whether or not we&#8217;re in programming mode.</p>
  1086. </dd></dl>
  1087. <dl class="attribute">
  1088. <dt id="alarmdecoder.messages.Message.beeps">
  1089. <tt class="descname">beeps</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.Message.beeps" title="Permalink to this definition">¶</a></dt>
  1090. <dd><p>Number of beeps associated with a message.</p>
  1091. </dd></dl>
  1092. <dl class="attribute">
  1093. <dt id="alarmdecoder.messages.Message.zone_bypassed">
  1094. <tt class="descname">zone_bypassed</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.zone_bypassed" title="Permalink to this definition">¶</a></dt>
  1095. <dd><p>Indicates whether or not a zone is bypassed.</p>
  1096. </dd></dl>
  1097. <dl class="attribute">
  1098. <dt id="alarmdecoder.messages.Message.ac_power">
  1099. <tt class="descname">ac_power</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.ac_power" title="Permalink to this definition">¶</a></dt>
  1100. <dd><p>Indicates whether or not the panel is on AC power.</p>
  1101. </dd></dl>
  1102. <dl class="attribute">
  1103. <dt id="alarmdecoder.messages.Message.chime_on">
  1104. <tt class="descname">chime_on</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.chime_on" title="Permalink to this definition">¶</a></dt>
  1105. <dd><p>Indicates whether or not the chime is enabled.</p>
  1106. </dd></dl>
  1107. <dl class="attribute">
  1108. <dt id="alarmdecoder.messages.Message.alarm_event_occurred">
  1109. <tt class="descname">alarm_event_occurred</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.alarm_event_occurred" title="Permalink to this definition">¶</a></dt>
  1110. <dd><p>Indicates whether or not an alarm event has occurred.</p>
  1111. </dd></dl>
  1112. <dl class="attribute">
  1113. <dt id="alarmdecoder.messages.Message.alarm_sounding">
  1114. <tt class="descname">alarm_sounding</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.alarm_sounding" title="Permalink to this definition">¶</a></dt>
  1115. <dd><p>Indicates whether or not an alarm is sounding.</p>
  1116. </dd></dl>
  1117. <dl class="attribute">
  1118. <dt id="alarmdecoder.messages.Message.battery_low">
  1119. <tt class="descname">battery_low</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.battery_low" title="Permalink to this definition">¶</a></dt>
  1120. <dd><p>Indicates whether or not there is a low battery.</p>
  1121. </dd></dl>
  1122. <dl class="attribute">
  1123. <dt id="alarmdecoder.messages.Message.entry_delay_off">
  1124. <tt class="descname">entry_delay_off</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.entry_delay_off" title="Permalink to this definition">¶</a></dt>
  1125. <dd><p>Indicates whether or not the entry delay is enabled.</p>
  1126. </dd></dl>
  1127. <dl class="attribute">
  1128. <dt id="alarmdecoder.messages.Message.fire_alarm">
  1129. <tt class="descname">fire_alarm</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.fire_alarm" title="Permalink to this definition">¶</a></dt>
  1130. <dd><p>Indicates whether or not a fire alarm is sounding.</p>
  1131. </dd></dl>
  1132. <dl class="attribute">
  1133. <dt id="alarmdecoder.messages.Message.check_zone">
  1134. <tt class="descname">check_zone</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.check_zone" title="Permalink to this definition">¶</a></dt>
  1135. <dd><p>Indicates whether or not there are zones that require attention.</p>
  1136. </dd></dl>
  1137. <dl class="attribute">
  1138. <dt id="alarmdecoder.messages.Message.perimeter_only">
  1139. <tt class="descname">perimeter_only</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.perimeter_only" title="Permalink to this definition">¶</a></dt>
  1140. <dd><p>Indicates whether or not the perimeter is armed.</p>
  1141. </dd></dl>
  1142. <dl class="attribute">
  1143. <dt id="alarmdecoder.messages.Message.system_fault">
  1144. <tt class="descname">system_fault</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.Message.system_fault" title="Permalink to this definition">¶</a></dt>
  1145. <dd><p>Indicates whether a system fault has occurred.</p>
  1146. </dd></dl>
  1147. <dl class="attribute">
  1148. <dt id="alarmdecoder.messages.Message.panel_type">
  1149. <tt class="descname">panel_type</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.messages.Message.panel_type" title="Permalink to this definition">¶</a></dt>
  1150. <dd><p>Indicates which panel type was the source of this message.</p>
  1151. </dd></dl>
  1152. <dl class="attribute">
  1153. <dt id="alarmdecoder.messages.Message.numeric_code">
  1154. <tt class="descname">numeric_code</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.numeric_code" title="Permalink to this definition">¶</a></dt>
  1155. <dd><p>The numeric code associated with the message.</p>
  1156. </dd></dl>
  1157. <dl class="attribute">
  1158. <dt id="alarmdecoder.messages.Message.text">
  1159. <tt class="descname">text</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.text" title="Permalink to this definition">¶</a></dt>
  1160. <dd><p>The human-readable text to be displayed on the panel LCD.</p>
  1161. </dd></dl>
  1162. <dl class="attribute">
  1163. <dt id="alarmdecoder.messages.Message.cursor_location">
  1164. <tt class="descname">cursor_location</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.Message.cursor_location" title="Permalink to this definition">¶</a></dt>
  1165. <dd><p>Current cursor location on the keypad.</p>
  1166. </dd></dl>
  1167. <dl class="attribute">
  1168. <dt id="alarmdecoder.messages.Message.mask">
  1169. <tt class="descname">mask</tt><em class="property"> = 4294967295</em><a class="headerlink" href="#alarmdecoder.messages.Message.mask" title="Permalink to this definition">¶</a></dt>
  1170. <dd><p>Address mask this message is intended for.</p>
  1171. </dd></dl>
  1172. <dl class="attribute">
  1173. <dt id="alarmdecoder.messages.Message.bitfield">
  1174. <tt class="descname">bitfield</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.bitfield" title="Permalink to this definition">¶</a></dt>
  1175. <dd><p>The bitfield associated with this message.</p>
  1176. </dd></dl>
  1177. <dl class="attribute">
  1178. <dt id="alarmdecoder.messages.Message.panel_data">
  1179. <tt class="descname">panel_data</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.Message.panel_data" title="Permalink to this definition">¶</a></dt>
  1180. <dd><p>The panel data field associated with this message.</p>
  1181. </dd></dl>
  1182. <dl class="method">
  1183. <dt id="alarmdecoder.messages.Message.dict">
  1184. <tt class="descname">dict</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#Message.dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.Message.dict" title="Permalink to this definition">¶</a></dt>
  1185. <dd><p>Dictionary representation.</p>
  1186. </dd></dl>
  1187. </dd></dl>
  1188. <dl class="class">
  1189. <dt id="alarmdecoder.messages.ExpanderMessage">
  1190. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">ExpanderMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#ExpanderMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage" title="Permalink to this definition">¶</a></dt>
  1191. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  1192. <p>Represents a message from a zone or relay expansion module.</p>
  1193. <dl class="attribute">
  1194. <dt id="alarmdecoder.messages.ExpanderMessage.ZONE">
  1195. <tt class="descname">ZONE</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.ZONE" title="Permalink to this definition">¶</a></dt>
  1196. <dd><p>Flag indicating that the expander message relates to a Zone Expander.</p>
  1197. </dd></dl>
  1198. <dl class="attribute">
  1199. <dt id="alarmdecoder.messages.ExpanderMessage.RELAY">
  1200. <tt class="descname">RELAY</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.RELAY" title="Permalink to this definition">¶</a></dt>
  1201. <dd><p>Flag indicating that the expander message relates to a Relay Expander.</p>
  1202. </dd></dl>
  1203. <dl class="attribute">
  1204. <dt id="alarmdecoder.messages.ExpanderMessage.type">
  1205. <tt class="descname">type</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.type" title="Permalink to this definition">¶</a></dt>
  1206. <dd><p>Expander message type: ExpanderMessage.ZONE or ExpanderMessage.RELAY</p>
  1207. </dd></dl>
  1208. <dl class="attribute">
  1209. <dt id="alarmdecoder.messages.ExpanderMessage.address">
  1210. <tt class="descname">address</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.address" title="Permalink to this definition">¶</a></dt>
  1211. <dd><p>Address of expander</p>
  1212. </dd></dl>
  1213. <dl class="attribute">
  1214. <dt id="alarmdecoder.messages.ExpanderMessage.channel">
  1215. <tt class="descname">channel</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.channel" title="Permalink to this definition">¶</a></dt>
  1216. <dd><p>Channel on the expander</p>
  1217. </dd></dl>
  1218. <dl class="attribute">
  1219. <dt id="alarmdecoder.messages.ExpanderMessage.value">
  1220. <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.value" title="Permalink to this definition">¶</a></dt>
  1221. <dd><p>Value associated with the message</p>
  1222. </dd></dl>
  1223. <dl class="method">
  1224. <dt id="alarmdecoder.messages.ExpanderMessage.dict">
  1225. <tt class="descname">dict</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#ExpanderMessage.dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.ExpanderMessage.dict" title="Permalink to this definition">¶</a></dt>
  1226. <dd><p>Dictionary representation.</p>
  1227. </dd></dl>
  1228. </dd></dl>
  1229. <dl class="class">
  1230. <dt id="alarmdecoder.messages.RFMessage">
  1231. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">RFMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#RFMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.RFMessage" title="Permalink to this definition">¶</a></dt>
  1232. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  1233. <p>Represents a message from an RF receiver.</p>
  1234. <dl class="attribute">
  1235. <dt id="alarmdecoder.messages.RFMessage.serial_number">
  1236. <tt class="descname">serial_number</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.serial_number" title="Permalink to this definition">¶</a></dt>
  1237. <dd><p>Serial number of the RF device.</p>
  1238. </dd></dl>
  1239. <dl class="attribute">
  1240. <dt id="alarmdecoder.messages.RFMessage.value">
  1241. <tt class="descname">value</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.value" title="Permalink to this definition">¶</a></dt>
  1242. <dd><p>Value associated with this message.</p>
  1243. </dd></dl>
  1244. <dl class="attribute">
  1245. <dt id="alarmdecoder.messages.RFMessage.battery">
  1246. <tt class="descname">battery</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.battery" title="Permalink to this definition">¶</a></dt>
  1247. <dd><p>Low battery indication</p>
  1248. </dd></dl>
  1249. <dl class="attribute">
  1250. <dt id="alarmdecoder.messages.RFMessage.supervision">
  1251. <tt class="descname">supervision</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.supervision" title="Permalink to this definition">¶</a></dt>
  1252. <dd><p>Supervision required indication</p>
  1253. </dd></dl>
  1254. <dl class="attribute">
  1255. <dt id="alarmdecoder.messages.RFMessage.loop">
  1256. <tt class="descname">loop</tt><em class="property"> = [False, False, False, False]</em><a class="headerlink" href="#alarmdecoder.messages.RFMessage.loop" title="Permalink to this definition">¶</a></dt>
  1257. <dd><p>Loop indicators</p>
  1258. </dd></dl>
  1259. <dl class="method">
  1260. <dt id="alarmdecoder.messages.RFMessage.dict">
  1261. <tt class="descname">dict</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#RFMessage.dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.RFMessage.dict" title="Permalink to this definition">¶</a></dt>
  1262. <dd><p>Dictionary representation.</p>
  1263. </dd></dl>
  1264. </dd></dl>
  1265. <dl class="class">
  1266. <dt id="alarmdecoder.messages.LRRMessage">
  1267. <em class="property">class </em><tt class="descclassname">alarmdecoder.messages.</tt><tt class="descname">LRRMessage</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#LRRMessage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.LRRMessage" title="Permalink to this definition">¶</a></dt>
  1268. <dd><p>Bases: <a class="reference internal" href="#alarmdecoder.messages.BaseMessage" title="alarmdecoder.messages.BaseMessage"><tt class="xref py py-class docutils literal"><span class="pre">alarmdecoder.messages.BaseMessage</span></tt></a></p>
  1269. <p>Represent a message from a Long Range Radio.</p>
  1270. <dl class="attribute">
  1271. <dt id="alarmdecoder.messages.LRRMessage.event_data">
  1272. <tt class="descname">event_data</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.event_data" title="Permalink to this definition">¶</a></dt>
  1273. <dd><p>Data associated with the LRR message. Usually user ID or zone.</p>
  1274. </dd></dl>
  1275. <dl class="attribute">
  1276. <dt id="alarmdecoder.messages.LRRMessage.partition">
  1277. <tt class="descname">partition</tt><em class="property"> = -1</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.partition" title="Permalink to this definition">¶</a></dt>
  1278. <dd><p>The partition that this message applies to.</p>
  1279. </dd></dl>
  1280. <dl class="attribute">
  1281. <dt id="alarmdecoder.messages.LRRMessage.event_type">
  1282. <tt class="descname">event_type</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.event_type" title="Permalink to this definition">¶</a></dt>
  1283. <dd><p>The type of the event that occurred.</p>
  1284. </dd></dl>
  1285. <dl class="method">
  1286. <dt id="alarmdecoder.messages.LRRMessage.dict">
  1287. <tt class="descname">dict</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/messages.html#LRRMessage.dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.messages.LRRMessage.dict" title="Permalink to this definition">¶</a></dt>
  1288. <dd><p>Dictionary representation.</p>
  1289. </dd></dl>
  1290. </dd></dl>
  1291. </div>
  1292. <div class="section" id="module-alarmdecoder.zonetracking">
  1293. <span id="zonetracking-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">zonetracking</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.zonetracking" title="Permalink to this headline">¶</a></h2>
  1294. <p>Provides zone tracking functionality for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) device family.</p>
  1295. <dl class="class">
  1296. <dt id="alarmdecoder.zonetracking.Zone">
  1297. <em class="property">class </em><tt class="descclassname">alarmdecoder.zonetracking.</tt><tt class="descname">Zone</tt><big>(</big><em>zone=0</em>, <em>name=''</em>, <em>status=0</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zone" title="Permalink to this definition">¶</a></dt>
  1298. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1299. <p>Representation of a panel zone.</p>
  1300. <dl class="attribute">
  1301. <dt id="alarmdecoder.zonetracking.Zone.CLEAR">
  1302. <tt class="descname">CLEAR</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.CLEAR" title="Permalink to this definition">¶</a></dt>
  1303. <dd><p>Status indicating that the zone is cleared.</p>
  1304. </dd></dl>
  1305. <dl class="attribute">
  1306. <dt id="alarmdecoder.zonetracking.Zone.FAULT">
  1307. <tt class="descname">FAULT</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.FAULT" title="Permalink to this definition">¶</a></dt>
  1308. <dd><p>Status indicating that the zone is faulted.</p>
  1309. </dd></dl>
  1310. <dl class="attribute">
  1311. <dt id="alarmdecoder.zonetracking.Zone.CHECK">
  1312. <tt class="descname">CHECK</tt><em class="property"> = 2</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.CHECK" title="Permalink to this definition">¶</a></dt>
  1313. <dd><p>Status indicating that there is a wiring issue with the zone.</p>
  1314. </dd></dl>
  1315. <dl class="attribute">
  1316. <dt id="alarmdecoder.zonetracking.Zone.STATUS">
  1317. <tt class="descname">STATUS</tt><em class="property"> = {0: 'CLEAR', 1: 'FAULT', 2: 'CHECK'}</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.STATUS" title="Permalink to this definition">¶</a></dt>
  1318. <dd></dd></dl>
  1319. <dl class="attribute">
  1320. <dt id="alarmdecoder.zonetracking.Zone.zone">
  1321. <tt class="descname">zone</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.zone" title="Permalink to this definition">¶</a></dt>
  1322. <dd><p>Zone ID</p>
  1323. </dd></dl>
  1324. <dl class="attribute">
  1325. <dt id="alarmdecoder.zonetracking.Zone.name">
  1326. <tt class="descname">name</tt><em class="property"> = ''</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.name" title="Permalink to this definition">¶</a></dt>
  1327. <dd><p>Zone name</p>
  1328. </dd></dl>
  1329. <dl class="attribute">
  1330. <dt id="alarmdecoder.zonetracking.Zone.status">
  1331. <tt class="descname">status</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.status" title="Permalink to this definition">¶</a></dt>
  1332. <dd><p>Zone status</p>
  1333. </dd></dl>
  1334. <dl class="attribute">
  1335. <dt id="alarmdecoder.zonetracking.Zone.timestamp">
  1336. <tt class="descname">timestamp</tt><em class="property"> = None</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.timestamp" title="Permalink to this definition">¶</a></dt>
  1337. <dd><p>Timestamp of last update</p>
  1338. </dd></dl>
  1339. </dd></dl>
  1340. <dl class="class">
  1341. <dt id="alarmdecoder.zonetracking.Zonetracker">
  1342. <em class="property">class </em><tt class="descclassname">alarmdecoder.zonetracking.</tt><tt class="descname">Zonetracker</tt><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker" title="Permalink to this definition">¶</a></dt>
  1343. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1344. <p>Handles tracking of zones and their statuses.</p>
  1345. <dl class="attribute">
  1346. <dt id="alarmdecoder.zonetracking.Zonetracker.on_fault">
  1347. <tt class="descname">on_fault</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_fault" title="Permalink to this definition">¶</a></dt>
  1348. <dd><p>This event is called when the device detects a zone fault.</p>
  1349. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  1350. </dd></dl>
  1351. <dl class="attribute">
  1352. <dt id="alarmdecoder.zonetracking.Zonetracker.on_restore">
  1353. <tt class="descname">on_restore</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_restore" title="Permalink to this definition">¶</a></dt>
  1354. <dd><p>This event is called when the device detects that a fault is restored.</p>
  1355. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  1356. </dd></dl>
  1357. <dl class="attribute">
  1358. <dt id="alarmdecoder.zonetracking.Zonetracker.EXPIRE">
  1359. <tt class="descname">EXPIRE</tt><em class="property"> = 30</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.EXPIRE" title="Permalink to this definition">¶</a></dt>
  1360. <dd><p>Zone expiration timeout.</p>
  1361. </dd></dl>
  1362. <dl class="attribute">
  1363. <dt id="alarmdecoder.zonetracking.Zonetracker.zones">
  1364. <tt class="descname">zones</tt><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker.zones"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.zones" title="Permalink to this definition">¶</a></dt>
  1365. <dd><p>Returns the current list of zones being tracked.</p>
  1366. <table class="docutils field-list" frame="void" rules="none">
  1367. <col class="field-name" />
  1368. <col class="field-body" />
  1369. <tbody valign="top">
  1370. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">dictionary of <a class="reference internal" href="#alarmdecoder.zonetracking.Zone" title="alarmdecoder.zonetracking.Zone"><tt class="xref py py-class docutils literal"><span class="pre">Zone</span></tt></a> being tracked</td>
  1371. </tr>
  1372. </tbody>
  1373. </table>
  1374. </dd></dl>
  1375. <dl class="attribute">
  1376. <dt id="alarmdecoder.zonetracking.Zonetracker.faulted">
  1377. <tt class="descname">faulted</tt><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker.faulted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.faulted" title="Permalink to this definition">¶</a></dt>
  1378. <dd><p>Retrieves the current list of faulted zones.</p>
  1379. <table class="docutils field-list" frame="void" rules="none">
  1380. <col class="field-name" />
  1381. <col class="field-body" />
  1382. <tbody valign="top">
  1383. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of faulted zones</td>
  1384. </tr>
  1385. </tbody>
  1386. </table>
  1387. </dd></dl>
  1388. <dl class="method">
  1389. <dt id="alarmdecoder.zonetracking.Zonetracker.update">
  1390. <tt class="descname">update</tt><big>(</big><em>message</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker.update"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.update" title="Permalink to this definition">¶</a></dt>
  1391. <dd><p>Update zone statuses based on the current message.</p>
  1392. <table class="docutils field-list" frame="void" rules="none">
  1393. <col class="field-name" />
  1394. <col class="field-body" />
  1395. <tbody valign="top">
  1396. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>message</strong> (<a class="reference internal" href="#alarmdecoder.messages.Message" title="alarmdecoder.messages.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a> or <a class="reference internal" href="#alarmdecoder.messages.ExpanderMessage" title="alarmdecoder.messages.ExpanderMessage"><tt class="xref py py-class docutils literal"><span class="pre">ExpanderMessage</span></tt></a>) &#8211; message to use to update the zone tracking</td>
  1397. </tr>
  1398. </tbody>
  1399. </table>
  1400. </dd></dl>
  1401. <dl class="method">
  1402. <dt id="alarmdecoder.zonetracking.Zonetracker.expander_to_zone">
  1403. <tt class="descname">expander_to_zone</tt><big>(</big><em>address</em>, <em>channel</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/zonetracking.html#Zonetracker.expander_to_zone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.expander_to_zone" title="Permalink to this definition">¶</a></dt>
  1404. <dd><p>Convert an address and channel into a zone number.</p>
  1405. <table class="docutils field-list" frame="void" rules="none">
  1406. <col class="field-name" />
  1407. <col class="field-body" />
  1408. <tbody valign="top">
  1409. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1410. <li><strong>address</strong> (<em>int</em>) &#8211; expander address</li>
  1411. <li><strong>channel</strong> (<em>int</em>) &#8211; channel</li>
  1412. </ul>
  1413. </td>
  1414. </tr>
  1415. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">zone number associated with an address and channel</p>
  1416. </td>
  1417. </tr>
  1418. </tbody>
  1419. </table>
  1420. </dd></dl>
  1421. </dd></dl>
  1422. </div>
  1423. <div class="section" id="module-alarmdecoder.util">
  1424. <span id="util-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">util</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.util" title="Permalink to this headline">¶</a></h2>
  1425. <p>Provides utility classes for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) devices.</p>
  1426. <dl class="exception">
  1427. <dt id="alarmdecoder.util.NoDeviceError">
  1428. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">NoDeviceError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#NoDeviceError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.NoDeviceError" title="Permalink to this definition">¶</a></dt>
  1429. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1430. <p>No devices found.</p>
  1431. </dd></dl>
  1432. <dl class="exception">
  1433. <dt id="alarmdecoder.util.CommError">
  1434. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">CommError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#CommError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.CommError" title="Permalink to this definition">¶</a></dt>
  1435. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1436. <p>There was an error communicating with the device.</p>
  1437. </dd></dl>
  1438. <dl class="exception">
  1439. <dt id="alarmdecoder.util.TimeoutError">
  1440. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">TimeoutError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#TimeoutError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.TimeoutError" title="Permalink to this definition">¶</a></dt>
  1441. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1442. <p>There was a timeout while trying to communicate with the device.</p>
  1443. </dd></dl>
  1444. <dl class="exception">
  1445. <dt id="alarmdecoder.util.InvalidMessageError">
  1446. <em class="property">exception </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">InvalidMessageError</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#InvalidMessageError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.InvalidMessageError" title="Permalink to this definition">¶</a></dt>
  1447. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1448. <p>The format of the panel message was invalid.</p>
  1449. </dd></dl>
  1450. <dl class="class">
  1451. <dt id="alarmdecoder.util.Firmware">
  1452. <em class="property">class </em><tt class="descclassname">alarmdecoder.util.</tt><tt class="descname">Firmware</tt><a class="reference internal" href="_modules/alarmdecoder/util.html#Firmware"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.Firmware" title="Permalink to this definition">¶</a></dt>
  1453. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1454. <p>Represents firmware for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> devices.</p>
  1455. <dl class="attribute">
  1456. <dt id="alarmdecoder.util.Firmware.STAGE_START">
  1457. <tt class="descname">STAGE_START</tt><em class="property"> = 0</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_START" title="Permalink to this definition">¶</a></dt>
  1458. <dd></dd></dl>
  1459. <dl class="attribute">
  1460. <dt id="alarmdecoder.util.Firmware.STAGE_WAITING">
  1461. <tt class="descname">STAGE_WAITING</tt><em class="property"> = 1</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_WAITING" title="Permalink to this definition">¶</a></dt>
  1462. <dd></dd></dl>
  1463. <dl class="attribute">
  1464. <dt id="alarmdecoder.util.Firmware.STAGE_BOOT">
  1465. <tt class="descname">STAGE_BOOT</tt><em class="property"> = 2</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_BOOT" title="Permalink to this definition">¶</a></dt>
  1466. <dd></dd></dl>
  1467. <dl class="attribute">
  1468. <dt id="alarmdecoder.util.Firmware.STAGE_LOAD">
  1469. <tt class="descname">STAGE_LOAD</tt><em class="property"> = 3</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_LOAD" title="Permalink to this definition">¶</a></dt>
  1470. <dd></dd></dl>
  1471. <dl class="attribute">
  1472. <dt id="alarmdecoder.util.Firmware.STAGE_UPLOADING">
  1473. <tt class="descname">STAGE_UPLOADING</tt><em class="property"> = 4</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_UPLOADING" title="Permalink to this definition">¶</a></dt>
  1474. <dd></dd></dl>
  1475. <dl class="attribute">
  1476. <dt id="alarmdecoder.util.Firmware.STAGE_DONE">
  1477. <tt class="descname">STAGE_DONE</tt><em class="property"> = 5</em><a class="headerlink" href="#alarmdecoder.util.Firmware.STAGE_DONE" title="Permalink to this definition">¶</a></dt>
  1478. <dd></dd></dl>
  1479. <dl class="staticmethod">
  1480. <dt id="alarmdecoder.util.Firmware.upload">
  1481. <em class="property">static </em><tt class="descname">upload</tt><big>(</big><em>dev</em>, <em>filename</em>, <em>progress_callback=None</em><big>)</big><a class="reference internal" href="_modules/alarmdecoder/util.html#Firmware.upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.util.Firmware.upload" title="Permalink to this definition">¶</a></dt>
  1482. <dd><p>Uploads firmware to an <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> device.</p>
  1483. <table class="docutils field-list" frame="void" rules="none">
  1484. <col class="field-name" />
  1485. <col class="field-body" />
  1486. <tbody valign="top">
  1487. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1488. <li><strong>filename</strong> (<em>string</em>) &#8211; firmware filename</li>
  1489. <li><strong>progress_callback</strong> (<em>function</em>) &#8211; callback function used to report progress</li>
  1490. </ul>
  1491. </td>
  1492. </tr>
  1493. <tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last"><a class="reference internal" href="#alarmdecoder.util.NoDeviceError" title="alarmdecoder.util.NoDeviceError"><tt class="xref py py-class docutils literal"><span class="pre">NoDeviceError</span></tt></a>, <a class="reference internal" href="#alarmdecoder.util.TimeoutError" title="alarmdecoder.util.TimeoutError"><tt class="xref py py-class docutils literal"><span class="pre">TimeoutError</span></tt></a></p>
  1494. </td>
  1495. </tr>
  1496. </tbody>
  1497. </table>
  1498. </dd></dl>
  1499. </dd></dl>
  1500. </div>
  1501. <div class="section" id="module-alarmdecoder.panels">
  1502. <span id="panels-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">panels</span></tt> Module<a class="headerlink" href="#module-alarmdecoder.panels" title="Permalink to this headline">¶</a></h2>
  1503. <p>Representations of Panels and their templates.</p>
  1504. </div>
  1505. </div>
  1506. </div>
  1507. </div>
  1508. </div>
  1509. <div class="sphinxsidebar">
  1510. <div class="sphinxsidebarwrapper">
  1511. <h3><a href="index.html">Table Of Contents</a></h3>
  1512. <ul>
  1513. <li><a class="reference internal" href="#">alarmdecoder Package</a><ul>
  1514. <li><a class="reference internal" href="#module-alarmdecoder.decoder"><tt class="docutils literal"><span class="pre">decoder</span></tt> Module</a></li>
  1515. <li><a class="reference internal" href="#module-alarmdecoder.devices"><tt class="docutils literal"><span class="pre">devices</span></tt> Module</a></li>
  1516. <li><a class="reference internal" href="#module-alarmdecoder.messages"><tt class="docutils literal"><span class="pre">messages</span></tt> Module</a></li>
  1517. <li><a class="reference internal" href="#module-alarmdecoder.zonetracking"><tt class="docutils literal"><span class="pre">zonetracking</span></tt> Module</a></li>
  1518. <li><a class="reference internal" href="#module-alarmdecoder.util"><tt class="docutils literal"><span class="pre">util</span></tt> Module</a></li>
  1519. <li><a class="reference internal" href="#module-alarmdecoder.panels"><tt class="docutils literal"><span class="pre">panels</span></tt> Module</a></li>
  1520. </ul>
  1521. </li>
  1522. </ul>
  1523. <h4>Previous topic</h4>
  1524. <p class="topless"><a href="index.html"
  1525. title="previous chapter">Welcome to Alarm Decoder&#8217;s documentation!</a></p>
  1526. <h3>This Page</h3>
  1527. <ul class="this-page-menu">
  1528. <li><a href="_sources/alarmdecoder.txt"
  1529. rel="nofollow">Show Source</a></li>
  1530. </ul>
  1531. <div id="searchbox" style="display: none">
  1532. <h3>Quick search</h3>
  1533. <form class="search" action="search.html" method="get">
  1534. <input type="text" name="q" />
  1535. <input type="submit" value="Go" />
  1536. <input type="hidden" name="check_keywords" value="yes" />
  1537. <input type="hidden" name="area" value="default" />
  1538. </form>
  1539. <p class="searchtip" style="font-size: 90%">
  1540. Enter search terms or a module, class or function name.
  1541. </p>
  1542. </div>
  1543. <script type="text/javascript">$('#searchbox').show(0);</script>
  1544. </div>
  1545. </div>
  1546. <div class="clearer"></div>
  1547. </div>
  1548. <div class="related">
  1549. <h3>Navigation</h3>
  1550. <ul>
  1551. <li class="right" style="margin-right: 10px">
  1552. <a href="genindex.html" title="General Index"
  1553. >index</a></li>
  1554. <li class="right" >
  1555. <a href="py-modindex.html" title="Python Module Index"
  1556. >modules</a> |</li>
  1557. <li class="right" >
  1558. <a href="index.html" title="Welcome to Alarm Decoder’s documentation!"
  1559. >previous</a> |</li>
  1560. <li><a href="index.html">alarmdecoder documentation</a> &raquo;</li>
  1561. </ul>
  1562. </div>
  1563. <div class="footer">
  1564. &copy; Copyright 2013, Nu Tech Software Solutions, Inc..
  1565. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
  1566. </div>
  1567. </body>
  1568. </html>