Hey,
Why can’t I retrieve any data at the Presence endpoint (→ ManagerPresence - Homey Web API)? Everything else works fine.
Hey,
Why can’t I retrieve any data at the Presence endpoint (→ ManagerPresence - Homey Web API)? Everything else works fine.
Maybe you should share or point to the code you use for it?
Otherwise I’m afraid you won’t get any sensible reply ![]()
“Code or it didn’t happen”
this work:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $remote_url . '/api/manager/devices/device',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array('Authorization: Bearer ' . $homey_api_data['api_key'], 'accept: application/json'),
));
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
and this, for presence not:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $remote_url . '/api/manager/presence/state',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array('Authorization: Bearer ' . $homey_api_data['api_key'], 'accept: application/json'),
));
$response = curl_exec($curl);
curl_close($curl);
print_r(json_decode($response, true));
only the URL is an other one
the output of this request is empty
And now?