summaryrefslogtreecommitdiff
path: root/localwebsite/handlers/InverterHandler.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-09-27 00:54:34 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-09-27 00:54:34 +0300
commitb7cbc2571c1870b4582ead45277d0aa7f961bec8 (patch)
tree2e90c5bb00284d603ca73bc4a2253ff0e5ee51f4 /localwebsite/handlers/InverterHandler.php
parent3e3753d726f8a02d98368f20f77dd9fa739e3d80 (diff)
lws: routing updates
Diffstat (limited to 'localwebsite/handlers/InverterHandler.php')
-rw-r--r--localwebsite/handlers/InverterHandler.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/localwebsite/handlers/InverterHandler.php b/localwebsite/handlers/InverterHandler.php
index 7098e2c..5fa269f 100644
--- a/localwebsite/handlers/InverterHandler.php
+++ b/localwebsite/handlers/InverterHandler.php
@@ -93,10 +93,12 @@ class InverterHandler extends RequestHandler
protected function getClient(): InverterdClient {
global $config;
+ if (isset($_GET['alt']) && $_GET['alt'] == 1)
+ $config['inverterd_host'] = '192.168.5.223';
$inv = new InverterdClient($config['inverterd_host'], $config['inverterd_port']);
$inv->setFormat('json');
return $inv;
}
-} \ No newline at end of file
+}