Skip to content

Commit

Permalink
New version HTTPSRV without php
Browse files Browse the repository at this point in the history
  • Loading branch information
knowthelist committed Mar 1, 2015
1 parent 414b009 commit d453287
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 354 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ Requires

Install
-------
Copy all to your local webserver which supports php scripts.
FHEM must provide Telnet service (default port is 7072).
* create a new folder named 'tablet' in /<fhem-path>/www
* copy all files incl. sub folders into /<fhem-path>/www/tablet
* add 'define tablet_ui HTTPSRV tablet ./www/tablet Tablet Frontend' in fhem.cfg
* Tadaaa! A new fhem ui in http://<fhem-url>:8083/fhem/tablet


Usage
Configure
-------
Just configure the **index.html** to change the dashboard for your needs.

Change the host name and port according to your FHEM server
```html
<meta name="fhem-host" content="localhost">
<meta name="fhem-port" content="7072">
```
Change the wiget container according your rooms
```html
<li data-row="2" data-col="2" data-sizex="2" data-sizey="2">
Expand Down Expand Up @@ -68,10 +64,23 @@ Currently there are 7 types of widgets.
- **volume** : dial to set a single value (e.g. 0-60)
- **homestatus** : selector for 4 states (1=home,2=night,3=away,4=holiday)

The ui gets/sets the fhem parameter 'state' (not 'STATE').

######Thermostat
Configure as device='...' that item which delivers temp, desired-temp and valve as one line on reading 'state'
like this: `T: 17.5 desired: 16.0 valve: 0`

######Label
Example for HM-WDS40-TH-I Funk-Temperatur-/Feuchtesensor innen
```
state T: 20.0 H: 61
```
```html
<div type="label" device="THSensorWZ" data-part="2" data-unit="%B0C%0A" class="cell big"></div>
<div type="label" class="cell">Temperatur</div>
<div type="label" device="THSensorWZ" data-part="4" data-unit="%" class="cell big"></div>
<div type="label" class="cell">Luftfeuchte</div>
```

License
-------
Expand Down
64 changes: 41 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
<html>
<title>FHEM</title>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="fhem-host" content="localhost">
<meta name="fhem-port" content="7072"> <!-- FHEM must provide Telnet service -->
<meta name="widget_base_width" content="116">
<meta name="widget_base_height" content="131">

<!--
/* FHEM tablet ui */
/*
* Just another dashboard for FHEM
*
* Version: 1.1.0
* Requires: jQuery v1.7+, font-awesome, jquery.gridster, jquery.toast
* URL: https://github.com/knowthelist/fhem-tablet-ui
*
* Copyright (c) 2015 Mario Stephan <mstephan@shared-files.de>
* Under MIT License (http://www.opensource.org/licenses/mit-license.php)
*
* - create a new folder named 'tablet' in /<fhem-path>/www
* - copy all files incl. sub folders into /<fhem-path>/www/tablet
* - add 'define tablet_ui HTTPSRV tablet ./www/tablet Tablet Frontend' in fhem.cfg
* - Tadaaa! A new fhem ui in http://<fhem-url>:8083/fhem/tablet/
*/
-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="widget_base_width" content="116">
<meta name="widget_base_height" content="131">

<link rel="stylesheet" href="/fhem/tablet/lib/jquery.gridster.min.css" />
<link rel="stylesheet" href="/fhem/tablet/css/fhem-tablet-ui.css" />
<link rel="stylesheet" href="/fhem/tablet/lib/font-awesome.min.css" />
<link rel="stylesheet" href="/fhem/tablet/lib/jquery.toast.min.css" />

<script type="text/javascript" src="/fhem/pgm2/jquery.min.js"></script>
<script type="text/javascript" src="/fhem/tablet/lib/jquery.gridster.min.js"></script>
<script type="text/javascript" src="/fhem/pgm2/jquery.knob.min.js"></script>
<script type="text/javascript" src="/fhem/tablet/lib/jquery.toast.min.js"></script>
<script type="text/javascript" src="/fhem/tablet/lib/fa-multi-button.min.js"></script>
<script type="text/javascript" src="/fhem/tablet/js/fhem-tablet-ui.js"></script>

<!-- Enable this lines for usage with WebViewControl --><!--
<script type="text/javascript" src="/fhem/pgm2/cordova-2.3.0.js"></script>
<script type="text/javascript" src="/fhem/js/webviewcontrol.js"></script>
<script type="text/javascript">var wvcDevices = {'12345': 'Tablet'}; var wvcUserCssFile="webviewcontrol.css"</script>
--><!-- End for WebViewControl -->
</head>
<body></body>

<link rel="stylesheet" href="lib/jquery.gridster.min.css" />
<link rel="stylesheet" href="css/fhem-tablet-ui.css" />
<link rel="stylesheet" href="lib/font-awesome.min.css" />
<link rel="stylesheet" href="lib/jquery.toast.min.css" />

<script type="text/javascript" src="lib/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="lib/jquery.gridster.min.js"></script>
<script type="text/javascript" src="lib/jquery.knob.min.js"></script>
<script type="text/javascript" src="lib/jquery.toast.min.js"></script>

<script type="text/javascript" src="js/fa-multi-button.min.js"></script>
<script type="text/javascript" src="js/fhem-tablet-ui.js"></script>

<body>

<div class="gridster">
<ul>
Expand Down Expand Up @@ -122,8 +141,7 @@
</div>
</li>


</ul>
</div>

</body>
</html>
226 changes: 0 additions & 226 deletions js/fa-multi-button.js

This file was deleted.

Loading

0 comments on commit d453287

Please sign in to comment.