forked from MiniMeOSc/phpTradfri
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgateway.php
More file actions
30 lines (18 loc) · 677 Bytes
/
gateway.php
File metadata and controls
30 lines (18 loc) · 677 Bytes
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
<?php
require_once('general.php');
class tradfrigateway extends tradfri
{
function reboot(){
$this->action("post", "", "15011/9030");
// Response
// v:1 t:CON c:POST i:3bb9 {} [ ]
// decrypt_verify(): found 24 bytes cleartext
// decrypt_verify(): found 4 bytes cleartext
}
function statusgateway(){
$details = $this->getDetails(GATEWAY."/15012");
$output = array('setup' => $details[GATEWAY_SETUP_TIME], 'ntp' => $details[GATEWAY_NTP], 'time' => $details[GATEWAY_TIME_UNIX], 'firmware' => $details[GATEWAY_FIRMWARE], 'alexa' => $details[GATEWAY_ALEXA_STATUS], 'google' => $details[GATEWAY_GOOGLE_STATUS]);
return $output;
}
}
?>