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.

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