├── .gitignore
├── LICENSE.md
├── README.md
├── app.js
├── bin
└── www
├── config
├── default.example.json
└── production.example.json
├── exampleConfigs
├── lircRemotes
│ ├── CableBox.conf
│ ├── MagnavoxDvd.conf
│ ├── SamsungTv.conf
│ └── VizioTv.conf
└── nodeJsConfig
│ ├── default.json
│ └── production.json
├── kicad
└── RaspberryPiIrLedDriver.zip
├── package-lock.json
├── package.json
├── public
├── javascripts
│ └── lircNodeJsWeb.js
└── stylesheets
│ └── style.css
├── routes
└── index.js
└── views
├── cable.pug
├── deviceSelect.pug
├── dvd.pug
├── error.pug
├── index.pug
├── layout.pug
└── tv.pug
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # node-waf configuration
20 | .lock-wscript
21 |
22 | # Compiled binary addons (http://nodejs.org/api/addons.html)
23 | build/Release
24 |
25 | # Dependency directory
26 | # https://docs.npmjs.com/cli/shrinkwrap#caveats
27 | node_modules
28 |
29 | # Debug log from npm
30 | npm-debug.log
31 |
32 | # user config
33 | config/default.json
34 | config/production.json
35 |
36 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # LIRC Node.js Web
2 |
3 | By bbtinkerer ()
4 |
5 | ## Description
6 |
7 | Web based universal IR remote controller using [LIRC](http://www.lirc.org) and [Node.js](https://nodejs.org/en/). Control your TV, cable box, media center, and pretty much anything that has an IR remote control from your computers', tablets', phones' browser. Also define your own macros so you can turn on all devices in one button. Make a dumb TV almost act like a smart TV by writing macros to go to different inputs. Not sure what sound level someone left the speakers at? Write a macro to turn on the device and spam the mute key for a second or two.
8 |
9 | ## Requirements
10 |
11 | * [LIRC](http://www.lirc.org) - Follow instructions from the web to install and setup on your system.
12 | * [Node.js](https://nodejs.org/en/) - Ensure at least 9.3.0 Node.js is installed. I used [audstanley's](http://www.audstanley.com/) scripts at [NodeJs-Raspberry-Pi ](https://github.com/audstanley/NodeJs-Raspberry-Pi/) to install the latest Node.js. Follow the README.md for instructions on using his script.
13 | * [nodemon](https://nodemon.io/) - A utility that will monitor for any changes in your source and automatically restart your Node.js server. This is good when you are setting up and making your layout.
14 |
15 | ## Installation
16 |
17 | Clone this project to /home/pi/nodejs/LircNodeJsWeb, download required depencencies, and copy the example config files.
18 |
19 | ```bash
20 | cd ~
21 | mkdir nodejs
22 | cd nodejs
23 | git clone https://github.com/bbtinkerer/LircNodeJsWeb.git
24 | cd LircNodeJsWeb/config/
25 | cp default.example.json default.json
26 | cp production.example.json production.json
27 | cd ..
28 | npm install
29 | ```
30 |
31 | Start the server and view the website in a browser (should be http://RaspberryPi_IP/) to ensure everything was installed correctly. The site will be a little slow due to that is not running in production mode (see Usage section to set to production mode for better performance). Note: Need to use sudo when listening on port 80.
32 |
33 | ```bash
34 | sudo PORT=80 npm start
35 | ```
36 |
37 | You should see a page that resembles a TV remote control. If you see the page, that means all the necessary dependencies are installed. If not, recheck all the steps from above.
38 |
39 | ## Configuration
40 |
41 | ### LIRC Remote Configuration
42 |
43 | Follow the LIRC instructions on creating configuratin files for your remotes with one caveat, all buttons with "KEY_". This makes life easier to map LIRC remote buttons to the buttons on the website. Run irrecord with '--disable-namespace' so you can name all your buttons starting with "KEY_".
44 |
45 | Example excerpt from an LIRC remote configuration file
46 |
47 | ```
48 | ...
49 | KEY_POWER 0x40BF
50 | KEY_TV 0xD827
51 | KEY_VOLUME_UP 0x264F
52 | KEY_WHATEVER 0x35AD
53 | ...
54 | ```
55 |
56 | ### Node.js config file
57 |
58 | Configuration files are in the config folder. The files are:
59 | * default.json - Main configuration file to control what is displayed, map device buttons to correct template file, and define macros.
60 | * production.json - Empty but needed when running in production mode.
61 |
62 | The website is split into 3 sections.
63 | * Header - Displays current device.
64 | * Device Selection - Used to select a different device.
65 | * Remote Buttons - The buttons of the remote controller.
66 |
67 | You will need to edit default.json to configure the Device Selection section. Following is an example of the default.json file included with the project.
68 |
69 | ```json
70 | {
71 | "devices":{
72 | "tv":{
73 | "title": "TV - Samsung",
74 | "label": "TV",
75 | "device": "SamsungTv"
76 | },
77 | "dvd":{
78 | "title": "DVD - Magnavox",
79 | "label": "DVD",
80 | "device": "MagnavoxDvd"
81 | },
82 | "cable":{
83 | "title": "Cable Box",
84 | "label": "CABLE",
85 | "device": "CableBox"
86 | }
87 | },
88 | "macros":{
89 | "watch_tv": [
90 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_POWER" },
91 | { "device": "cable", "directive": "SEND_ONCE", "key": "KEY_POWER" }
92 | ],
93 | "game_input":[
94 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV", "delay": 1000 },
95 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
96 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
97 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
98 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
99 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE" },
100 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER"}
101 | ],
102 | "toon_tv":[
103 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV" },
104 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_3" },
105 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_5" },
106 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER" }
107 | ]
108 | }
109 | }
110 | ```
111 |
112 | Here is my try at the schema for the configuration file, hopefully it makes sense. You should be able to deduce from the example above what each setting does by running the project and seeing what is on screen and in the URL of the browser.
113 |
114 | ```json
115 | {
116 | "$schema": "http://json-schema.org/draft-06/schema#",
117 | "title": "Devices Configuration",
118 | "type": "object",
119 | "required": ["devices"],
120 | "properties":{
121 | "devices":{
122 | "patternProperties": {
123 | "[A-Za-z]+":{
124 | "title": "Device",
125 | "type": "object",
126 | "required": ["title", "label", "device"],
127 | "properties": {
128 | "title":{
129 | "description": "Text to display in the Header section after selecting a device.",
130 | "type": "string"
131 | },
132 | "label": {
133 | "description": "Text to display on the Device Selection button.",
134 | "type": "string"
135 | },
136 | "device": {
137 | "description": "The name used in the LIRC configuration file for the device.",
138 | "type": "string"
139 | }
140 | }
141 | }
142 | },
143 | "description": "Property denotes the type of device and the .pug filename to use for the device."
144 | },
145 | "macros":{
146 | "patternProperties": {
147 | "[A-Za-z]+":{
148 | "title": "Macro",
149 | "type": "array",
150 | "items": {
151 | "type": "object",
152 | "required": ["device", "directive", "key"],
153 | "properties":{
154 | "device": {
155 | "description": "The name used in the LIRC configuration file for the device.",
156 | "type": "string"
157 | },
158 | "directive": {
159 | "description": "Directive to give to irsend.",
160 | "type": "string"
161 | },
162 | "key": {
163 | "description": "Button to press",
164 | "type": "string"
165 | },
166 | "delay": {
167 | "description": "Time in milliseconds to wait after executing irsend command.",
168 | "type": "string"
169 | }
170 | }
171 | }
172 | }
173 | }
174 | }
175 | }
176 | }
177 | ```
178 |
179 | ### Device Buttons Layout Files
180 |
181 | This project uses the [pug](https://pugjs.org/api/getting-started.html) engine for templates. There is a pug file (contents detailed in the next section) for each device type specified in the default.json configuration file. For example, there are three pug files included with the project.
182 | * tv.pug
183 | * dvd.pug
184 | * cable.pug
185 |
186 | To add a new device such as a media player, add a new entry into default.json and create a pug file in the views folder.
187 |
188 | For example: Add entry to default.json
189 | ```json
190 | {
191 | "devices":{
192 | "tv":{
193 | "title": "TV - Samsung",
194 | "label": "TV",
195 | "device": "SamsungTv"
196 | },
197 | "dvd":{
198 | "title": "DVD - Magnavox",
199 | "label": "DVD",
200 | "device": "MagnavoxDvd"
201 | },
202 | "cable":{
203 | "title": "Cable Box",
204 | "label": "CABLE",
205 | "device": "CableBox"
206 | },
207 | "media":{
208 | "title": "Kodi",
209 | "label": "KODI",
210 | "device": "kodi"
211 | }
212 | }
213 | }
214 | ```
215 | Then for ease, just copy an existing layout for now.
216 |
217 | ```
218 | cd ~/nodejs/LircNodeJsWeb/views
219 | cp tv.pug media.pug
220 | ```
221 |
222 | Nodemon should be running and will pick up your changes. Refresh your browser page and you should see the new device in the selection area and the button layout is a copy of the tv button layout.
223 |
224 | #### Button Template Layout
225 |
226 | The project uses [Bootstrap](https://getbootstrap.com/) to style pages. You don't have to use Bootstrap and can roll your own styling. Bootstrap is great in that you can style for almost any screen size.
227 |
228 | Use the remote button names in the LIRC configuration file as the ID for your buttons. As mentioned earlier, all buttons must be prefixed with "KEY_".
229 |
230 | If you need to access another device from the current layout, prefix the button name with "ALT_device_" where device is the name of the device.
231 |
232 | For example a cable box does not have volume controls but you want volume control of the TV on the cable box layout. The ID for the volume up button would be "ALT_tv_KEY_VOLUME_UP" in the cable.pug file.
233 |
234 | ##### Test Button Mapping
235 |
236 | Open your browser's development tools console while viewing the site. Clicking on a button should show something along the line of "{result: "success"}" when the button is correctly mapped to an LIRC remote button.
237 |
238 | An error will show something like "{result: "unknown command: "KEY_DASH""}". That means there is no button named "KEY_DASH" in the LIRC configuration file for that device. Either update your template file or the LIRC configuration file.
239 |
240 | ### Macros
241 | Macros allow you to sequence any number of commands. Define macros in default.json in the macro section. A macro is defined by naming the macro and giving it an array of command options. You can add a delay in milliseconds before executing the next command. This is handy for some devices that take some time to process before accepting more commands. For example, my TV needs to think a bit when the source button has been pressed before the TV will respond again to any other button.
242 |
243 | Following is the sample macros included in the project:
244 |
245 | ```json
246 | ...
247 | "macros":{
248 | "watch_tv": [
249 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_POWER" },
250 | { "device": "cable", "directive": "SEND_ONCE", "key": "KEY_POWER" }
251 | ],
252 | "game_input":[
253 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV", "delay": 1000 },
254 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
255 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
256 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
257 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
258 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE" },
259 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER"}
260 | ],
261 | "toon_tv":[
262 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV" },
263 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_3" },
264 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_5" },
265 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER" }
266 | ]
267 | }
268 | ...
269 | ```
270 |
271 | #### Executing Macros
272 | To execute a macro from your page, give the button ID the value of the macro name prefixed with 'MACRO_'. For example "MACRO_watch_tv", "MACRO_game_input", and "MACRO_toon_tv".
273 |
274 | ## Usage
275 |
276 | ### Development
277 |
278 | The project by default uses nodemon to pick up your changes to automatically restart the server. You will notice the site runs a bit slow in this mode. This is really noticeable on Pi Zero as compared to the Pi 3.
279 |
280 | Start the server with:
281 |
282 | ```bash
283 | sudo PORT=80 npm start
284 | ```
285 |
286 | ### Production
287 |
288 | Running the server in production mode makes the site run way faster. The initial startup for each page will feel just as slow as development but all following requests will be much faster. I could barely tell the difference of the site performance between the Pi Zero and the Pi 3.
289 |
290 | Update package.json to use plain old Node.js and not nodemon. Update the scripts section in package.json.
291 |
292 | Change
293 | ```json
294 | "scripts": {
295 | "start": "/opt/nodejs/bin/nodemon ./bin/www"
296 | },
297 | ```
298 |
299 | To
300 | ```json
301 | "scripts": {
302 | "start": "node ./bin/www"
303 | },
304 | ```
305 |
306 | Start the server with:
307 |
308 | ```bash
309 | sudo PORT=80 NODE_ENV=production npm start
310 | ```
311 |
312 | ### Start on boot up
313 |
314 | Sorry, this section is best up to searching the web as different operating systems have different setup and settings.
315 |
316 | ## Known Issues
317 |
318 | If you discover any bugs, feel free to create an issue on GitHub fork and
319 | send a pull request.
320 |
321 |
322 | ## Authors
323 |
324 | * bbtinkerer (https://github.com/bbtinkerer/)
325 |
326 |
327 | ## Contributing
328 |
329 | 1. Fork it
330 | 2. Create your feature branch (`git checkout -b my-new-feature`)
331 | 3. Commit your changes (`git commit -am 'Add some feature'`)
332 | 4. Push to the branch (`git push origin my-new-feature`)
333 | 5. Create new Pull Request
334 |
335 |
336 | ## License
337 |
338 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
339 |
340 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
341 |
342 | You should have received a copy of the GNU General Public License along with this program. If not, see .
343 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var path = require('path');
3 | var favicon = require('serve-favicon');
4 | var logger = require('morgan');
5 | var cookieParser = require('cookie-parser');
6 | var bodyParser = require('body-parser');
7 |
8 | var index = require('./routes/index');
9 |
10 | var config = require('config');
11 |
12 | var app = express();
13 |
14 | // view engine setup
15 | app.set('views', path.join(__dirname, 'views'));
16 | app.set('view engine', 'pug');
17 |
18 | // uncomment after placing your favicon in /public
19 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
20 | app.use(logger('dev'));
21 | app.use(bodyParser.json());
22 | app.use(bodyParser.urlencoded({ extended: false }));
23 | app.use(cookieParser());
24 | app.use(express.static(path.join(__dirname, 'public')));
25 |
26 | app.use('/', index);
27 |
28 | // prepare server
29 | app.use('/js', express.static(__dirname + '/node_modules/bootstrap/dist/js')); // redirect bootstrap JS
30 | app.use('/js', express.static(__dirname + '/node_modules/jquery/dist')); // redirect JS jQuery
31 | app.use('/js', express.static(__dirname + '/public/javascripts'));
32 | app.use('/css', express.static(__dirname + '/node_modules/bootstrap/dist/css'));
33 | app.use('/fonts', express.static(__dirname + '/node_modules/bootstrap/dist/fonts'));
34 |
35 | // catch 404 and forward to error handler
36 | app.use(function(req, res, next) {
37 | var err = new Error('Not Found');
38 | err.status = 404;
39 | next(err);
40 | });
41 |
42 | // error handler
43 | app.use(function(err, req, res, next) {
44 | // set locals, only providing error in development
45 | res.locals.message = err.message;
46 | res.locals.error = req.app.get('env') === 'development' ? err : {};
47 |
48 | // render the error page
49 | res.status(err.status || 500);
50 | res.render('error');
51 | });
52 |
53 | // global objects to use
54 | app.locals.devices = config.get('devices');
55 | app.locals.colWidth = Math.floor(12 / Object.keys(app.locals.devices).length);
56 |
57 | module.exports = app;
58 |
--------------------------------------------------------------------------------
/bin/www:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /**
4 | * Module dependencies.
5 | */
6 |
7 | var app = require('../app');
8 | var debug = require('debug')('lircnodejsweb:server');
9 | var http = require('http');
10 |
11 | /**
12 | * Get port from environment and store in Express.
13 | */
14 |
15 | var port = normalizePort(process.env.PORT || '3000');
16 | app.set('port', port);
17 |
18 | /**
19 | * Create HTTP server.
20 | */
21 |
22 | var server = http.createServer(app);
23 |
24 | /**
25 | * Listen on provided port, on all network interfaces.
26 | */
27 |
28 | server.listen(port);
29 | server.on('error', onError);
30 | server.on('listening', onListening);
31 |
32 | /**
33 | * Normalize a port into a number, string, or false.
34 | */
35 |
36 | function normalizePort(val) {
37 | var port = parseInt(val, 10);
38 |
39 | if (isNaN(port)) {
40 | // named pipe
41 | return val;
42 | }
43 |
44 | if (port >= 0) {
45 | // port number
46 | return port;
47 | }
48 |
49 | return false;
50 | }
51 |
52 | /**
53 | * Event listener for HTTP server "error" event.
54 | */
55 |
56 | function onError(error) {
57 | if (error.syscall !== 'listen') {
58 | throw error;
59 | }
60 |
61 | var bind = typeof port === 'string'
62 | ? 'Pipe ' + port
63 | : 'Port ' + port;
64 |
65 | // handle specific listen errors with friendly messages
66 | switch (error.code) {
67 | case 'EACCES':
68 | console.error(bind + ' requires elevated privileges');
69 | process.exit(1);
70 | break;
71 | case 'EADDRINUSE':
72 | console.error(bind + ' is already in use');
73 | process.exit(1);
74 | break;
75 | default:
76 | throw error;
77 | }
78 | }
79 |
80 | /**
81 | * Event listener for HTTP server "listening" event.
82 | */
83 |
84 | function onListening() {
85 | var addr = server.address();
86 | var bind = typeof addr === 'string'
87 | ? 'pipe ' + addr
88 | : 'port ' + addr.port;
89 | debug('Listening on ' + bind);
90 | }
91 |
--------------------------------------------------------------------------------
/config/default.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "devices":{
3 | "tv":{
4 | "title": "TV - Samsung",
5 | "label": "TV",
6 | "device": "SamsungTv"
7 | },
8 | "dvd":{
9 | "title": "DVD - Magnavox",
10 | "label": "DVD",
11 | "device": "MagnavoxDvd"
12 | },
13 | "cable":{
14 | "title": "Cable Box",
15 | "label": "CABLE",
16 | "device": "CableBox"
17 | }
18 | },
19 | "macros":{
20 | "watch_tv": [
21 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_POWER" },
22 | { "device": "cable", "directive": "SEND_ONCE", "key": "KEY_POWER" }
23 | ],
24 | "game_input":[
25 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV", "delay": 1000 },
26 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
27 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
28 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
29 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE", "delay": 2000 },
30 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_SOURCE" },
31 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER"}
32 | ],
33 | "toon_tv":[
34 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_TV" },
35 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_3" },
36 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_5" },
37 | { "device": "tv", "directive": "SEND_ONCE", "key": "KEY_ENTER" }
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/config/production.example.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/exampleConfigs/lircRemotes/CableBox.conf:
--------------------------------------------------------------------------------
1 |
2 | # Please take the time to finish this file as described in
3 | # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
4 | # and make it available to others by sending it to
5 | #
6 | #
7 | # This config file was automatically generated
8 | # using lirc-0.9.4c(default) on Fri Dec 15 17:29:55 2017
9 | # Command line used: --disable-namespace
10 | # Kernel version (uname -r): 4.9.59-v7+
11 | #
12 | # Remote name (as of config file): Cable02
13 | # Brand of remote device, the thing you hold in your hand:
14 | # Remote device model nr:
15 | # Remote device info url:
16 | # Does remote device has a bundled capture device e. g., a
17 | # usb dongle? :
18 | # For bundled USB devices: usb vendor id, product id
19 | # and device string (use dmesg or lsusb):
20 | # Type of device controlled
21 | # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
22 | # Device(s) controlled by this remote:
23 |
24 | begin remote
25 |
26 | name CableBox
27 | bits 22
28 | flags SPACE_ENC|CONST_LENGTH
29 | eps 30
30 | aeps 100
31 |
32 | header 3366 3319
33 | one 867 2492
34 | zero 867 804
35 | ptrail 861
36 | gap 100288
37 | toggle_bit_mask 0x0
38 | frequency 38000
39 |
40 | begin codes
41 | KEY_POWER 0x37C107
42 | KEY_EXIT 0x366932
43 | KEY_INFO 0x36213B
44 | KEY_MENU 0x36F920
45 | KEY_GUIDE 0x36C127
46 | KEY_SETTINGS 0x373918
47 | KEY_DAY_PLUS 0x0FE603
48 | KEY_DAY_MINUS 0x0E163D
49 | KEY_PAGE_PLUS 0x36D924
50 | KEY_PAGE_MINUS 0x37D904
51 | KEY_LEFT 0x37810F
52 | KEY_RIGHT 0x364137
53 | KEY_UP 0x36812F
54 | KEY_DOWN 0x37A10B
55 | KEY_OK 0x366133
56 | KEY_YELLOW 0x37E902
57 | KEY_BLUE 0x36193C
58 | KEY_RED 0x37191C
59 | KEY_GREEN 0x0F7E10
60 | KEY_FAVORITE_CHANNEL 0x37F101
61 | KEY_CHANNEL_UP 0x377111
62 | KEY_CHANNEL_DOWN 0x36F121
63 | KEY_LAST 0x36E123
64 | KEY_ON_DEMAND 0x0EF621
65 | KEY_RETURN 0x37C906
66 | KEY_LIST 0x36C926
67 | KEY_LIVE 0x36B129
68 | KEY_BACKWARD 0x37291A
69 | KEY_PLAY 0x37990C
70 | KEY_FORWARD 0x36293A
71 | KEY_STOP 0x365934
72 | KEY_PAUSE 0x374117
73 | KEY_RECORD 0x375914
74 | KEY_1 0x36113D
75 | KEY_2 0x37111D
76 | KEY_3 0x36912D
77 | KEY_4 0x37910D
78 | KEY_5 0x365135
79 | KEY_6 0x375115
80 | KEY_7 0x36D125
81 | KEY_8 0x37D105
82 | KEY_9 0x363139
83 | KEY_0 0x373119
84 | KEY_ASTERISK 0x0FF601
85 | KEY_HASH 0x36B928
86 | end codes
87 |
88 | end remote
89 |
90 |
91 |
--------------------------------------------------------------------------------
/exampleConfigs/lircRemotes/MagnavoxDvd.conf:
--------------------------------------------------------------------------------
1 | #
2 | # this config file was automatically generated
3 | # using lirc-0.6.5(any) on Sun Oct 6 22:12:44 2002
4 | #
5 | # contributed by Blars
6 | #
7 | # brand: magnavox
8 | # model no. of remote control: MDV450
9 | # devices being controlled by this remote: MDV450
10 | #
11 |
12 | begin remote
13 |
14 | name MagnavoxDvd
15 | bits 8
16 | flags RC6|CONST_LENGTH
17 | eps 30
18 | aeps 100
19 |
20 | header 2698 870
21 | one 457 435
22 | zero 457 435
23 | pre_data_bits 13
24 | pre_data 0xEFB
25 | gap 107380
26 | toggle_bit 5
27 |
28 |
29 | begin codes
30 | KEY_POWER 0x00000000000000F3 # Was: power
31 | KEY_1 0x00000000000000FE # Was: 1
32 | KEY_2 0x00000000000000FD # Was: 2
33 | KEY_3 0x00000000000000FC # Was: 3
34 | KEY_4 0x00000000000000FB # Was: 4
35 | KEY_5 0x00000000000000FA # Was: 5
36 | KEY_6 0x00000000000000F9 # Was: 6
37 | KEY_7 0x00000000000000F8 # Was: 7
38 | KEY_8 0x00000000000000F7 # Was: 8
39 | KEY_9 0x00000000000000F6 # Was: 9
40 | KEY_0 0x00000000000000FF # Was: 0
41 | KEY_TITLE 0x000000000000007C # Was: title
42 | display 0x00000000000000F0
43 | disc_menu 0x00000000000000AB
44 | system_menu 0x000000000000007D
45 | ^ 0x00000000000000A7
46 | < 0x00000000000000A5
47 | > 0x00000000000000A4
48 | KEY_V 0x00000000000000A6 # Was: v
49 | KEY_OK 0x00000000000000A3 # Was: ok
50 | KEY_REWIND 0x00000000000000DE # Was: <<
51 | KEY_FORWARD 0x00000000000000DF # Was: >>
52 | KEY_STOP 0x00000000000000CE # Was: stop
53 | KEY_PLAY 0x00000000000000D3 # Was: play
54 | KEY_PAUSE 0x00000000000000CF # Was: pause
55 | KEY_SUBTITLE 0x00000000000000B4 # Was: subtitle
56 | KEY_ANGLE 0x000000000000007A # Was: angle
57 | KEY_ZOOM 0x0000000000000008 # Was: zoom
58 | KEY_AUDIO 0x00000000000000B1 # Was: audio
59 | KEY_AGAIN 0x00000000000000E2 # Was: repeat
60 | a-b 0x00000000000000C4
61 | KEY_PREVIOUS 0x000000000000002A # Was: preview
62 | KEY_MUTE 0x00000000000000F2 # Was: mute
63 | end codes
64 |
65 | end remote
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/exampleConfigs/lircRemotes/SamsungTv.conf:
--------------------------------------------------------------------------------
1 |
2 | # Please take the time to finish this file as described in
3 | # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
4 | # and make it available to others by sending it to
5 | #
6 | #
7 | # This config file was automatically generated
8 | # using lirc-0.9.4c(default) on Fri Dec 15 16:15:25 2017
9 | # Command line used: --disable-namespace
10 | # Kernel version (uname -r): 4.9.59-v7+
11 | #
12 | # Remote name (as of config file): Tv
13 | # Brand of remote device, the thing you hold in your hand:
14 | # Remote device model nr:
15 | # Remote device info url:
16 | # Does remote device has a bundled capture device e. g., a
17 | # usb dongle? :
18 | # For bundled USB devices: usb vendor id, product id
19 | # and device string (use dmesg or lsusb):
20 | # Type of device controlled
21 | # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
22 | # Device(s) controlled by this remote:
23 |
24 | begin remote
25 |
26 | name SamsungTv
27 | bits 16
28 | flags SPACE_ENC|CONST_LENGTH
29 | eps 30
30 | aeps 100
31 |
32 | header 4592 4363
33 | one 649 1583
34 | zero 649 467
35 | ptrail 650
36 | pre_data_bits 16
37 | pre_data 0xE0E0
38 | gap 107731
39 | toggle_bit_mask 0x0
40 | frequency 38000
41 |
42 | begin codes
43 | KEY_POWER 0x40BF
44 | KEY_TV 0xD827
45 | KEY_1 0x20DF
46 | KEY_2 0xA05F
47 | KEY_3 0x609F
48 | KEY_4 0x10EF
49 | KEY_5 0x906F
50 | KEY_6 0x50AF
51 | KEY_7 0x30CF
52 | KEY_8 0xB04F
53 | KEY_9 0x708F
54 | KEY_DASH 0xC43B
55 | KEY_0 0x8877
56 | KEY_PREVIOUS_CHANNEL 0xC837
57 | KEY_VOLUME_UP 0xE01F
58 | KEY_VOLUME_DOWN 0xD02F
59 | KEY_MUTE 0xF00F
60 | KEY_SOURCE 0x807F
61 | KEY_CHANNEL_UP 0x48B7
62 | KEY_CHANNEL_DOWN 0x08F7
63 | KEY_CHANNEL_LIST 0xD629
64 | KEY_MENU 0x58A7
65 | KEY_FAVORITE_CHANNEL 0x22DD
66 | KEY_TOOLS 0xD22D
67 | KEY_RETURN 0x1AE5
68 | KEY_UP 0x06F9
69 | KEY_DOWN 0x8679
70 | KEY_LEFT 0xA659
71 | KEY_RIGHT 0x46B9
72 | KEY_ENTER 0x16E9
73 | KEY_INFO 0xF807
74 | KEY_EXIT 0xB44B
75 | KEY_RED 0x36C9
76 | KEY_GREEN 0x28D7
77 | KEY_YELLOW 0xA857
78 | KEY_BLUE 0x6897
79 | KEY_PICTURE_SIZE 0x7C83
80 | KEY_MTS 0x00FF
81 | KEY_CC 0xA45B
82 | end codes
83 |
84 | end remote
85 |
86 |
87 |
--------------------------------------------------------------------------------
/exampleConfigs/lircRemotes/VizioTv.conf:
--------------------------------------------------------------------------------
1 |
2 | # Please take the time to finish this file as described in
3 | # https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
4 | # and make it available to others by sending it to
5 | #
6 | #
7 | # This config file was automatically generated
8 | # using lirc-0.9.4c(default) on Fri Dec 15 16:59:31 2017
9 | # Command line used: --disable-namespace
10 | # Kernel version (uname -r): 4.9.59-v7+
11 | #
12 | # Remote name (as of config file): LivingRoomTv
13 | # Brand of remote device, the thing you hold in your hand:
14 | # Remote device model nr:
15 | # Remote device info url:
16 | # Does remote device has a bundled capture device e. g., a
17 | # usb dongle? :
18 | # For bundled USB devices: usb vendor id, product id
19 | # and device string (use dmesg or lsusb):
20 | # Type of device controlled
21 | # (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
22 | # Device(s) controlled by this remote:
23 |
24 | begin remote
25 |
26 | name VizioTv
27 | bits 32
28 | flags SPACE_ENC|CONST_LENGTH
29 | eps 30
30 | aeps 100
31 |
32 | header 9055 4459
33 | one 598 1641
34 | zero 598 521
35 | ptrail 601
36 | repeat 9059 2207
37 | gap 107956
38 | toggle_bit_mask 0x0
39 | frequency 38000
40 |
41 | begin codes
42 | KEY_POWER 0x20DF10EF 0x7EF8125C
43 | KEY_INPUT 0x20DFF40B 0x7EF8125C
44 | KEY_1 0x20DF8877 0x7EF8125C
45 | KEY_2 0x20DF48B7 0x7EF8125C
46 | KEY_3 0x20DFC837 0x7EF8125C
47 | KEY_4 0x20DF28D7 0x7EF8125C
48 | KEY_5 0x20DFA857 0x7EF8125C
49 | KEY_6 0x20DF6897 0x7EF8125C
50 | KEY_7 0x20DFE817 0x7EF8125C
51 | KEY_8 0x20DF18E7 0x7EF8125C
52 | KEY_9 0x20DF9867 0x7EF8125C
53 | KEY_0 0x20DF08F7 0x7EF8125C
54 | KEY_3D 0x20DF09F6 0x7EF8125C
55 | KEY_DASH 0x20DFFF00 0x7EF8125C
56 | KEY_VOLUME_UP 0x20DF40BF 0x7EF8125C
57 | KEY_VOLUME_DOWN 0x20DFC03F 0x7EF8125C
58 | KEY_MUTE 0x20DF906F 0x7EF8125C
59 | KEY_RETURN 0x20DF58A7 0x7EF8125C
60 | KEY_CHANNEL_UP 0x20DF00FF 0x7EF8125C
61 | KEY_CHANNEL_DOWN 0x20DF807F 0x7EF8125C
62 | KEY_VIZIO 0x20DFB44B 0x7EF8125C
63 | KEY_YELLOW 0x20DF4AB5 0x7EF8125C
64 | KEY_BLUE 0x20DFCA35 0x7EF8125C
65 | KEY_RED 0x20DF2AD5 0x7EF8125C
66 | KEY_GREEN 0x20DFAA55 0x7EF8125C
67 | KEY_BACK 0x20DF52AD 0x7EF8125C
68 | KEY_GUIDE 0x20DF38C7 0x7EF8125C
69 | KEY_UP 0x20DFA25D 0x7EF8125C
70 | KEY_DOWN 0x20DF629D 0x7EF8125C
71 | KEY_LEFT 0x20DFE21D 0x7EF8125C
72 | KEY_RIGHT 0x20DF12ED 0x7EF8125C
73 | KEY_OK 0x20DF22DD 0x7EF8125C
74 | KEY_EXIT 0x20DF926D 0x7EF8125C
75 | KEY_MENU 0x20DFF20D 0x7EF8125C
76 | KEY_CC 0x20DF9C63 0x7EF8125C
77 | KEY_INFO 0x20DFD827 0x7EF8125C
78 | KEY_BACKWARD 0x20DFAC53 0x7EF8125C
79 | KEY_PAUSE 0x20DFEC13 0x7EF8125C
80 | KEY_PLAY 0x20DFCC33 0x7EF8125C
81 | KEY_FORWARD 0x20DF6C93 0x7EF8125C
82 | KEY_AMAZON 0x20DF57A8 0x7EF8125C
83 | KEY_NETFLIX 0x20DFD728 0x7EF8125C
84 | KEY_VUDO 0x20DF37C8 0x7EF8125C
85 | KEY_Q 0x20DF20DF 0x7EF8125C
86 | KEY_W 0x20DFA05F 0x7EF8125C
87 | KEY_E 0x20DF609F 0x7EF8125C
88 | KEY_R 0x20DF30CF 0x7EF8125C
89 | KEY_T 0x20DFB04F 0x7EF8125C
90 | KEY_Y 0x20DFF00F 0x7EF8125C
91 | KEY_U 0x20DF946B 0x7EF8125C
92 | KEY_I 0x20DFEA15 0x7EF8125C
93 | KEY_O 0x20DF1AE5 0x7EF8125C
94 | KEY_P 0x20DF9A65 0x7EF8125C
95 | KEY_A 0x20DFDA25 0x7EF8125C
96 | KEY_S 0x20DF3AC5 0x7EF8125C
97 | KEY_D 0x20DFBA45 0x7EF8125C
98 | KEY_F 0x20DF7A85 0x7EF8125C
99 | KEY_G 0x20DFFA05 0x7EF8125C
100 | KEY_H 0x20DF16E9 0x7EF8125C
101 | KEY_J 0x20DF9669 0x7EF8125C
102 | KEY_K 0x20DF56A9 0x7EF8125C
103 | KEY_L 0x20DFD629 0x7EF8125C
104 | KEY_BACKSPACE 0x20DF53AC 0x7EF8125C
105 | KEY_TAB 0x20DFD32C 0x7EF8125C
106 | KEY_Z 0x20DF36C9 0x7EF8125C
107 | KEY_X 0x20DFB649 0x7EF8125C
108 | KEY_C 0x20DF7689 0x7EF8125C
109 | KEY_V 0x20DF0EF1 0x7EF8125C
110 | KEY_B 0x20DFAE51 0x7EF8125C
111 | KEY_N 0x20DF6E91 0x7EF8125C
112 | KEY_M 0x20DF1EE1 0x7EF8125C
113 | KEY_SLASH 0x20DF7B84 0x7EF8125C
114 | KEY_KEYBOARD_ENTER 0x20DF7F80 0x7EF8125C
115 | KEY_AT 0x20DF956A 0x7EF8125C
116 | KEY_COLON 0x20DF9B64 0x7EF8125C
117 | KEY_SPACE 0x20DF33CC 0x7EF8125C
118 | KEY_COMMA 0x20DFE51A 0x7EF8125C
119 | KEY_PERIOD 0x20DF15EA 0x7EF8125C
120 | KEY_DOT_COM 0x20DF5BA4 0x7EF8125C
121 | end codes
122 |
123 | end remote
124 |
125 |
126 |
--------------------------------------------------------------------------------
/exampleConfigs/nodeJsConfig/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "devices":{
3 | "tv":{
4 | "title": "TV - Samsung",
5 | "label": "TV",
6 | "device": "SamsungTv"
7 | },
8 | "dvd":{
9 | "title": "DVD - Magnavox",
10 | "label": "DVD",
11 | "device": "MagnavoxDvd"
12 | },
13 | "cable":{
14 | "title": "Cable Box",
15 | "label": "CABLE",
16 | "device": "CableBox"
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/exampleConfigs/nodeJsConfig/production.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/kicad/RaspberryPiIrLedDriver.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bbtinkerer/LircNodeJsWeb/61860ee6807ffc44e1fdba3d6b67d9153509debd/kicad/RaspberryPiIrLedDriver.zip
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lircnodejsweb",
3 | "version": "0.1.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "accepts": {
8 | "version": "1.3.4",
9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz",
10 | "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=",
11 | "requires": {
12 | "mime-types": "2.1.17",
13 | "negotiator": "0.6.1"
14 | }
15 | },
16 | "acorn": {
17 | "version": "3.3.0",
18 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
19 | "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo="
20 | },
21 | "acorn-globals": {
22 | "version": "3.1.0",
23 | "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz",
24 | "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=",
25 | "requires": {
26 | "acorn": "4.0.13"
27 | },
28 | "dependencies": {
29 | "acorn": {
30 | "version": "4.0.13",
31 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
32 | "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
33 | }
34 | }
35 | },
36 | "align-text": {
37 | "version": "0.1.4",
38 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
39 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
40 | "requires": {
41 | "kind-of": "3.2.2",
42 | "longest": "1.0.1",
43 | "repeat-string": "1.6.1"
44 | }
45 | },
46 | "amdefine": {
47 | "version": "1.0.1",
48 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
49 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
50 | },
51 | "array-flatten": {
52 | "version": "1.1.1",
53 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
54 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
55 | },
56 | "asap": {
57 | "version": "2.0.6",
58 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
59 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
60 | },
61 | "basic-auth": {
62 | "version": "2.0.0",
63 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz",
64 | "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=",
65 | "requires": {
66 | "safe-buffer": "5.1.1"
67 | }
68 | },
69 | "body-parser": {
70 | "version": "1.18.2",
71 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz",
72 | "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=",
73 | "requires": {
74 | "bytes": "3.0.0",
75 | "content-type": "1.0.4",
76 | "debug": "2.6.9",
77 | "depd": "1.1.1",
78 | "http-errors": "1.6.2",
79 | "iconv-lite": "0.4.19",
80 | "on-finished": "2.3.0",
81 | "qs": "6.5.1",
82 | "raw-body": "2.3.2",
83 | "type-is": "1.6.15"
84 | }
85 | },
86 | "bootstrap": {
87 | "version": "3.3.7",
88 | "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz",
89 | "integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E="
90 | },
91 | "bytes": {
92 | "version": "3.0.0",
93 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
94 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
95 | },
96 | "camelcase": {
97 | "version": "1.2.1",
98 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
99 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
100 | },
101 | "center-align": {
102 | "version": "0.1.3",
103 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
104 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
105 | "requires": {
106 | "align-text": "0.1.4",
107 | "lazy-cache": "1.0.4"
108 | }
109 | },
110 | "character-parser": {
111 | "version": "2.2.0",
112 | "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",
113 | "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=",
114 | "requires": {
115 | "is-regex": "1.0.4"
116 | }
117 | },
118 | "clean-css": {
119 | "version": "3.4.28",
120 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz",
121 | "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=",
122 | "requires": {
123 | "commander": "2.8.1",
124 | "source-map": "0.4.4"
125 | }
126 | },
127 | "cliui": {
128 | "version": "2.1.0",
129 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
130 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
131 | "requires": {
132 | "center-align": "0.1.3",
133 | "right-align": "0.1.3",
134 | "wordwrap": "0.0.2"
135 | }
136 | },
137 | "commander": {
138 | "version": "2.8.1",
139 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
140 | "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
141 | "requires": {
142 | "graceful-readlink": "1.0.1"
143 | }
144 | },
145 | "config": {
146 | "version": "1.29.0",
147 | "resolved": "https://registry.npmjs.org/config/-/config-1.29.0.tgz",
148 | "integrity": "sha1-+JGQCV7Iz+iG6lK309lsrfpXe38=",
149 | "requires": {
150 | "json5": "0.4.0",
151 | "os-homedir": "1.0.2"
152 | }
153 | },
154 | "constantinople": {
155 | "version": "3.1.0",
156 | "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.0.tgz",
157 | "integrity": "sha1-dWnKqKo/jVk11i4fqW+fcCzYHHk=",
158 | "requires": {
159 | "acorn": "3.3.0",
160 | "is-expression": "2.1.0"
161 | }
162 | },
163 | "content-disposition": {
164 | "version": "0.5.2",
165 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
166 | "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
167 | },
168 | "content-type": {
169 | "version": "1.0.4",
170 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
171 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
172 | },
173 | "cookie": {
174 | "version": "0.3.1",
175 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
176 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
177 | },
178 | "cookie-parser": {
179 | "version": "1.4.3",
180 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.3.tgz",
181 | "integrity": "sha1-D+MfoZ0AC5X0qt8fU/3CuKIDuqU=",
182 | "requires": {
183 | "cookie": "0.3.1",
184 | "cookie-signature": "1.0.6"
185 | }
186 | },
187 | "cookie-signature": {
188 | "version": "1.0.6",
189 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
190 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
191 | },
192 | "debug": {
193 | "version": "2.6.9",
194 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
195 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
196 | "requires": {
197 | "ms": "2.0.0"
198 | }
199 | },
200 | "decamelize": {
201 | "version": "1.2.0",
202 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
203 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
204 | },
205 | "depd": {
206 | "version": "1.1.1",
207 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
208 | "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
209 | },
210 | "destroy": {
211 | "version": "1.0.4",
212 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
213 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
214 | },
215 | "doctypes": {
216 | "version": "1.1.0",
217 | "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
218 | "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk="
219 | },
220 | "ee-first": {
221 | "version": "1.1.1",
222 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
223 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
224 | },
225 | "encodeurl": {
226 | "version": "1.0.1",
227 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
228 | "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
229 | },
230 | "escape-html": {
231 | "version": "1.0.3",
232 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
233 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
234 | },
235 | "etag": {
236 | "version": "1.8.1",
237 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
238 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
239 | },
240 | "express": {
241 | "version": "4.15.5",
242 | "resolved": "https://registry.npmjs.org/express/-/express-4.15.5.tgz",
243 | "integrity": "sha1-ZwI1ypWYiQpa6BcLg9tyK4Qu2Sc=",
244 | "requires": {
245 | "accepts": "1.3.4",
246 | "array-flatten": "1.1.1",
247 | "content-disposition": "0.5.2",
248 | "content-type": "1.0.4",
249 | "cookie": "0.3.1",
250 | "cookie-signature": "1.0.6",
251 | "debug": "2.6.9",
252 | "depd": "1.1.1",
253 | "encodeurl": "1.0.1",
254 | "escape-html": "1.0.3",
255 | "etag": "1.8.1",
256 | "finalhandler": "1.0.6",
257 | "fresh": "0.5.2",
258 | "merge-descriptors": "1.0.1",
259 | "methods": "1.1.2",
260 | "on-finished": "2.3.0",
261 | "parseurl": "1.3.2",
262 | "path-to-regexp": "0.1.7",
263 | "proxy-addr": "1.1.5",
264 | "qs": "6.5.0",
265 | "range-parser": "1.2.0",
266 | "send": "0.15.6",
267 | "serve-static": "1.12.6",
268 | "setprototypeof": "1.0.3",
269 | "statuses": "1.3.1",
270 | "type-is": "1.6.15",
271 | "utils-merge": "1.0.0",
272 | "vary": "1.1.2"
273 | },
274 | "dependencies": {
275 | "qs": {
276 | "version": "6.5.0",
277 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz",
278 | "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg=="
279 | },
280 | "statuses": {
281 | "version": "1.3.1",
282 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
283 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
284 | }
285 | }
286 | },
287 | "finalhandler": {
288 | "version": "1.0.6",
289 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz",
290 | "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=",
291 | "requires": {
292 | "debug": "2.6.9",
293 | "encodeurl": "1.0.1",
294 | "escape-html": "1.0.3",
295 | "on-finished": "2.3.0",
296 | "parseurl": "1.3.2",
297 | "statuses": "1.3.1",
298 | "unpipe": "1.0.0"
299 | },
300 | "dependencies": {
301 | "statuses": {
302 | "version": "1.3.1",
303 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
304 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
305 | }
306 | }
307 | },
308 | "forwarded": {
309 | "version": "0.1.2",
310 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
311 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
312 | },
313 | "fresh": {
314 | "version": "0.5.2",
315 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
316 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
317 | },
318 | "function-bind": {
319 | "version": "1.1.1",
320 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
321 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
322 | },
323 | "graceful-readlink": {
324 | "version": "1.0.1",
325 | "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
326 | "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
327 | },
328 | "has": {
329 | "version": "1.0.1",
330 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz",
331 | "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=",
332 | "requires": {
333 | "function-bind": "1.1.1"
334 | }
335 | },
336 | "http-errors": {
337 | "version": "1.6.2",
338 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
339 | "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
340 | "requires": {
341 | "depd": "1.1.1",
342 | "inherits": "2.0.3",
343 | "setprototypeof": "1.0.3",
344 | "statuses": "1.4.0"
345 | }
346 | },
347 | "iconv-lite": {
348 | "version": "0.4.19",
349 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
350 | "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
351 | },
352 | "inherits": {
353 | "version": "2.0.3",
354 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
355 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
356 | },
357 | "ipaddr.js": {
358 | "version": "1.4.0",
359 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz",
360 | "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA="
361 | },
362 | "is-buffer": {
363 | "version": "1.1.6",
364 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
365 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
366 | },
367 | "is-expression": {
368 | "version": "2.1.0",
369 | "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-2.1.0.tgz",
370 | "integrity": "sha1-kb6dR968/vB3l36XIr5tz7RGXvA=",
371 | "requires": {
372 | "acorn": "3.3.0",
373 | "object-assign": "4.1.1"
374 | }
375 | },
376 | "is-promise": {
377 | "version": "2.1.0",
378 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
379 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
380 | },
381 | "is-regex": {
382 | "version": "1.0.4",
383 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
384 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
385 | "requires": {
386 | "has": "1.0.1"
387 | }
388 | },
389 | "jquery": {
390 | "version": "3.2.1",
391 | "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
392 | "integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c="
393 | },
394 | "js-stringify": {
395 | "version": "1.0.2",
396 | "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
397 | "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds="
398 | },
399 | "json5": {
400 | "version": "0.4.0",
401 | "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz",
402 | "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0="
403 | },
404 | "jstransformer": {
405 | "version": "1.0.0",
406 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
407 | "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=",
408 | "requires": {
409 | "is-promise": "2.1.0",
410 | "promise": "7.3.1"
411 | }
412 | },
413 | "kind-of": {
414 | "version": "3.2.2",
415 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
416 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
417 | "requires": {
418 | "is-buffer": "1.1.6"
419 | }
420 | },
421 | "lazy-cache": {
422 | "version": "1.0.4",
423 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
424 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
425 | },
426 | "longest": {
427 | "version": "1.0.1",
428 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
429 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
430 | },
431 | "media-typer": {
432 | "version": "0.3.0",
433 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
434 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
435 | },
436 | "merge-descriptors": {
437 | "version": "1.0.1",
438 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
439 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
440 | },
441 | "methods": {
442 | "version": "1.1.2",
443 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
444 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
445 | },
446 | "mime": {
447 | "version": "1.3.4",
448 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
449 | "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM="
450 | },
451 | "mime-db": {
452 | "version": "1.30.0",
453 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
454 | "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
455 | },
456 | "mime-types": {
457 | "version": "2.1.17",
458 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
459 | "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
460 | "requires": {
461 | "mime-db": "1.30.0"
462 | }
463 | },
464 | "morgan": {
465 | "version": "1.9.0",
466 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.0.tgz",
467 | "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=",
468 | "requires": {
469 | "basic-auth": "2.0.0",
470 | "debug": "2.6.9",
471 | "depd": "1.1.1",
472 | "on-finished": "2.3.0",
473 | "on-headers": "1.0.1"
474 | }
475 | },
476 | "ms": {
477 | "version": "2.0.0",
478 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
479 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
480 | },
481 | "nan": {
482 | "version": "2.8.0",
483 | "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz",
484 | "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo="
485 | },
486 | "negotiator": {
487 | "version": "0.6.1",
488 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
489 | "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
490 | },
491 | "object-assign": {
492 | "version": "4.1.1",
493 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
494 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
495 | },
496 | "on-finished": {
497 | "version": "2.3.0",
498 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
499 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
500 | "requires": {
501 | "ee-first": "1.1.1"
502 | }
503 | },
504 | "on-headers": {
505 | "version": "1.0.1",
506 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
507 | "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
508 | },
509 | "os-homedir": {
510 | "version": "1.0.2",
511 | "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
512 | "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
513 | },
514 | "parseurl": {
515 | "version": "1.3.2",
516 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
517 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
518 | },
519 | "path-parse": {
520 | "version": "1.0.5",
521 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
522 | "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
523 | },
524 | "path-to-regexp": {
525 | "version": "0.1.7",
526 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
527 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
528 | },
529 | "promise": {
530 | "version": "7.3.1",
531 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
532 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
533 | "requires": {
534 | "asap": "2.0.6"
535 | }
536 | },
537 | "proxy-addr": {
538 | "version": "1.1.5",
539 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz",
540 | "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=",
541 | "requires": {
542 | "forwarded": "0.1.2",
543 | "ipaddr.js": "1.4.0"
544 | }
545 | },
546 | "pug": {
547 | "version": "2.0.0-beta11",
548 | "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.0-beta11.tgz",
549 | "integrity": "sha1-Favmr1AEx+LPRhPksnRlyVRrXwE=",
550 | "requires": {
551 | "pug-code-gen": "1.1.1",
552 | "pug-filters": "2.1.5",
553 | "pug-lexer": "3.1.0",
554 | "pug-linker": "2.0.3",
555 | "pug-load": "2.0.9",
556 | "pug-parser": "2.0.2",
557 | "pug-runtime": "2.0.3",
558 | "pug-strip-comments": "1.0.2"
559 | }
560 | },
561 | "pug-attrs": {
562 | "version": "2.0.2",
563 | "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.2.tgz",
564 | "integrity": "sha1-i+KyIlVo/6ddG4Zpgr/59BEa/8s=",
565 | "requires": {
566 | "constantinople": "3.1.0",
567 | "js-stringify": "1.0.2",
568 | "pug-runtime": "2.0.3"
569 | }
570 | },
571 | "pug-code-gen": {
572 | "version": "1.1.1",
573 | "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-1.1.1.tgz",
574 | "integrity": "sha1-HPcnRO8qA56uajNAyqoRBYcSWOg=",
575 | "requires": {
576 | "constantinople": "3.1.0",
577 | "doctypes": "1.1.0",
578 | "js-stringify": "1.0.2",
579 | "pug-attrs": "2.0.2",
580 | "pug-error": "1.3.2",
581 | "pug-runtime": "2.0.3",
582 | "void-elements": "2.0.1",
583 | "with": "5.1.1"
584 | }
585 | },
586 | "pug-error": {
587 | "version": "1.3.2",
588 | "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.2.tgz",
589 | "integrity": "sha1-U659nSm7A89WRJOgJhCfVMR/XyY="
590 | },
591 | "pug-filters": {
592 | "version": "2.1.5",
593 | "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-2.1.5.tgz",
594 | "integrity": "sha512-xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ==",
595 | "requires": {
596 | "clean-css": "3.4.28",
597 | "constantinople": "3.1.0",
598 | "jstransformer": "1.0.0",
599 | "pug-error": "1.3.2",
600 | "pug-walk": "1.1.5",
601 | "resolve": "1.5.0",
602 | "uglify-js": "2.8.29"
603 | }
604 | },
605 | "pug-lexer": {
606 | "version": "3.1.0",
607 | "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-3.1.0.tgz",
608 | "integrity": "sha1-/QhzdtSmdbT1n4/vQiiDQ06VgaI=",
609 | "requires": {
610 | "character-parser": "2.2.0",
611 | "is-expression": "3.0.0",
612 | "pug-error": "1.3.2"
613 | },
614 | "dependencies": {
615 | "acorn": {
616 | "version": "4.0.13",
617 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
618 | "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
619 | },
620 | "is-expression": {
621 | "version": "3.0.0",
622 | "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz",
623 | "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=",
624 | "requires": {
625 | "acorn": "4.0.13",
626 | "object-assign": "4.1.1"
627 | }
628 | }
629 | }
630 | },
631 | "pug-linker": {
632 | "version": "2.0.3",
633 | "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-2.0.3.tgz",
634 | "integrity": "sha1-szH/olc33eacEntWwQ/xf652bco=",
635 | "requires": {
636 | "pug-error": "1.3.2",
637 | "pug-walk": "1.1.5"
638 | }
639 | },
640 | "pug-load": {
641 | "version": "2.0.9",
642 | "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.9.tgz",
643 | "integrity": "sha512-BDdZOCru4mg+1MiZwRQZh25+NTRo/R6/qArrdWIf308rHtWA5N9kpoUskRe4H6FslaQujC+DigH9LqlBA4gf6Q==",
644 | "requires": {
645 | "object-assign": "4.1.1",
646 | "pug-walk": "1.1.5"
647 | }
648 | },
649 | "pug-parser": {
650 | "version": "2.0.2",
651 | "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-2.0.2.tgz",
652 | "integrity": "sha1-U6aAz9BQOdywwn0CkJS8SnkmibA=",
653 | "requires": {
654 | "pug-error": "1.3.2",
655 | "token-stream": "0.0.1"
656 | }
657 | },
658 | "pug-runtime": {
659 | "version": "2.0.3",
660 | "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.3.tgz",
661 | "integrity": "sha1-mBYmB7D86eJU1CfzOYelrucWi9o="
662 | },
663 | "pug-strip-comments": {
664 | "version": "1.0.2",
665 | "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.2.tgz",
666 | "integrity": "sha1-0xOvoBvMN0mA4TmeI+vy65vchRM=",
667 | "requires": {
668 | "pug-error": "1.3.2"
669 | }
670 | },
671 | "pug-walk": {
672 | "version": "1.1.5",
673 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.5.tgz",
674 | "integrity": "sha512-rJlH1lXerCIAtImXBze3dtKq/ykZMA4rpO9FnPcIgsWcxZLOvd8zltaoeOVFyBSSqCkhhJWbEbTMga8UxWUUSA=="
675 | },
676 | "qs": {
677 | "version": "6.5.1",
678 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
679 | "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
680 | },
681 | "range-parser": {
682 | "version": "1.2.0",
683 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
684 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
685 | },
686 | "raw-body": {
687 | "version": "2.3.2",
688 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
689 | "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
690 | "requires": {
691 | "bytes": "3.0.0",
692 | "http-errors": "1.6.2",
693 | "iconv-lite": "0.4.19",
694 | "unpipe": "1.0.0"
695 | }
696 | },
697 | "repeat-string": {
698 | "version": "1.6.1",
699 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
700 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
701 | },
702 | "resolve": {
703 | "version": "1.5.0",
704 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
705 | "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
706 | "requires": {
707 | "path-parse": "1.0.5"
708 | }
709 | },
710 | "right-align": {
711 | "version": "0.1.3",
712 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
713 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
714 | "requires": {
715 | "align-text": "0.1.4"
716 | }
717 | },
718 | "safe-buffer": {
719 | "version": "5.1.1",
720 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
721 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
722 | },
723 | "send": {
724 | "version": "0.15.6",
725 | "resolved": "https://registry.npmjs.org/send/-/send-0.15.6.tgz",
726 | "integrity": "sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=",
727 | "requires": {
728 | "debug": "2.6.9",
729 | "depd": "1.1.1",
730 | "destroy": "1.0.4",
731 | "encodeurl": "1.0.1",
732 | "escape-html": "1.0.3",
733 | "etag": "1.8.1",
734 | "fresh": "0.5.2",
735 | "http-errors": "1.6.2",
736 | "mime": "1.3.4",
737 | "ms": "2.0.0",
738 | "on-finished": "2.3.0",
739 | "range-parser": "1.2.0",
740 | "statuses": "1.3.1"
741 | },
742 | "dependencies": {
743 | "statuses": {
744 | "version": "1.3.1",
745 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
746 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
747 | }
748 | }
749 | },
750 | "serve-favicon": {
751 | "version": "2.4.5",
752 | "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.4.5.tgz",
753 | "integrity": "sha512-s7F8h2NrslMkG50KxvlGdj+ApSwaLex0vexuJ9iFf3GLTIp1ph/l1qZvRe9T9TJEYZgmq72ZwJ2VYiAEtChknw==",
754 | "requires": {
755 | "etag": "1.8.1",
756 | "fresh": "0.5.2",
757 | "ms": "2.0.0",
758 | "parseurl": "1.3.2",
759 | "safe-buffer": "5.1.1"
760 | }
761 | },
762 | "serve-static": {
763 | "version": "1.12.6",
764 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.6.tgz",
765 | "integrity": "sha1-uXN3P2NEmTTaVOW+ul4x2fQhFXc=",
766 | "requires": {
767 | "encodeurl": "1.0.1",
768 | "escape-html": "1.0.3",
769 | "parseurl": "1.3.2",
770 | "send": "0.15.6"
771 | }
772 | },
773 | "setprototypeof": {
774 | "version": "1.0.3",
775 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
776 | "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
777 | },
778 | "sleep": {
779 | "version": "5.1.1",
780 | "resolved": "https://registry.npmjs.org/sleep/-/sleep-5.1.1.tgz",
781 | "integrity": "sha1-h4+h1E0I7rDyb7IBjvhinrGjq5Q=",
782 | "requires": {
783 | "nan": "2.8.0"
784 | }
785 | },
786 | "source-map": {
787 | "version": "0.4.4",
788 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
789 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
790 | "requires": {
791 | "amdefine": "1.0.1"
792 | }
793 | },
794 | "statuses": {
795 | "version": "1.4.0",
796 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
797 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
798 | },
799 | "token-stream": {
800 | "version": "0.0.1",
801 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz",
802 | "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo="
803 | },
804 | "type-is": {
805 | "version": "1.6.15",
806 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz",
807 | "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=",
808 | "requires": {
809 | "media-typer": "0.3.0",
810 | "mime-types": "2.1.17"
811 | }
812 | },
813 | "uglify-js": {
814 | "version": "2.8.29",
815 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
816 | "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
817 | "requires": {
818 | "source-map": "0.5.7",
819 | "uglify-to-browserify": "1.0.2",
820 | "yargs": "3.10.0"
821 | },
822 | "dependencies": {
823 | "source-map": {
824 | "version": "0.5.7",
825 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
826 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
827 | }
828 | }
829 | },
830 | "uglify-to-browserify": {
831 | "version": "1.0.2",
832 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
833 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
834 | "optional": true
835 | },
836 | "unpipe": {
837 | "version": "1.0.0",
838 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
839 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
840 | },
841 | "utils-merge": {
842 | "version": "1.0.0",
843 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
844 | "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg="
845 | },
846 | "vary": {
847 | "version": "1.1.2",
848 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
849 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
850 | },
851 | "void-elements": {
852 | "version": "2.0.1",
853 | "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
854 | "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w="
855 | },
856 | "window-size": {
857 | "version": "0.1.0",
858 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
859 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
860 | },
861 | "with": {
862 | "version": "5.1.1",
863 | "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz",
864 | "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=",
865 | "requires": {
866 | "acorn": "3.3.0",
867 | "acorn-globals": "3.1.0"
868 | }
869 | },
870 | "wordwrap": {
871 | "version": "0.0.2",
872 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
873 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
874 | },
875 | "yargs": {
876 | "version": "3.10.0",
877 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
878 | "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
879 | "requires": {
880 | "camelcase": "1.2.1",
881 | "cliui": "2.1.0",
882 | "decamelize": "1.2.0",
883 | "window-size": "0.1.0"
884 | }
885 | }
886 | }
887 | }
888 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lircnodejsweb",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "start": "/opt/nodejs/bin/nodemon ./bin/www"
7 | },
8 | "dependencies": {
9 | "body-parser": "~1.18.2",
10 | "bootstrap": "^3.3.7",
11 | "config": "^1.29.0",
12 | "cookie-parser": "~1.4.3",
13 | "debug": "~2.6.9",
14 | "express": "~4.15.5",
15 | "jquery": "^3.2.1",
16 | "morgan": "~1.9.0",
17 | "pug": "2.0.0-beta11",
18 | "serve-favicon": "~2.4.5",
19 | "sleep": "^5.1.1"
20 | },
21 | "author": {
22 | "name": "bbtinkerer",
23 | "email": "bbtinkerer@users.noreply.github.com"
24 | },
25 | "homepage": "https://github.com/bbtinkerer/LircNodeJsWeb#readme",
26 | "repository": {
27 | "type": "git",
28 | "url": "https://github.com/bbtinkerer/LircNodeJsWeb.git"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/public/javascripts/lircNodeJsWeb.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function(){
2 | $('div[id^="device-"]').each(function(){
3 | var id = $(this).attr('id');
4 | var device = /device-(.*)/.exec(id)[1];
5 | $(this).on('click', function(){
6 | window.location.href = '/devices/' + device;
7 | });
8 | });
9 |
10 | $('div[id^="KEY_"]').each(function(){
11 | var device = $('input#currentDevice').val();
12 | $(this).on('click', function(){
13 | postKey('/devices/'+device+'/SEND_ONCE/' + $(this).attr('id'));
14 | });
15 | });
16 |
17 | $('div[id^="ALT_"]').each(function(){
18 | var id = $(this).attr('id');
19 | var device = id.match(/ALT_(.*)_KEY/)[1];
20 | var key = id.match(/KEY_.*/)[0];
21 | $(this).on('click', function(){
22 | postKey('/devices/'+device+'/SEND_ONCE/' + key);
23 | });
24 | });
25 |
26 | $('div[id^="MACRO_"]').each(function(){
27 | var id = $(this).attr('id');
28 | var macro = id.match(/MACRO_(.*)/)[1];
29 | $(this).on('click', function (){
30 | postKey('/macro/'+macro);
31 | });
32 | });
33 | });
34 |
35 | function postKey(route){
36 | $.post(route, function(data){
37 | console.log(data);
38 | });
39 | }
40 |
--------------------------------------------------------------------------------
/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 50px;
3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 | }
5 |
6 | a {
7 | color: #00B7FF;
8 | }
9 |
--------------------------------------------------------------------------------
/routes/index.js:
--------------------------------------------------------------------------------
1 | var config = require('config');
2 | var exec = require('child_process').exec;
3 | var execSync = require('child_process').execSync; // this works better for macro feature
4 | var util = require('util');
5 | var express = require('express');
6 | var router = express.Router();
7 | var sleep = require('sleep');
8 |
9 | var devices = config.get('devices');
10 | var macros = config.get('macros');
11 | var irsendRoute = '/devices/:device/:directive/:key';
12 |
13 | var irsendRouteHandler = function(req, res){
14 | var command = util.format('irsend %s %s %s', req.params.directive, devices[req.params.device].device, req.params.key);
15 | var result;
16 | console.log('executing: ' + command);
17 | exec(command, (error, stdout, stderr) => {
18 | result = stdout.trim();
19 | // success returns a blank string, I want to return something back to the browswer
20 | if(!result){
21 | result = "success";
22 | }
23 | res.json({result: result});
24 | });
25 | };
26 |
27 | router.get('/', function(req, res, next) {
28 | var key = Object.keys(devices)[0];
29 | res.render(key, { title: devices[key].title, device: key });
30 | });
31 |
32 | router.get('/devices/:device', function(req, res, next) {
33 | var device = req.params.device;
34 | res.render(device, {title: devices[device].title, device: device});
35 | });
36 |
37 | router.post('/macro/:macro', function(req, res, next){
38 | var macroName = req.params.macro;
39 | var macro = macros[macroName];
40 | var command;
41 | var step;
42 | var delay;
43 | var result = "success";
44 | if(macro){
45 | for(var i = 0, len = macro.length; i < len; i++){
46 | step = macro[i];
47 | command = util.format('irsend %s %s %s', step.directive, devices[step.device].device, step.key);
48 | console.log('executing: ' + command);
49 | execSync(command);
50 | if(step.delay){
51 | sleep.msleep(step.delay);
52 | }
53 | }
54 | } else {
55 | result = "macro not found: " + macroName;
56 | }
57 | res.json({result: result});
58 | });
59 |
60 | // not doing .all because keeping security in mind even though this website should be internal
61 | router.get(irsendRoute, irsendRouteHandler);
62 | router.post(irsendRoute, irsendRouteHandler);
63 |
64 | module.exports = router;
65 |
--------------------------------------------------------------------------------
/views/cable.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block deviceKeys
4 | div.container
5 | div.row
6 | div#KEY_POWER.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-danger.text-center
7 | span.glyphicon.glyphicon-off
8 | div#KEY_GUIDE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-primary.text-center GUIDE
9 | div#KEY_MENU.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-primary.text-center MENU
10 | div#KEY_INFO.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-primary.text-center INFO
11 | div.row
12 | div#KEY_DAY_PLUS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center DAY
13 | span.glyphicon.glyphicon-plus
14 | div.col-xs-2.col-sm-2.col-md-2.col-lg-2
15 | div#KEY_UP.col-xs-2.col-sm-2.col-md-2.col-lg-2.btn.btn-default.text-center
16 | span.glyphicon.glyphicon-triangle-top
17 | div.col-xs-2.col-sm-2.col-md-2.col-lg-2
18 | div#KEY_PAGE_PLUS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center PG
19 | span.glyphicon.glyphicon-plus
20 | div.row
21 | div#KEY_DAY_MINUS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center DAY
22 | span.glyphicon.glyphicon-minus
23 | div#KEY_LEFT.col-xs-2.col-sm-2.col-md-2.col-lg-2.btn.btn-default.text-center
24 | span.glyphicon.glyphicon-triangle-left
25 | div#KEY_OK.col-xs-2.col-sm-2.col-md-2.col-lg-2.btn.btn-primary.text-center
26 | span.glyphicon.glyphicon-ok
27 | div#KEY_RIGHT.col-xs-2.col-sm-2.col-md-2.col-lg-2.btn.btn-default.text-center
28 | span.glyphicon.glyphicon-triangle-right
29 | div#KEY_PAGE_MINUS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center PG
30 | span.glyphicon.glyphicon-minus
31 | div.row
32 | div#KEY_SETTINGS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center SETTINGS
33 | div.col-xs-2.col-sm-2.col-md-2.col-lg-2
34 | div#KEY_DOWN.col-xs-2.col-sm-2.col-md-2.col-lg-2.btn.btn-default.text-center
35 | span.glyphicon.glyphicon-triangle-bottom
36 | div.col-xs-2.col-sm-2.col-md-2.col-lg-2
37 | div#KEY_EXIT.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center EXIT
38 | div.row
39 | div#KEY_YELLOW.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-warning.text-center A
40 | div#KEY_BLUE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-primary.text-center B
41 | div#KEY_RED.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-danger.text-center C
42 | div#KEY_GREEN.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-success.text-center D
43 | div.row
44 | div#ALT_tv_KEY_VOLUME_UP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center VOL
45 | span.glyphicon.glyphicon-chevron-up
46 | div.col-xs-4.col-sm-4.col-md-4.col-lg-4
47 | div#KEY_CHANNEL_UP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CH
48 | span.glyphicon.glyphicon-chevron-up
49 | div.row
50 | div#ALT_tv_KEY_VOLUME_DOWN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center VOL
51 | span.glyphicon.glyphicon-chevron-down
52 | div#KEY_ON_DEMAND.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-primary.text-center ON DEMAND
53 | div#KEY_CHANNEL_DOWN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CH
54 | span.glyphicon.glyphicon-chevron-down
55 | div.row
56 | div#ALT_tv_KEY_MUTE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center MUTE
57 | span.glyphicon.glyphicon-volume-off
58 | div#KEY_FAVORITE_CHANNEL.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center FAV
59 | span.glyphicon.glyphicon-heart-empty
60 | div#KEY_LAST.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center LAST
61 | div.row
62 | div#KEY_RETURN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center RETURN
63 | div#KEY_LIST.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-success.text-center LIST
64 | span.glyphicon.glyphicon-list
65 | div#KEY_LIVE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center LIVE
66 | div.row
67 | div#KEY_BACKWARD.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
68 | span.glyphicon.glyphicon-backward
69 | div#KEY_PLAY.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
70 | span.glyphicon.glyphicon-play
71 | div#KEY_FORWARD.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
72 | span.glyphicon.glyphicon-forward
73 | div.row
74 | div#KEY_STOP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
75 | span.glyphicon.glyphicon-stop
76 | div#KEY_PAUSE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
77 | span.glyphicon.glyphicon-pause
78 | div#KEY_RECORD.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
79 | span.glyphicon.glyphicon-record.text-danger
80 | div.row
81 | div#KEY_1.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 1
82 | div#KEY_2.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 2
83 | div#KEY_3.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 3
84 | div.row
85 | div#KEY_4.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 4
86 | div#KEY_5.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 5
87 | div#KEY_6.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 6
88 | div.row
89 | div#KEY_7.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 7
90 | div#KEY_8.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 8
91 | div#KEY_9.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 9
92 | div.row
93 | div#KEY_STAR.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
94 | span.glyphicon.glyphicon-asterisk
95 | div#KEY_0.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 0
96 | div#KEY_HASH.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center #
97 |
--------------------------------------------------------------------------------
/views/deviceSelect.pug:
--------------------------------------------------------------------------------
1 | div.container
2 | div.row
3 | div.col-xs-12.col-sm-12.col-md-12.col-lg-12.bg-info.text-center
4 | h1 #{title}
5 | div.row
6 | each key in Object.keys(devices)
7 | div(id='device-'+key, class=' col-xs-'+colWidth+' col-sm-'+colWidth+' col-md-'+colWidth+' col-lg-'+colWidth+' btn btn-info text-center') #{devices[key].label}
8 | div
9 | input#currentDevice(type='hidden', value=device)
10 |
--------------------------------------------------------------------------------
/views/dvd.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block deviceKeys
4 | div.container
5 | div.row
6 | div#KEY_POWER.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-danger.text-center
7 | span.glyphicon.glyphicon-off
8 | div#KEY_DISPLAY.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center DISPLAY
9 | div#KEY_SEARCH_MODE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center SEARCH
10 | div#KEY_OPEN_CLOSE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center EJECT
11 | span.glyphicon.glyphicon-eject
12 | div.row
13 | div#KEY_AUDIO.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center AUDIO
14 | span.glyphicon.glyphicon-volume-up
15 | div#KEY_1.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 1
16 | div#KEY_2.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 2
17 | div#KEY_3.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 3
18 | div.row
19 | div#KEY_SHUFFLE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center SUBS
20 | span.glyphicon.glyphicon-subtitles
21 | div#KEY_4.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 4
22 | div#KEY_5.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 5
23 | div#KEY_6.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 6
24 | div.row
25 | div#KEY_ANGLE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center ANGLE
26 | div#KEY_7.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 7
27 | div#KEY_8.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 8
28 | div#KEY_9.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 9
29 | div.row
30 | div#KEY_REPEAT.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center REPEAT
31 | span.glyphicon.glyphicon-repeat
32 | div#KEY_CLEAR.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center CLEAR
33 | div#KEY_0.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center 0
34 | div#KEY_HDMI.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center HDMI
35 | div.row
36 | div#KEY_A_B.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center A-B
37 | div#KEY_PAUSE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
38 | span.glyphicon.glyphicon-pause
39 | div#KEY_PREVIOUS.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
40 | span.glyphicon.glyphicon-fast-backward
41 | div#KEY_NEXT.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
42 | span.glyphicon.glyphicon-fast-forward
43 | div.row
44 | div#KEY_REWIND.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
45 | span.glyphicon.glyphicon-backward
46 | div#KEY_STOP.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
47 | span.glyphicon.glyphicon-stop
48 | div#KEY_PLAY.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
49 | span.glyphicon.glyphicon-play
50 | div#KEY_FORWARD.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
51 | span.glyphicon.glyphicon-forward
52 | div.row
53 | div#KEY_SETUP.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center SETUP
54 | span.glyphicon.glyphicon-list
55 | div#KEY_TOP_MENU.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center T.MENU
56 | span.glyphicon.glyphicon-list-alt
57 | div#KEY_UP.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
58 | span.glyphicon.glyphicon-triangle-top
59 | div#KEY_MENU.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center MENU
60 | span.glyphicon.glyphicon-menu-hamburger
61 | div.row
62 | div#KEY_MODE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center MODE
63 | div#KEY_LEFT.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
64 | span.glyphicon.glyphicon-triangle-left
65 | div#KEY_ENTER.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center ENTER
66 | div#KEY_RIGHT.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
67 | span.glyphicon.glyphicon-triangle-right
68 | div.row
69 | div#KEY_ZOOM.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center ZOOM
70 | span.glyphicon.glyphicon-fullscreen
71 | div#KEY_ENTER.col-xs-3.col-sm-3.col-md-3.col-lg-3
72 | div#KEY_BOTTOM.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center
73 | span.glyphicon.glyphicon-triangle-bottom
74 | div#KEY_RETURN.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-default.text-center RETURN
75 | span.glyphicon.glyphicon-share-alt
76 |
77 |
--------------------------------------------------------------------------------
/views/error.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block deviceKeys
4 | h1= message
5 | h2= error.status
6 | pre #{error.stack}
7 |
--------------------------------------------------------------------------------
/views/index.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block deviceKeys
4 | h1= title
5 | p Welcome to #{title}
6 |
--------------------------------------------------------------------------------
/views/layout.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html(lang='en')
3 | head
4 | title= title
5 | meta(charset='utf-8')
6 | meta(name='viewport', content='width=device-width, initial-scal=1')
7 | link(rel='stylesheet', href='/css/bootstrap.min.css')
8 | script(src='/js/jquery.min.js')
9 | script(src='/js/bootstrap.min.js')
10 | script(src='/js/lircNodeJsWeb.js')
11 | body
12 | include deviceSelect
13 | block deviceKeys
14 |
--------------------------------------------------------------------------------
/views/tv.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block deviceKeys
4 | div.container
5 | div.row
6 | div#KEY_POWER.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-danger.text-center
7 | span.glyphicon.glyphicon-off
8 | div#MACRO_watch_tv1.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center ALL
9 | span.glyphicon.glyphicon-off
10 | div#KEY_TV.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center TV
11 | span.glyphicon.glyphicon-unchecked
12 | div.row
13 | div#KEY_1.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 1
14 | div#KEY_2.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 2
15 | div#KEY_3.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 3
16 | div.row
17 | div#KEY_4.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 4
18 | div#KEY_5.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 5
19 | div#KEY_6.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 6
20 | div.row
21 | div#KEY_7.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 7
22 | div#KEY_8.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 8
23 | div#KEY_9.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 9
24 | div.row
25 | div#KEY_DASH.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
26 | span.glyphicon.glyphicon-minus
27 | div#KEY_0.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center 0
28 | div#KEY_PREVIOUS_CHANNEL.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center PRE-CH
29 | div.row
30 | div#KEY_VOLUME_UP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center VOL
31 | span.glyphicon.glyphicon-plus
32 | div#KEY_MUTE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center MUTE
33 | span.glyphicon.glyphicon-volume-off
34 | div#KEY_CHANNEL_UP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CH
35 | span.glyphicon.glyphicon-chevron-up
36 | div.row
37 | div#KEY_VOLUME_DOWN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center VOL
38 | span.glyphicon.glyphicon-minus
39 | div#KEY_SOURCE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center SOURCE
40 | span.glyphicon.glyphicon-log-in
41 | div#KEY_CHANNEL_DOWN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CH
42 | span.glyphicon.glyphicon-chevron-down
43 | div.row
44 | div#KEY_CHANNEL_LIST.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CH LIST
45 | span.glyphicon.glyphicon-list
46 | div#KEY_MENU.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center MENU
47 | span.glyphicon.glyphicon-list-alt
48 | div#KEY_FAVORITE_CHANNEL.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center FAV CH
49 | span.glyphicon.glyphicon-heart-empty
50 | div.row
51 | div#KEY_TOOLS.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center TOOLS
52 | span.glyphicon.glyphicon-wrench
53 | div#KEY_UP.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
54 | span.glyphicon.glyphicon-triangle-top
55 | div#KEY_RETURN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center RETURN
56 | span.glyphicon.glyphicon-share-alt
57 | div.row
58 | div#KEY_LEFT.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
59 | span.glyphicon.glyphicon-triangle-left
60 | div#KEY_ENTER.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center ENTER
61 | div#KEY_RIGHT.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
62 | span.glyphicon.glyphicon-triangle-right
63 | div.row
64 | div#KEY_INFO.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center INFO
65 | span.glyphicon.glyphicon-info-sign
66 | div#KEY_DOWN.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center
67 | span.glyphicon.glyphicon-triangle-bottom
68 | div#KEY_EXIT.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center EXIT
69 | span.glyphicon.glyphicon-share
70 | div.row
71 | div#KEY_RED.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-danger.text-center RED
72 | div#KEY_GREEN.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-success.text-center GREEN
73 | div#KEY_YELLOW.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-warning.text-center YELLOW
74 | div#KEY_BLUE.col-xs-3.col-sm-3.col-md-3.col-lg-3.btn.btn-primary.text-center BLUE
75 | div.row
76 | div#KEY_SIZE.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center SIZE
77 | span.glyphicon.glyphicon-resize-full
78 | div#KEY_MTS.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center MTS
79 | span.glyphicon.glyphicon-volume-up
80 | div#KEY_CC.col-xs-4.col-sm-4.col-md-4.col-lg-4.btn.btn-default.text-center CC
81 | span.glyphicon.glyphicon-subtitles
82 | div.row
83 | div#MACRO_toon_tv.col-xs-6.col-sm-6.col-md-6.col-lg-6.btn.btn-default.text-center Toon Network
84 | div#MACRO_game_input.col-xs-6.col-sm-6.col-md-6.col-lg-6.btn.btn-default.text-center Game Input
85 |
--------------------------------------------------------------------------------