Skip to content

Commit

Permalink
Smarthomedevices als Virtuelle Zähler...
Browse files Browse the repository at this point in the history
Mit diesen PHP und url files s ist es möglich die bisherigen Smarthomedgerät in openwb 2.0 als virtuelle Zähler auf der Hauptseite anzuzeigen. Jeder Smarthomegerät muss wie folgt erfasst werden:
Hersteller Universell
Verfügbare Geräte HTTP
Bezeichnung  Stiebel
Server URL http://192.168.1.246/openWB/packages/modules/smarthome
Wobei die 192.168.1.246 mit der eigenen IP ersetzt werden muss
Pfad für Leistung /leistung1.php
Pfad für Zählerstand Bezug /bezug1.php
Pfad für Zählerstand Einspeisung  /Einspeisung1.php
(Wobei 1 mit der jeweiligen Nummer vom Smarthomegerät ersetzt werden muss).
Anschliessend werden die Smarthomegeräte auf der Hauptseite angezeigt.
Unter Auswertungen werden die neuen virtuellem Zähler nicht angezeigt, hier werden die bestehenden Smarthomegeräte korrekt angezeigt.
  • Loading branch information
okaegi committed Dec 7, 2024
1 parent ac93afb commit 00a0fe4
Show file tree
Hide file tree
Showing 27 changed files with 153 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device1_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device2_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device3_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device4_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device5_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device6_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug7.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device7_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device8_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/bezug9.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device9_wh";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a / 1000;
} else { echo 0; }
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung7.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
3 changes: 3 additions & 0 deletions packages/modules/smarthome/einspeisung9.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 0
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device1_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device2_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device3_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device4_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device5_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device6_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung7.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device7_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung8.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device8_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>
7 changes: 7 additions & 0 deletions packages/modules/smarthome/leistung9.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$file = "/var/www/html/openWB/ramdisk/device9_watt";
if (is_file($file)) {
$a = file_get_contents($file);
echo $a;
} else { echo 0; }
?>

0 comments on commit 00a0fe4

Please sign in to comment.