-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (85 loc) · 7.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<html>
<!--
index -
Copyright (c) 2017 Marco Sillano. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<head>
<link rel="stylesheet" type="text/css" href="./css/style.css"> </head>
<body>
<h1> Management and test of <code>remotesDB</code> </h1>
<div class='note'> <code><b>remotesDB</b></code> is my tentative definition of a 'good' Data Base for IRP storage, to work with irp_classes and build 'good' user-oriented IR applications.
<br> This DB can be used for WEB home applications, but also on more exigent conditions e.g. to do sites like <a href="http://irdb.tk/find/">irdb</a> that creates data set and raw codes on demand.
<ul>
<li>Stores IRP and commands, in 4 formats: 'HEX' (0x003E20), protocol and device 'DATA SET' ('F=2') and RAW-1.
<li>Because it stores RAW commands, you can implement 'learn and repeat' strategies in case of unknown IRP.
<li><code>remotesDB</code> can handle IR 'universal' controls, using idRemote + 'code' as PK.
<li>Stores also UI oriented informations, like remote controls layouts.
<li>Stores generic reference data, like photos and documentation or external urls.
<li><code>remotesDB</code> uses views and stored procedures to make it easy to write custom applications.
</ul>
Some demo pages illustrates the features of <code>remotesDB</code>.
</div>
<hr>
<div class='note'>
<h3>Management tools:</h3> This IR remote controls database can be filled using standard applications, like phpMyAdmin or custom CRUD programs.
<BR> How it works, you can see looking at some demo tools that I wrote to populate and test the <code>remotesDB</code>.<br> The php code is layered: low-level access to db is in <code>irp_commonSQL</code>, tools for <code>remotesDB</code> are in <code>irp_remoteDB_tools</code>,<code>irp_remoteDB_raw</code> and <code>irp_remoteDB_stream</code>. They are setter and getter functions, and php wrapper to hi-level stored procedures.
<br>An informal introduction to <code>remotesDB</code> concepts can be found <a href='./documents/remoteDB/remoteDB-concepts1.pdf' target="_blank">here</a>, or you can look at <a href='./documents/remoteDB/remoteDB-concepts2.pdf' target="_blank">logical shema</a>. </div>
<DL>
<DT><A href="test_keyfromfile.php">Use a text file to fill the <code>irp_actions</code> table</A></DT>
<DD>A list of standard KEY_NAMES and their texts for UI is read and the DB is updated
<br> Custom keys can be added, when required, using the convention NAME_KEY. </DD>
<br>
<DT><A href="test_file2remote.php">Use 'lirc' and 'sheet' files to update the remote controls codes.</A></DT>
<DD>This allows you to import 'lirc' remote control definitions and import/export 'sheet' definitions (a standard more rich than lirc). These text 'sheet' can be edited, then the sheet can be imported again to update the DB.<br>
On demo, sheets: <ul>
<li><b>hitachi_CLE941.lirc.txt</b>: lirc file for hitachi CLE941 remote control
<li><b>rem_hitachi_cle941_sheet.txt</b>: sheet for hitachi CLE941 remote control
<li><b>rem_chunghop_e936_C0023_sheet.txt</b>: sheet for chunghop e936 universal remote, code C0023
<li><b>rem_chunghop_ac188s_A695_sheet.txt</b>: sheet for chunghop ac188s universal remote with status and dynamic keys, code A695
<li><b>rem_united_unknown_sheet.txt</b>: sheet for united control, no model, unknown IRP (learn and repeat).
</ul>
</DD>
<BR>
<DT><A href="test_fillUpd.php">Fill/update tool: completes IR streams data and/or update Device tables</A></DT>
<DD>If a protocol is with IRP, this tool uses <code>IRP_classes</code> to update HEX, DATA SETS, RAW fields starting from captured RAW. In any case it calculates the CRC32 of RAW data, used as fast index. It also can update the Devices tables from Remote Control data. </DD>
</DL>
<BR>
<div class='note'>
<h3>User interface test:</h3> The <b>remotesDB</b> is very complete and can be used in many different ways. This DB is IRP/application oriented, and it is born to be used with <code>IRP_classes</code> to build smart home automation applications.
<br> The use of php and mySQL and the web interface make it easy to write your custom applications. The management phase is 'una tantum', so it can be crude, but the applications must be very user friendly.
<br> As demo I make 2 examples, and together they are a (quasi) complete application: one page allows you to capture and store streams from a real IR Remote Control (learning) while the second page allows you to send IR commands to devices by clicking an universal simulate Remote Control, that can simulate any control in DB. Of course you can do that also from your smart-phone. </div>
<DL>
<DT><A href="test_captureraw.php">Learning: RAW capture</A></DT>
<DD>Captures and stores RAW remote commands with/without IRP</DD>
<br>
<DT><A href="test_remote.php">Remote Control simulation</A></DT>
<DD>Simple IR Remote Control on screen: full working universal simulation.<br>
On demo, devices: <ul>
<li><b>HITACHI CL32WF740AN</b>: a TV set with with its remote control and a second 'universal' control, known IRP. </li>
<li><b>united LED22H26</b>: another TV set with its remote control, but unknown (for test) IRP.</li>
<li><b>fujitsu aircon_test</b>: an air conditioner with 'universal' remote control, to test status and dynamic keys, known IRP.</li>
</ul>
</DD>
</DL>
<div class='note'>
This demo use <a href="https://github.com/msillano/irp_classes">irp_classes</a> and requires Arduino and serial php.<br>
Download irp_classes and copy it in <code>.../www/phpIRPlib/</code>. Download <a href="http://www.thebyteworks.com/">PHP serial</a> free and install it.<br>
Arduino schema and sketch are in https://github.com/msillano/irp_classes/tree/master/Arduino, it requires <a href="https://github.com/cyborg5/IRLib2">IRlib2</a>.<hr>
If you like to test the remotesDB demo without hardware and without serial, replaces in files <code>usr_simplerawRX.php</code> and <code>usr_simpleSerialTX.php</code> the include: <code>require_once ("$d/../phpIRPlib/irp_rxtxArduino.php");</code> with <code>require_once ("$d/irp_rxtxZero.php");</code>.<br>
If you have some different HW, you must rewrite <code>irp_rxtxArduino.php</code> to work with your IR rxtx.
</div>
<hr>
<center> <a href="./../phpIRPlib/index.html">to phpIRPlib test</a> >>> </center>
</body>
</html>