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.

1788 lines
113 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="attribute">
  307. <dt id="alarmdecoder.decoder.AlarmDecoder.internal_address_mask">
  308. <tt class="descname">internal_address_mask</tt><a class="reference internal" href="_modules/alarmdecoder/decoder.html#AlarmDecoder.internal_address_mask"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#alarmdecoder.decoder.AlarmDecoder.internal_address_mask" title="Permalink to this definition">¶</a></dt>
  309. <dd><p>Retrieves the address mask used for updating internal status.</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">Returns:</th><td class="field-body">address mask</td>
  315. </tr>
  316. </tbody>
  317. </table>
  318. </dd></dl>
  319. <dl class="method">
  320. <dt id="alarmdecoder.decoder.AlarmDecoder.open">
  321. <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>
  322. <dd><p>Opens the device.</p>
  323. <table class="docutils field-list" frame="void" rules="none">
  324. <col class="field-name" />
  325. <col class="field-body" />
  326. <tbody valign="top">
  327. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  328. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate used for the device. Defaults to the lower-level device default.</li>
  329. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; Specifies whether or not the automatic reader
  330. thread should be started.</li>
  331. </ul>
  332. </td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. </dd></dl>
  337. <dl class="method">
  338. <dt id="alarmdecoder.decoder.AlarmDecoder.close">
  339. <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>
  340. <dd><p>Closes the device.</p>
  341. </dd></dl>
  342. <dl class="method">
  343. <dt id="alarmdecoder.decoder.AlarmDecoder.send">
  344. <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>
  345. <dd><p>Sends data to the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> device.</p>
  346. <table class="docutils field-list" frame="void" rules="none">
  347. <col class="field-name" />
  348. <col class="field-body" />
  349. <tbody valign="top">
  350. <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>
  351. </tr>
  352. </tbody>
  353. </table>
  354. </dd></dl>
  355. <dl class="method">
  356. <dt id="alarmdecoder.decoder.AlarmDecoder.get_config">
  357. <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>
  358. <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>
  359. </dd></dl>
  360. <dl class="method">
  361. <dt id="alarmdecoder.decoder.AlarmDecoder.save_config">
  362. <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>
  363. <dd><p>Sets configuration entries on the device.</p>
  364. </dd></dl>
  365. <dl class="method">
  366. <dt id="alarmdecoder.decoder.AlarmDecoder.reboot">
  367. <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>
  368. <dd><p>Reboots the device.</p>
  369. </dd></dl>
  370. <dl class="method">
  371. <dt id="alarmdecoder.decoder.AlarmDecoder.fault_zone">
  372. <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>
  373. <dd><p>Faults a zone if we are emulating a zone expander.</p>
  374. <table class="docutils field-list" frame="void" rules="none">
  375. <col class="field-name" />
  376. <col class="field-body" />
  377. <tbody valign="top">
  378. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  379. <li><strong>zone</strong> (<em>int</em>) &#8211; zone to fault</li>
  380. <li><strong>simulate_wire_problem</strong> (<em>bool</em>) &#8211; Whether or not to simulate a wire fault</li>
  381. </ul>
  382. </td>
  383. </tr>
  384. </tbody>
  385. </table>
  386. </dd></dl>
  387. <dl class="method">
  388. <dt id="alarmdecoder.decoder.AlarmDecoder.clear_zone">
  389. <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>
  390. <dd><p>Clears a zone if we are emulating a zone expander.</p>
  391. <table class="docutils field-list" frame="void" rules="none">
  392. <col class="field-name" />
  393. <col class="field-body" />
  394. <tbody valign="top">
  395. <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>
  396. </tr>
  397. </tbody>
  398. </table>
  399. </dd></dl>
  400. </dd></dl>
  401. </div>
  402. <div class="section" id="module-alarmdecoder.devices">
  403. <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>
  404. <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>
  405. <ul class="simple">
  406. <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>
  407. <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>
  408. <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.
  409. Also supports SSL if using <a class="reference external" href="http://github.com/nutechsoftware/ser2sock">ser2sock</a>.</li>
  410. </ul>
  411. <dl class="class">
  412. <dt id="alarmdecoder.devices.Device">
  413. <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>
  414. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  415. <p>Base class for all <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) device types.</p>
  416. <dl class="attribute">
  417. <dt id="alarmdecoder.devices.Device.on_open">
  418. <tt class="descname">on_open</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_open" title="Permalink to this definition">¶</a></dt>
  419. <dd><p>This event is called when the device has been opened.</p>
  420. <p><strong>Callback definition:</strong> <em>def callback(device)</em></p>
  421. </dd></dl>
  422. <dl class="attribute">
  423. <dt id="alarmdecoder.devices.Device.on_close">
  424. <tt class="descname">on_close</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_close" title="Permalink to this definition">¶</a></dt>
  425. <dd><p>This event is called when the device has been closed.</p>
  426. <p><strong>Callback definition:</strong> def callback(device)*</p>
  427. </dd></dl>
  428. <dl class="attribute">
  429. <dt id="alarmdecoder.devices.Device.on_read">
  430. <tt class="descname">on_read</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_read" title="Permalink to this definition">¶</a></dt>
  431. <dd><p>This event is called when a line has been read from the device.</p>
  432. <p><strong>Callback definition:</strong> def callback(device, data)*</p>
  433. </dd></dl>
  434. <dl class="attribute">
  435. <dt id="alarmdecoder.devices.Device.on_write">
  436. <tt class="descname">on_write</tt><a class="headerlink" href="#alarmdecoder.devices.Device.on_write" title="Permalink to this definition">¶</a></dt>
  437. <dd><p>This event is called when data has been written to the device.</p>
  438. <p><strong>Callback definition:</strong> def callback(device, data)*</p>
  439. </dd></dl>
  440. <dl class="attribute">
  441. <dt id="alarmdecoder.devices.Device.id">
  442. <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>
  443. <dd><p>Retrieve the device ID.</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">identification string for the device</td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. </dd></dl>
  453. <dl class="method">
  454. <dt id="alarmdecoder.devices.Device.is_reader_alive">
  455. <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>
  456. <dd><p>Indicates whether or not the reader thread is alive.</p>
  457. <table class="docutils field-list" frame="void" rules="none">
  458. <col class="field-name" />
  459. <col class="field-body" />
  460. <tbody valign="top">
  461. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">whether or not the reader thread is alive</td>
  462. </tr>
  463. </tbody>
  464. </table>
  465. </dd></dl>
  466. <dl class="method">
  467. <dt id="alarmdecoder.devices.Device.stop_reader">
  468. <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>
  469. <dd><p>Stops the reader thread.</p>
  470. </dd></dl>
  471. <dl class="method">
  472. <dt id="alarmdecoder.devices.Device.close">
  473. <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>
  474. <dd><p>Closes the device.</p>
  475. </dd></dl>
  476. <dl class="class">
  477. <dt id="alarmdecoder.devices.Device.ReadThread">
  478. <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>
  479. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  480. <p>Reader thread which processes messages from the device.</p>
  481. <dl class="attribute">
  482. <dt id="alarmdecoder.devices.Device.ReadThread.READ_TIMEOUT">
  483. <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>
  484. <dd><p>Timeout for the reader thread.</p>
  485. </dd></dl>
  486. <dl class="method">
  487. <dt id="alarmdecoder.devices.Device.ReadThread.stop">
  488. <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>
  489. <dd><p>Stops the running thread.</p>
  490. </dd></dl>
  491. <dl class="method">
  492. <dt id="alarmdecoder.devices.Device.ReadThread.run">
  493. <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>
  494. <dd><p>The actual read process.</p>
  495. </dd></dl>
  496. </dd></dl>
  497. </dd></dl>
  498. <dl class="class">
  499. <dt id="alarmdecoder.devices.USBDevice">
  500. <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>
  501. <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>
  502. <p><a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device utilizing PyFTDI&#8217;s interface.</p>
  503. <dl class="attribute">
  504. <dt id="alarmdecoder.devices.USBDevice.PRODUCT_IDS">
  505. <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>
  506. <dd><p>List of Vendor and Product IDs used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  507. </dd></dl>
  508. <dl class="attribute">
  509. <dt id="alarmdecoder.devices.USBDevice.DEFAULT_VENDOR_ID">
  510. <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>
  511. <dd><p>Default Vendor ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  512. </dd></dl>
  513. <dl class="attribute">
  514. <dt id="alarmdecoder.devices.USBDevice.DEFAULT_PRODUCT_ID">
  515. <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>
  516. <dd><p>Default Product ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  517. </dd></dl>
  518. <dl class="attribute">
  519. <dt id="alarmdecoder.devices.USBDevice.FTDI_VENDOR_ID">
  520. <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>
  521. <dd><p>DEPRECATED: Vendor ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  522. </dd></dl>
  523. <dl class="attribute">
  524. <dt id="alarmdecoder.devices.USBDevice.FTDI_PRODUCT_ID">
  525. <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>
  526. <dd><p>DEPRECATED: Product ID used to recognize <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  527. </dd></dl>
  528. <dl class="attribute">
  529. <dt id="alarmdecoder.devices.USBDevice.BAUDRATE">
  530. <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>
  531. <dd><p>Default baudrate for <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices.</p>
  532. </dd></dl>
  533. <dl class="classmethod">
  534. <dt id="alarmdecoder.devices.USBDevice.find_all">
  535. <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>
  536. <dd><p>Returns all FTDI devices matching our vendor and product IDs.</p>
  537. <table class="docutils field-list" frame="void" rules="none">
  538. <col class="field-name" />
  539. <col class="field-body" />
  540. <tbody valign="top">
  541. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  542. </tr>
  543. <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>
  544. </tr>
  545. </tbody>
  546. </table>
  547. </dd></dl>
  548. <dl class="classmethod">
  549. <dt id="alarmdecoder.devices.USBDevice.devices">
  550. <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>
  551. <dd><p>Returns a cached list of <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> devices located on the system.</p>
  552. <table class="docutils field-list" frame="void" rules="none">
  553. <col class="field-name" />
  554. <col class="field-body" />
  555. <tbody valign="top">
  556. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">cached list of devices found</td>
  557. </tr>
  558. </tbody>
  559. </table>
  560. </dd></dl>
  561. <dl class="classmethod">
  562. <dt id="alarmdecoder.devices.USBDevice.find">
  563. <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>
  564. <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
  565. first device.</p>
  566. <table class="docutils field-list" frame="void" rules="none">
  567. <col class="field-name" />
  568. <col class="field-body" />
  569. <tbody valign="top">
  570. <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
  571. by find_all().</td>
  572. </tr>
  573. <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>
  574. </tr>
  575. <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>
  576. </tr>
  577. </tbody>
  578. </table>
  579. </dd></dl>
  580. <dl class="classmethod">
  581. <dt id="alarmdecoder.devices.USBDevice.start_detection">
  582. <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>
  583. <dd><p>Starts the device detection thread.</p>
  584. <table class="docutils field-list" frame="void" rules="none">
  585. <col class="field-name" />
  586. <col class="field-body" />
  587. <tbody valign="top">
  588. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  589. <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>
  590. <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>
  591. </ul>
  592. </td>
  593. </tr>
  594. </tbody>
  595. </table>
  596. </dd></dl>
  597. <dl class="classmethod">
  598. <dt id="alarmdecoder.devices.USBDevice.stop_detection">
  599. <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>
  600. <dd><p>Stops the device detection thread.</p>
  601. </dd></dl>
  602. <dl class="attribute">
  603. <dt id="alarmdecoder.devices.USBDevice.serial_number">
  604. <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>
  605. <dd><p>Retrieves the serial number 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">serial number of the device</td>
  611. </tr>
  612. </tbody>
  613. </table>
  614. </dd></dl>
  615. <dl class="attribute">
  616. <dt id="alarmdecoder.devices.USBDevice.description">
  617. <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>
  618. <dd><p>Retrieves the description of 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">description of the device</td>
  624. </tr>
  625. </tbody>
  626. </table>
  627. </dd></dl>
  628. <dl class="attribute">
  629. <dt id="alarmdecoder.devices.USBDevice.interface">
  630. <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>
  631. <dd><p>Retrieves the interface used to connect to 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">Returns:</th><td class="field-body">the interface used to connect to the device</td>
  637. </tr>
  638. </tbody>
  639. </table>
  640. </dd></dl>
  641. <dl class="method">
  642. <dt id="alarmdecoder.devices.USBDevice.open">
  643. <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>
  644. <dd><p>Opens the device.</p>
  645. <table class="docutils field-list" frame="void" rules="none">
  646. <col class="field-name" />
  647. <col class="field-body" />
  648. <tbody valign="top">
  649. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  650. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use</li>
  651. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically start the
  652. reader thread.</li>
  653. </ul>
  654. </td>
  655. </tr>
  656. <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>
  657. </td>
  658. </tr>
  659. </tbody>
  660. </table>
  661. </dd></dl>
  662. <dl class="method">
  663. <dt id="alarmdecoder.devices.USBDevice.close">
  664. <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>
  665. <dd><p>Closes the device.</p>
  666. </dd></dl>
  667. <dl class="method">
  668. <dt id="alarmdecoder.devices.USBDevice.fileno">
  669. <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>
  670. <dd></dd></dl>
  671. <dl class="method">
  672. <dt id="alarmdecoder.devices.USBDevice.write">
  673. <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>
  674. <dd><p>Writes data to the device.</p>
  675. <table class="docutils field-list" frame="void" rules="none">
  676. <col class="field-name" />
  677. <col class="field-body" />
  678. <tbody valign="top">
  679. <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>
  680. </tr>
  681. <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>
  682. </tr>
  683. </tbody>
  684. </table>
  685. </dd></dl>
  686. <dl class="method">
  687. <dt id="alarmdecoder.devices.USBDevice.read">
  688. <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>
  689. <dd><p>Reads a single character from the device.</p>
  690. <table class="docutils field-list" frame="void" rules="none">
  691. <col class="field-name" />
  692. <col class="field-body" />
  693. <tbody valign="top">
  694. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  695. </tr>
  696. <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>
  697. </tr>
  698. </tbody>
  699. </table>
  700. </dd></dl>
  701. <dl class="method">
  702. <dt id="alarmdecoder.devices.USBDevice.read_line">
  703. <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>
  704. <dd><p>Reads a line from the device.</p>
  705. <table class="docutils field-list" frame="void" rules="none">
  706. <col class="field-name" />
  707. <col class="field-body" />
  708. <tbody valign="top">
  709. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  710. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  711. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  712. reading.</li>
  713. </ul>
  714. </td>
  715. </tr>
  716. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  717. </td>
  718. </tr>
  719. <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>
  720. </td>
  721. </tr>
  722. </tbody>
  723. </table>
  724. </dd></dl>
  725. <dl class="class">
  726. <dt id="alarmdecoder.devices.USBDevice.DetectThread">
  727. <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>
  728. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></p>
  729. <p>Thread that handles detection of added/removed devices.</p>
  730. <dl class="attribute">
  731. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_attached">
  732. <tt class="descname">on_attached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_attached" title="Permalink to this definition">¶</a></dt>
  733. <dd><p>This event is called when an <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device has been detected.</p>
  734. <p><strong>Callback definition:</strong> def callback(thread, device*</p>
  735. </dd></dl>
  736. <dl class="attribute">
  737. <dt id="alarmdecoder.devices.USBDevice.DetectThread.on_detached">
  738. <tt class="descname">on_detached</tt><a class="headerlink" href="#alarmdecoder.devices.USBDevice.DetectThread.on_detached" title="Permalink to this definition">¶</a></dt>
  739. <dd><p>This event is called when an <a class="reference external" href="http://www.alarmdecoder.com">AD2USB</a> device has been removed.</p>
  740. <p><strong>Callback definition:</strong> def callback(thread, device*</p>
  741. </dd></dl>
  742. <dl class="method">
  743. <dt id="alarmdecoder.devices.USBDevice.DetectThread.stop">
  744. <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>
  745. <dd><p>Stops the thread.</p>
  746. </dd></dl>
  747. <dl class="method">
  748. <dt id="alarmdecoder.devices.USBDevice.DetectThread.run">
  749. <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>
  750. <dd><p>The actual detection process.</p>
  751. </dd></dl>
  752. </dd></dl>
  753. </dd></dl>
  754. <dl class="class">
  755. <dt id="alarmdecoder.devices.SerialDevice">
  756. <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>
  757. <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>
  758. <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>
  759. <dl class="attribute">
  760. <dt id="alarmdecoder.devices.SerialDevice.BAUDRATE">
  761. <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>
  762. <dd><p>Default baudrate for Serial devices.</p>
  763. </dd></dl>
  764. <dl class="staticmethod">
  765. <dt id="alarmdecoder.devices.SerialDevice.find_all">
  766. <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>
  767. <dd><p>Returns all serial ports present.</p>
  768. <table class="docutils field-list" frame="void" rules="none">
  769. <col class="field-name" />
  770. <col class="field-body" />
  771. <tbody valign="top">
  772. <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>
  773. </tr>
  774. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of devices</td>
  775. </tr>
  776. <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>
  777. </tr>
  778. </tbody>
  779. </table>
  780. </dd></dl>
  781. <dl class="attribute">
  782. <dt id="alarmdecoder.devices.SerialDevice.interface">
  783. <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>
  784. <dd><p>Retrieves the interface used to connect to 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">Returns:</th><td class="field-body">interface used to connect to the device</td>
  790. </tr>
  791. </tbody>
  792. </table>
  793. </dd></dl>
  794. <dl class="method">
  795. <dt id="alarmdecoder.devices.SerialDevice.open">
  796. <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>
  797. <dd><p>Opens the device.</p>
  798. <table class="docutils field-list" frame="void" rules="none">
  799. <col class="field-name" />
  800. <col class="field-body" />
  801. <tbody valign="top">
  802. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  803. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use with the device</li>
  804. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically start the
  805. reader thread.</li>
  806. </ul>
  807. </td>
  808. </tr>
  809. <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>
  810. </td>
  811. </tr>
  812. </tbody>
  813. </table>
  814. </dd></dl>
  815. <dl class="method">
  816. <dt id="alarmdecoder.devices.SerialDevice.close">
  817. <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>
  818. <dd><p>Closes the device.</p>
  819. </dd></dl>
  820. <dl class="method">
  821. <dt id="alarmdecoder.devices.SerialDevice.fileno">
  822. <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>
  823. <dd></dd></dl>
  824. <dl class="method">
  825. <dt id="alarmdecoder.devices.SerialDevice.write">
  826. <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>
  827. <dd><p>Writes data to the device.</p>
  828. <table class="docutils field-list" frame="void" rules="none">
  829. <col class="field-name" />
  830. <col class="field-body" />
  831. <tbody valign="top">
  832. <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>
  833. </tr>
  834. <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body">py:class:<cite>~alarmdecoder.util.CommError</cite></td>
  835. </tr>
  836. </tbody>
  837. </table>
  838. </dd></dl>
  839. <dl class="method">
  840. <dt id="alarmdecoder.devices.SerialDevice.read">
  841. <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>
  842. <dd><p>Reads a single character from the device.</p>
  843. <table class="docutils field-list" frame="void" rules="none">
  844. <col class="field-name" />
  845. <col class="field-body" />
  846. <tbody valign="top">
  847. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  848. </tr>
  849. <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>
  850. </tr>
  851. </tbody>
  852. </table>
  853. </dd></dl>
  854. <dl class="method">
  855. <dt id="alarmdecoder.devices.SerialDevice.read_line">
  856. <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>
  857. <dd><p>Reads a line from the device.</p>
  858. <table class="docutils field-list" frame="void" rules="none">
  859. <col class="field-name" />
  860. <col class="field-body" />
  861. <tbody valign="top">
  862. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  863. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  864. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  865. reading.</li>
  866. </ul>
  867. </td>
  868. </tr>
  869. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  870. </td>
  871. </tr>
  872. <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>
  873. </td>
  874. </tr>
  875. </tbody>
  876. </table>
  877. </dd></dl>
  878. </dd></dl>
  879. <dl class="class">
  880. <dt id="alarmdecoder.devices.SocketDevice">
  881. <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>
  882. <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>
  883. <p>Device that supports communication with an <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) that is
  884. exposed via <a class="reference external" href="http://github.com/nutechsoftware/ser2sock">ser2sock</a> or another Serial to IP interface.</p>
  885. <dl class="attribute">
  886. <dt id="alarmdecoder.devices.SocketDevice.interface">
  887. <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>
  888. <dd><p>Retrieves the interface used to connect to the device.</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">interface used to connect to the device</td>
  894. </tr>
  895. </tbody>
  896. </table>
  897. </dd></dl>
  898. <dl class="attribute">
  899. <dt id="alarmdecoder.devices.SocketDevice.ssl">
  900. <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>
  901. <dd><p>Retrieves whether or not the device is using SSL.</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">whether or not the device is using SSL</td>
  907. </tr>
  908. </tbody>
  909. </table>
  910. </dd></dl>
  911. <dl class="attribute">
  912. <dt id="alarmdecoder.devices.SocketDevice.ssl_certificate">
  913. <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>
  914. <dd><p>Retrieves the SSL client certificate path 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">path to the certificate path or <tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.crypto.X509</span></tt></td>
  920. </tr>
  921. </tbody>
  922. </table>
  923. </dd></dl>
  924. <dl class="attribute">
  925. <dt id="alarmdecoder.devices.SocketDevice.ssl_key">
  926. <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>
  927. <dd><p>Retrieves the SSL client certificate key used for authentication.</p>
  928. <table class="docutils field-list" frame="void" rules="none">
  929. <col class="field-name" />
  930. <col class="field-body" />
  931. <tbody valign="top">
  932. <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>
  933. </tr>
  934. </tbody>
  935. </table>
  936. </dd></dl>
  937. <dl class="attribute">
  938. <dt id="alarmdecoder.devices.SocketDevice.ssl_ca">
  939. <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>
  940. <dd><p>Retrieves the SSL Certificate Authority certificate used for
  941. authentication.</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">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>
  947. </tr>
  948. </tbody>
  949. </table>
  950. </dd></dl>
  951. <dl class="method">
  952. <dt id="alarmdecoder.devices.SocketDevice.open">
  953. <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>
  954. <dd><p>Opens the device.</p>
  955. <table class="docutils field-list" frame="void" rules="none">
  956. <col class="field-name" />
  957. <col class="field-body" />
  958. <tbody valign="top">
  959. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  960. <li><strong>baudrate</strong> (<em>int</em>) &#8211; baudrate to use</li>
  961. <li><strong>no_reader_thread</strong> (<em>bool</em>) &#8211; whether or not to automatically open the reader
  962. thread.</li>
  963. </ul>
  964. </td>
  965. </tr>
  966. <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>
  967. </td>
  968. </tr>
  969. </tbody>
  970. </table>
  971. </dd></dl>
  972. <dl class="method">
  973. <dt id="alarmdecoder.devices.SocketDevice.close">
  974. <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>
  975. <dd><p>Closes the device.</p>
  976. </dd></dl>
  977. <dl class="method">
  978. <dt id="alarmdecoder.devices.SocketDevice.fileno">
  979. <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>
  980. <dd></dd></dl>
  981. <dl class="method">
  982. <dt id="alarmdecoder.devices.SocketDevice.write">
  983. <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>
  984. <dd><p>Writes data to the device.</p>
  985. <table class="docutils field-list" frame="void" rules="none">
  986. <col class="field-name" />
  987. <col class="field-body" />
  988. <tbody valign="top">
  989. <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>
  990. </tr>
  991. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">number of bytes sent</td>
  992. </tr>
  993. <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>
  994. </tr>
  995. </tbody>
  996. </table>
  997. </dd></dl>
  998. <dl class="method">
  999. <dt id="alarmdecoder.devices.SocketDevice.read">
  1000. <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>
  1001. <dd><p>Reads a single character from the device.</p>
  1002. <table class="docutils field-list" frame="void" rules="none">
  1003. <col class="field-name" />
  1004. <col class="field-body" />
  1005. <tbody valign="top">
  1006. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">character read from the device</td>
  1007. </tr>
  1008. <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>
  1009. </tr>
  1010. </tbody>
  1011. </table>
  1012. </dd></dl>
  1013. <dl class="method">
  1014. <dt id="alarmdecoder.devices.SocketDevice.read_line">
  1015. <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>
  1016. <dd><p>Reads a line from the device.</p>
  1017. <table class="docutils field-list" frame="void" rules="none">
  1018. <col class="field-name" />
  1019. <col class="field-body" />
  1020. <tbody valign="top">
  1021. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1022. <li><strong>timeout</strong> (<em>float</em>) &#8211; read timeout</li>
  1023. <li><strong>purge_buffer</strong> (<em>bool</em>) &#8211; Indicates whether to purge the buffer prior to
  1024. reading.</li>
  1025. </ul>
  1026. </td>
  1027. </tr>
  1028. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">line that was read</p>
  1029. </td>
  1030. </tr>
  1031. <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>
  1032. </td>
  1033. </tr>
  1034. </tbody>
  1035. </table>
  1036. </dd></dl>
  1037. </dd></dl>
  1038. </div>
  1039. <div class="section" id="module-alarmdecoder.messages">
  1040. <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>
  1041. <p>Message representations received from the panel through the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2)
  1042. devices.</p>
  1043. <ul class="simple">
  1044. <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>
  1045. <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>
  1046. <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>
  1047. <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>
  1048. </ul>
  1049. <dl class="class">
  1050. <dt id="alarmdecoder.messages.BaseMessage">
  1051. <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>
  1052. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1053. <p>Base class for messages.</p>
  1054. <dl class="attribute">
  1055. <dt id="alarmdecoder.messages.BaseMessage.raw">
  1056. <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>
  1057. <dd><p>The raw message text</p>
  1058. </dd></dl>
  1059. <dl class="attribute">
  1060. <dt id="alarmdecoder.messages.BaseMessage.timestamp">
  1061. <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>
  1062. <dd><p>The timestamp of the message</p>
  1063. </dd></dl>
  1064. <dl class="method">
  1065. <dt id="alarmdecoder.messages.BaseMessage.dict">
  1066. <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>
  1067. <dd><p>Dictionary representation.</p>
  1068. </dd></dl>
  1069. </dd></dl>
  1070. <dl class="class">
  1071. <dt id="alarmdecoder.messages.Message">
  1072. <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>
  1073. <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>
  1074. <p>Represents a message from the alarm panel.</p>
  1075. <dl class="attribute">
  1076. <dt id="alarmdecoder.messages.Message.ready">
  1077. <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>
  1078. <dd><p>Indicates whether or not the panel is in a ready state.</p>
  1079. </dd></dl>
  1080. <dl class="attribute">
  1081. <dt id="alarmdecoder.messages.Message.armed_away">
  1082. <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>
  1083. <dd><p>Indicates whether or not the panel is armed away.</p>
  1084. </dd></dl>
  1085. <dl class="attribute">
  1086. <dt id="alarmdecoder.messages.Message.armed_home">
  1087. <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>
  1088. <dd><p>Indicates whether or not the panel is armed home.</p>
  1089. </dd></dl>
  1090. <dl class="attribute">
  1091. <dt id="alarmdecoder.messages.Message.backlight_on">
  1092. <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>
  1093. <dd><p>Indicates whether or not the keypad backlight is on.</p>
  1094. </dd></dl>
  1095. <dl class="attribute">
  1096. <dt id="alarmdecoder.messages.Message.programming_mode">
  1097. <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>
  1098. <dd><p>Indicates whether or not we&#8217;re in programming mode.</p>
  1099. </dd></dl>
  1100. <dl class="attribute">
  1101. <dt id="alarmdecoder.messages.Message.beeps">
  1102. <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>
  1103. <dd><p>Number of beeps associated with a message.</p>
  1104. </dd></dl>
  1105. <dl class="attribute">
  1106. <dt id="alarmdecoder.messages.Message.zone_bypassed">
  1107. <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>
  1108. <dd><p>Indicates whether or not a zone is bypassed.</p>
  1109. </dd></dl>
  1110. <dl class="attribute">
  1111. <dt id="alarmdecoder.messages.Message.ac_power">
  1112. <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>
  1113. <dd><p>Indicates whether or not the panel is on AC power.</p>
  1114. </dd></dl>
  1115. <dl class="attribute">
  1116. <dt id="alarmdecoder.messages.Message.chime_on">
  1117. <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>
  1118. <dd><p>Indicates whether or not the chime is enabled.</p>
  1119. </dd></dl>
  1120. <dl class="attribute">
  1121. <dt id="alarmdecoder.messages.Message.alarm_event_occurred">
  1122. <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>
  1123. <dd><p>Indicates whether or not an alarm event has occurred.</p>
  1124. </dd></dl>
  1125. <dl class="attribute">
  1126. <dt id="alarmdecoder.messages.Message.alarm_sounding">
  1127. <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>
  1128. <dd><p>Indicates whether or not an alarm is sounding.</p>
  1129. </dd></dl>
  1130. <dl class="attribute">
  1131. <dt id="alarmdecoder.messages.Message.battery_low">
  1132. <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>
  1133. <dd><p>Indicates whether or not there is a low battery.</p>
  1134. </dd></dl>
  1135. <dl class="attribute">
  1136. <dt id="alarmdecoder.messages.Message.entry_delay_off">
  1137. <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>
  1138. <dd><p>Indicates whether or not the entry delay is enabled.</p>
  1139. </dd></dl>
  1140. <dl class="attribute">
  1141. <dt id="alarmdecoder.messages.Message.fire_alarm">
  1142. <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>
  1143. <dd><p>Indicates whether or not a fire alarm is sounding.</p>
  1144. </dd></dl>
  1145. <dl class="attribute">
  1146. <dt id="alarmdecoder.messages.Message.check_zone">
  1147. <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>
  1148. <dd><p>Indicates whether or not there are zones that require attention.</p>
  1149. </dd></dl>
  1150. <dl class="attribute">
  1151. <dt id="alarmdecoder.messages.Message.perimeter_only">
  1152. <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>
  1153. <dd><p>Indicates whether or not the perimeter is armed.</p>
  1154. </dd></dl>
  1155. <dl class="attribute">
  1156. <dt id="alarmdecoder.messages.Message.system_fault">
  1157. <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>
  1158. <dd><p>Indicates whether a system fault has occurred.</p>
  1159. </dd></dl>
  1160. <dl class="attribute">
  1161. <dt id="alarmdecoder.messages.Message.panel_type">
  1162. <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>
  1163. <dd><p>Indicates which panel type was the source of this message.</p>
  1164. </dd></dl>
  1165. <dl class="attribute">
  1166. <dt id="alarmdecoder.messages.Message.numeric_code">
  1167. <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>
  1168. <dd><p>The numeric code associated with the message.</p>
  1169. </dd></dl>
  1170. <dl class="attribute">
  1171. <dt id="alarmdecoder.messages.Message.text">
  1172. <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>
  1173. <dd><p>The human-readable text to be displayed on the panel LCD.</p>
  1174. </dd></dl>
  1175. <dl class="attribute">
  1176. <dt id="alarmdecoder.messages.Message.cursor_location">
  1177. <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>
  1178. <dd><p>Current cursor location on the keypad.</p>
  1179. </dd></dl>
  1180. <dl class="attribute">
  1181. <dt id="alarmdecoder.messages.Message.mask">
  1182. <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>
  1183. <dd><p>Address mask this message is intended for.</p>
  1184. </dd></dl>
  1185. <dl class="attribute">
  1186. <dt id="alarmdecoder.messages.Message.bitfield">
  1187. <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>
  1188. <dd><p>The bitfield associated with this message.</p>
  1189. </dd></dl>
  1190. <dl class="attribute">
  1191. <dt id="alarmdecoder.messages.Message.panel_data">
  1192. <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>
  1193. <dd><p>The panel data field associated with this message.</p>
  1194. </dd></dl>
  1195. <dl class="method">
  1196. <dt id="alarmdecoder.messages.Message.dict">
  1197. <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>
  1198. <dd><p>Dictionary representation.</p>
  1199. </dd></dl>
  1200. </dd></dl>
  1201. <dl class="class">
  1202. <dt id="alarmdecoder.messages.ExpanderMessage">
  1203. <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>
  1204. <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>
  1205. <p>Represents a message from a zone or relay expansion module.</p>
  1206. <dl class="attribute">
  1207. <dt id="alarmdecoder.messages.ExpanderMessage.ZONE">
  1208. <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>
  1209. <dd><p>Flag indicating that the expander message relates to a Zone Expander.</p>
  1210. </dd></dl>
  1211. <dl class="attribute">
  1212. <dt id="alarmdecoder.messages.ExpanderMessage.RELAY">
  1213. <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>
  1214. <dd><p>Flag indicating that the expander message relates to a Relay Expander.</p>
  1215. </dd></dl>
  1216. <dl class="attribute">
  1217. <dt id="alarmdecoder.messages.ExpanderMessage.type">
  1218. <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>
  1219. <dd><p>Expander message type: ExpanderMessage.ZONE or ExpanderMessage.RELAY</p>
  1220. </dd></dl>
  1221. <dl class="attribute">
  1222. <dt id="alarmdecoder.messages.ExpanderMessage.address">
  1223. <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>
  1224. <dd><p>Address of expander</p>
  1225. </dd></dl>
  1226. <dl class="attribute">
  1227. <dt id="alarmdecoder.messages.ExpanderMessage.channel">
  1228. <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>
  1229. <dd><p>Channel on the expander</p>
  1230. </dd></dl>
  1231. <dl class="attribute">
  1232. <dt id="alarmdecoder.messages.ExpanderMessage.value">
  1233. <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>
  1234. <dd><p>Value associated with the message</p>
  1235. </dd></dl>
  1236. <dl class="method">
  1237. <dt id="alarmdecoder.messages.ExpanderMessage.dict">
  1238. <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>
  1239. <dd><p>Dictionary representation.</p>
  1240. </dd></dl>
  1241. </dd></dl>
  1242. <dl class="class">
  1243. <dt id="alarmdecoder.messages.RFMessage">
  1244. <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>
  1245. <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>
  1246. <p>Represents a message from an RF receiver.</p>
  1247. <dl class="attribute">
  1248. <dt id="alarmdecoder.messages.RFMessage.serial_number">
  1249. <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>
  1250. <dd><p>Serial number of the RF device.</p>
  1251. </dd></dl>
  1252. <dl class="attribute">
  1253. <dt id="alarmdecoder.messages.RFMessage.value">
  1254. <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>
  1255. <dd><p>Value associated with this message.</p>
  1256. </dd></dl>
  1257. <dl class="attribute">
  1258. <dt id="alarmdecoder.messages.RFMessage.battery">
  1259. <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>
  1260. <dd><p>Low battery indication</p>
  1261. </dd></dl>
  1262. <dl class="attribute">
  1263. <dt id="alarmdecoder.messages.RFMessage.supervision">
  1264. <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>
  1265. <dd><p>Supervision required indication</p>
  1266. </dd></dl>
  1267. <dl class="attribute">
  1268. <dt id="alarmdecoder.messages.RFMessage.loop">
  1269. <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>
  1270. <dd><p>Loop indicators</p>
  1271. </dd></dl>
  1272. <dl class="method">
  1273. <dt id="alarmdecoder.messages.RFMessage.dict">
  1274. <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>
  1275. <dd><p>Dictionary representation.</p>
  1276. </dd></dl>
  1277. </dd></dl>
  1278. <dl class="class">
  1279. <dt id="alarmdecoder.messages.LRRMessage">
  1280. <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>
  1281. <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>
  1282. <p>Represent a message from a Long Range Radio.</p>
  1283. <dl class="attribute">
  1284. <dt id="alarmdecoder.messages.LRRMessage.event_data">
  1285. <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>
  1286. <dd><p>Data associated with the LRR message. Usually user ID or zone.</p>
  1287. </dd></dl>
  1288. <dl class="attribute">
  1289. <dt id="alarmdecoder.messages.LRRMessage.partition">
  1290. <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>
  1291. <dd><p>The partition that this message applies to.</p>
  1292. </dd></dl>
  1293. <dl class="attribute">
  1294. <dt id="alarmdecoder.messages.LRRMessage.event_type">
  1295. <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>
  1296. <dd><p>The type of the event that occurred.</p>
  1297. </dd></dl>
  1298. <dl class="method">
  1299. <dt id="alarmdecoder.messages.LRRMessage.dict">
  1300. <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>
  1301. <dd><p>Dictionary representation.</p>
  1302. </dd></dl>
  1303. </dd></dl>
  1304. </div>
  1305. <div class="section" id="module-alarmdecoder.zonetracking">
  1306. <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>
  1307. <p>Provides zone tracking functionality for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) device family.</p>
  1308. <dl class="class">
  1309. <dt id="alarmdecoder.zonetracking.Zone">
  1310. <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>, <em>expander=False</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>
  1311. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1312. <p>Representation of a panel zone.</p>
  1313. <dl class="attribute">
  1314. <dt id="alarmdecoder.zonetracking.Zone.CLEAR">
  1315. <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>
  1316. <dd><p>Status indicating that the zone is cleared.</p>
  1317. </dd></dl>
  1318. <dl class="attribute">
  1319. <dt id="alarmdecoder.zonetracking.Zone.FAULT">
  1320. <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>
  1321. <dd><p>Status indicating that the zone is faulted.</p>
  1322. </dd></dl>
  1323. <dl class="attribute">
  1324. <dt id="alarmdecoder.zonetracking.Zone.CHECK">
  1325. <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>
  1326. <dd><p>Status indicating that there is a wiring issue with the zone.</p>
  1327. </dd></dl>
  1328. <dl class="attribute">
  1329. <dt id="alarmdecoder.zonetracking.Zone.STATUS">
  1330. <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>
  1331. <dd></dd></dl>
  1332. <dl class="attribute">
  1333. <dt id="alarmdecoder.zonetracking.Zone.zone">
  1334. <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>
  1335. <dd><p>Zone ID</p>
  1336. </dd></dl>
  1337. <dl class="attribute">
  1338. <dt id="alarmdecoder.zonetracking.Zone.name">
  1339. <tt class="descname">name</tt><em class="property"> = ''</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.name" title="Permalink to this definition">¶</a></dt>
  1340. <dd><p>Zone name</p>
  1341. </dd></dl>
  1342. <dl class="attribute">
  1343. <dt id="alarmdecoder.zonetracking.Zone.status">
  1344. <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>
  1345. <dd><p>Zone status</p>
  1346. </dd></dl>
  1347. <dl class="attribute">
  1348. <dt id="alarmdecoder.zonetracking.Zone.timestamp">
  1349. <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>
  1350. <dd><p>Timestamp of last update</p>
  1351. </dd></dl>
  1352. <dl class="attribute">
  1353. <dt id="alarmdecoder.zonetracking.Zone.expander">
  1354. <tt class="descname">expander</tt><em class="property"> = False</em><a class="headerlink" href="#alarmdecoder.zonetracking.Zone.expander" title="Permalink to this definition">¶</a></dt>
  1355. <dd><p>Does this zone exist on an expander?</p>
  1356. </dd></dl>
  1357. </dd></dl>
  1358. <dl class="class">
  1359. <dt id="alarmdecoder.zonetracking.Zonetracker">
  1360. <em class="property">class </em><tt class="descclassname">alarmdecoder.zonetracking.</tt><tt class="descname">Zonetracker</tt><big>(</big><em>alarmdecoder_object</em><big>)</big><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>
  1361. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1362. <p>Handles tracking of zones and their statuses.</p>
  1363. <dl class="attribute">
  1364. <dt id="alarmdecoder.zonetracking.Zonetracker.on_fault">
  1365. <tt class="descname">on_fault</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_fault" title="Permalink to this definition">¶</a></dt>
  1366. <dd><p>This event is called when the device detects a zone fault.</p>
  1367. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  1368. </dd></dl>
  1369. <dl class="attribute">
  1370. <dt id="alarmdecoder.zonetracking.Zonetracker.on_restore">
  1371. <tt class="descname">on_restore</tt><a class="headerlink" href="#alarmdecoder.zonetracking.Zonetracker.on_restore" title="Permalink to this definition">¶</a></dt>
  1372. <dd><p>This event is called when the device detects that a fault is restored.</p>
  1373. <p><strong>Callback definition:</strong> <em>def callback(device, zone)</em></p>
  1374. </dd></dl>
  1375. <dl class="attribute">
  1376. <dt id="alarmdecoder.zonetracking.Zonetracker.EXPIRE">
  1377. <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>
  1378. <dd><p>Zone expiration timeout.</p>
  1379. </dd></dl>
  1380. <dl class="attribute">
  1381. <dt id="alarmdecoder.zonetracking.Zonetracker.zones">
  1382. <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>
  1383. <dd><p>Returns the current list of zones being tracked.</p>
  1384. <table class="docutils field-list" frame="void" rules="none">
  1385. <col class="field-name" />
  1386. <col class="field-body" />
  1387. <tbody valign="top">
  1388. <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>
  1389. </tr>
  1390. </tbody>
  1391. </table>
  1392. </dd></dl>
  1393. <dl class="attribute">
  1394. <dt id="alarmdecoder.zonetracking.Zonetracker.faulted">
  1395. <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>
  1396. <dd><p>Retrieves the current list of faulted zones.</p>
  1397. <table class="docutils field-list" frame="void" rules="none">
  1398. <col class="field-name" />
  1399. <col class="field-body" />
  1400. <tbody valign="top">
  1401. <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of faulted zones</td>
  1402. </tr>
  1403. </tbody>
  1404. </table>
  1405. </dd></dl>
  1406. <dl class="method">
  1407. <dt id="alarmdecoder.zonetracking.Zonetracker.update">
  1408. <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>
  1409. <dd><p>Update zone statuses based on the current message.</p>
  1410. <table class="docutils field-list" frame="void" rules="none">
  1411. <col class="field-name" />
  1412. <col class="field-body" />
  1413. <tbody valign="top">
  1414. <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>
  1415. </tr>
  1416. </tbody>
  1417. </table>
  1418. </dd></dl>
  1419. <dl class="method">
  1420. <dt id="alarmdecoder.zonetracking.Zonetracker.expander_to_zone">
  1421. <tt class="descname">expander_to_zone</tt><big>(</big><em>address</em>, <em>channel</em>, <em>panel_type=0</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>
  1422. <dd><p>Convert an address and channel into a zone number.</p>
  1423. <table class="docutils field-list" frame="void" rules="none">
  1424. <col class="field-name" />
  1425. <col class="field-body" />
  1426. <tbody valign="top">
  1427. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1428. <li><strong>address</strong> (<em>int</em>) &#8211; expander address</li>
  1429. <li><strong>channel</strong> (<em>int</em>) &#8211; channel</li>
  1430. </ul>
  1431. </td>
  1432. </tr>
  1433. <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>
  1434. </td>
  1435. </tr>
  1436. </tbody>
  1437. </table>
  1438. </dd></dl>
  1439. </dd></dl>
  1440. </div>
  1441. <div class="section" id="module-alarmdecoder.util">
  1442. <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>
  1443. <p>Provides utility classes for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> (AD2) devices.</p>
  1444. <dl class="exception">
  1445. <dt id="alarmdecoder.util.NoDeviceError">
  1446. <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>
  1447. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1448. <p>No devices found.</p>
  1449. </dd></dl>
  1450. <dl class="exception">
  1451. <dt id="alarmdecoder.util.CommError">
  1452. <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>
  1453. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1454. <p>There was an error communicating with the device.</p>
  1455. </dd></dl>
  1456. <dl class="exception">
  1457. <dt id="alarmdecoder.util.TimeoutError">
  1458. <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>
  1459. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1460. <p>There was a timeout while trying to communicate with the device.</p>
  1461. </dd></dl>
  1462. <dl class="exception">
  1463. <dt id="alarmdecoder.util.InvalidMessageError">
  1464. <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>
  1465. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
  1466. <p>The format of the panel message was invalid.</p>
  1467. </dd></dl>
  1468. <dl class="class">
  1469. <dt id="alarmdecoder.util.Firmware">
  1470. <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>
  1471. <dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
  1472. <p>Represents firmware for the <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> devices.</p>
  1473. <dl class="attribute">
  1474. <dt id="alarmdecoder.util.Firmware.STAGE_START">
  1475. <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>
  1476. <dd></dd></dl>
  1477. <dl class="attribute">
  1478. <dt id="alarmdecoder.util.Firmware.STAGE_WAITING">
  1479. <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>
  1480. <dd></dd></dl>
  1481. <dl class="attribute">
  1482. <dt id="alarmdecoder.util.Firmware.STAGE_BOOT">
  1483. <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>
  1484. <dd></dd></dl>
  1485. <dl class="attribute">
  1486. <dt id="alarmdecoder.util.Firmware.STAGE_LOAD">
  1487. <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>
  1488. <dd></dd></dl>
  1489. <dl class="attribute">
  1490. <dt id="alarmdecoder.util.Firmware.STAGE_UPLOADING">
  1491. <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>
  1492. <dd></dd></dl>
  1493. <dl class="attribute">
  1494. <dt id="alarmdecoder.util.Firmware.STAGE_DONE">
  1495. <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>
  1496. <dd></dd></dl>
  1497. <dl class="staticmethod">
  1498. <dt id="alarmdecoder.util.Firmware.upload">
  1499. <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>
  1500. <dd><p>Uploads firmware to an <a class="reference external" href="http://www.alarmdecoder.com">AlarmDecoder</a> device.</p>
  1501. <table class="docutils field-list" frame="void" rules="none">
  1502. <col class="field-name" />
  1503. <col class="field-body" />
  1504. <tbody valign="top">
  1505. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  1506. <li><strong>filename</strong> (<em>string</em>) &#8211; firmware filename</li>
  1507. <li><strong>progress_callback</strong> (<em>function</em>) &#8211; callback function used to report progress</li>
  1508. </ul>
  1509. </td>
  1510. </tr>
  1511. <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>
  1512. </td>
  1513. </tr>
  1514. </tbody>
  1515. </table>
  1516. </dd></dl>
  1517. </dd></dl>
  1518. </div>
  1519. <div class="section" id="module-alarmdecoder.panels">
  1520. <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>
  1521. <p>Representations of Panels and their templates.</p>
  1522. </div>
  1523. </div>
  1524. </div>
  1525. </div>
  1526. </div>
  1527. <div class="sphinxsidebar">
  1528. <div class="sphinxsidebarwrapper">
  1529. <h3><a href="index.html">Table Of Contents</a></h3>
  1530. <ul>
  1531. <li><a class="reference internal" href="#">alarmdecoder Package</a><ul>
  1532. <li><a class="reference internal" href="#module-alarmdecoder.decoder"><tt class="docutils literal"><span class="pre">decoder</span></tt> Module</a></li>
  1533. <li><a class="reference internal" href="#module-alarmdecoder.devices"><tt class="docutils literal"><span class="pre">devices</span></tt> Module</a></li>
  1534. <li><a class="reference internal" href="#module-alarmdecoder.messages"><tt class="docutils literal"><span class="pre">messages</span></tt> Module</a></li>
  1535. <li><a class="reference internal" href="#module-alarmdecoder.zonetracking"><tt class="docutils literal"><span class="pre">zonetracking</span></tt> Module</a></li>
  1536. <li><a class="reference internal" href="#module-alarmdecoder.util"><tt class="docutils literal"><span class="pre">util</span></tt> Module</a></li>
  1537. <li><a class="reference internal" href="#module-alarmdecoder.panels"><tt class="docutils literal"><span class="pre">panels</span></tt> Module</a></li>
  1538. </ul>
  1539. </li>
  1540. </ul>
  1541. <h4>Previous topic</h4>
  1542. <p class="topless"><a href="index.html"
  1543. title="previous chapter">Welcome to Alarm Decoder&#8217;s documentation!</a></p>
  1544. <h3>This Page</h3>
  1545. <ul class="this-page-menu">
  1546. <li><a href="_sources/alarmdecoder.txt"
  1547. rel="nofollow">Show Source</a></li>
  1548. </ul>
  1549. <div id="searchbox" style="display: none">
  1550. <h3>Quick search</h3>
  1551. <form class="search" action="search.html" method="get">
  1552. <input type="text" name="q" />
  1553. <input type="submit" value="Go" />
  1554. <input type="hidden" name="check_keywords" value="yes" />
  1555. <input type="hidden" name="area" value="default" />
  1556. </form>
  1557. <p class="searchtip" style="font-size: 90%">
  1558. Enter search terms or a module, class or function name.
  1559. </p>
  1560. </div>
  1561. <script type="text/javascript">$('#searchbox').show(0);</script>
  1562. </div>
  1563. </div>
  1564. <div class="clearer"></div>
  1565. </div>
  1566. <div class="related">
  1567. <h3>Navigation</h3>
  1568. <ul>
  1569. <li class="right" style="margin-right: 10px">
  1570. <a href="genindex.html" title="General Index"
  1571. >index</a></li>
  1572. <li class="right" >
  1573. <a href="py-modindex.html" title="Python Module Index"
  1574. >modules</a> |</li>
  1575. <li class="right" >
  1576. <a href="index.html" title="Welcome to Alarm Decoder’s documentation!"
  1577. >previous</a> |</li>
  1578. <li><a href="index.html">alarmdecoder documentation</a> &raquo;</li>
  1579. </ul>
  1580. </div>
  1581. <div class="footer">
  1582. &copy; Copyright 2013, Nu Tech Software Solutions, Inc..
  1583. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
  1584. </div>
  1585. </body>
  1586. </html>