Nå virker det!
Vet ikke helt hva som gjorde utslaget, for et eller annet sted i feilsøkingen har jeg greid å ta vekk "echo $response"... ?
<?php
$json = '{"query":"{viewer {homes {currentSubscription {priceInfo {current {total energy tax startsAt }}}}}}"}';
# Create a connection
$ch = curl_init('https://api.tibber.com/v1-beta/gql');
# Setting our options
curl_setopt($ch, CURLOPT_URL, 'https://api.tibber.com/v1-beta/gql');
curl_setopt($ch, CURLOPT_HTTPHEADER,
array('Content-Type: application/json',
'Authorization: Bearer d1007ead2dc84a2b82f0de19451c5fb22112f7ae11d19bf2bedb224a003ff74a'));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
# Get the response
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>';
echo $json.'<br>';
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
?>
Da er det bare å dytte den inn i HomeSeer via JSON-interfacet, inntil @Moskus får laget en Tibber-plugin...