-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
executable file
·31 lines (19 loc) · 933 Bytes
/
index.php
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
<?php
include("header.inc.php");
$gardena = new gardena($user, $pw);
$mower = $gardena -> getFirstDeviceOfCategory($gardena::CATEGORY_MOWER);
//$gardena -> sendCommand($mower, $gardena -> CMD_MOWER_PARK_UNTIL_FURTHER_NOTICE);
//$gardena -> sendCommand($mower, $gardena -> CMD_MOWER_PARK_UNTIL_NEXT_TIMER);
//$gardena -> sendCommand($mower, $gardena -> CMD_MOWER_START_24HOURS);
//echo $mower -> id;
//echo $gardena -> getMowerState($mower);
//echo json_encode($mower);
//echo json_encode($mower -> abilities);
echo $gardena -> getConnectionDataFriendly($mower);
echo "<br>state: ".$gardena -> getMowerState($mower);
//var_dump($mower);
//Watering Computer
$watercontrol = $gardena -> getFirstDeviceOfCategory($gardena::CATEGORY_WATERINGCOMPUTER);
echo $gardena -> getWateringComputerDataFriendly($watercontrol);
$gardena -> sendCommand($watercontrol, $gardena -> CMD_WATERINGCOMPUTER_STOP);
?>