From b7cbc2571c1870b4582ead45277d0aa7f961bec8 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 27 Sep 2023 00:54:34 +0300 Subject: lws: routing updates --- localwebsite/handlers/InverterHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'localwebsite/handlers/InverterHandler.php') 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 +} -- cgit v1.2.3