-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.php
More file actions
72 lines (50 loc) · 2.32 KB
/
info.php
File metadata and controls
72 lines (50 loc) · 2.32 KB
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
<?php
include "header.php";
?>
<div style="margin-top: 40px;">
<!--
Each "widget" element below defines a single widget.
Each widget needs 3 data attributes: type, item & title.
The other attributes only apply to certain types.
TODO:
This is just an example setup - replace it with the widgets you want to show!
The different data attributes:
- type: switch, sensor, openclose, weather, trash
- item: exact same item name as in OpenHAB items file
- title: text to display in bottom part of widget
- history: add this for items that use persistence (logging)
- icon: [optional] [type=switch only]
see https://fortawesome.github.io/Font-Awesome/icons/ for possible values
when omitted defaults to a lightbulb
- format: [optional] [type=sensor only]
can be used to add characters around the value returned
- trashday/recycleday: [type=trash only]
Trash days; values range from 0 (Sunday) to 6 (Saturday)
-->
<center>
<a href="presence.php"><widget><div class="row" style="margin-top: 2%"><br>
<b><?php
$dom = file_get_contents('http://localhost:8880/rest/items/dom/state');
$eli = file_get_contents('http://localhost:8880/rest/items/eli/state');
echo "Dominic: ",str_replace("OFF","Absent",str_replace("ON","Présent",$dom)),"<br>","Éliane: ",str_replace("OFF","Absente",str_replace("ON","Présente",$eli));
?><br> <br>Présence</b></div></widget></a> </b>
<a href="historiqueBatt.php"><widget><div class="row" style="margin-top: 2%"><br>
<b><?php
$Batdom1 = file_get_contents('http://localhost:8880/rest/items/BatDom1/state');
$Bateli1 = file_get_contents('http://localhost:8880/rest/items/BatEli1/state');
echo "Dominic: ",$Batdom1,"%","<br>","Éliane: ",$Bateli1,"%";
?><br> <br>Batterie iPhone</b></div></widget></a> </b>
<a href="#"><widget><div class="row" style="margin-top: 2%">
<b><?php
$salon = file_get_contents('http://localhost:8880/rest/items/State/state');
echo "Salon: ",$salon,"<br>";
echo "chambre: ",$salon,"<br>";
echo "Toillette: ",$salon,"<br>";
?><br>kodi</b></div></widget></a> </b>
<widget data-type="openclose" data-item="rgbw" data-title="Porte Avant"></widget>
<widget data-type="trash" data-title="Trash" data-trashday="3" data-recycleday="4"></widget>
</center>
</div>
<?php
include "footer.php";
?>