diff --git a/demandshaper-module/Views/add_device.php b/demandshaper-module/Views/add_device.php index 70c6ee5..5405b37 100644 --- a/demandshaper-module/Views/add_device.php +++ b/demandshaper-module/Views/add_device.php @@ -11,10 +11,19 @@ */ $v=2; -global $path; +global $path, $mysqli, $redis, $user, $session, $settings; $emoncmspath = $path; +if ($remoteaccess) $emoncmspath .= "remoteaccess/"; // if ($remoteaccess) $emoncmspath .= "remoteaccess/"; if (isset($_GET['apikey'])) $apikeystr = "&apikey=".$_GET['apikey']; else $apikeystr = ""; + +$device = false; +if (file_exists("Modules/device/device_model.php")) { + require_once "Modules/device/device_model.php"; + $device = new Device($mysqli, $redis); +} + +$u = $user->get($session['userid']) ?> @@ -55,6 +64,28 @@
4. With the smartplug WIFI settings configured, connect back to you home network and keep this window open. After a couple of minutes a notice will appear asking whether to allow device at the given ip address to connect. Click allow and wait a couple of minutes for the smart plug to appear in the left hand menu. Click on the smart plug to start scheduling it.
+ +