Before today i could send data to PvOut by using cURL from my Synology with this script
curl -d “d=20230725” -d “t=21:15” -d “v1=65190” -d “v2=0” -d “v3=124” -d “v4=505” -d “v5=16.2” -d “v6=236” -d “v7=30.194” -d “v8=8.782” -d “c1=1” -H “X-Pvoutput-Apikey: MyApiKey” -H “X-Pvoutput-SystemId: MySystemId” https://pvoutput.org/service/r2/addstatus.jsp
No i’ll get always a ‘Invalid SystemId’, while nothing changed…
I’m trying to get it running by using this script within .PHP
<?php $url = "https://pvoutput.org/service/r2/addstatus.jsp"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $headers = array( "Accept: application/json", "Content-Type: application/json", ); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); $data = '-d "d=20230726" -d "t=23:10" -d "v1=36459322" -d "v2=0" -d "v3=140" -d "v4=770" -d "v5=14.9" -d "v6=236.3" -d "c1=1" -H "X-Pvoutput-Apikey: MyApiKey" -H "X-Pvoutput-SystemId: MySystemId"'; curl_setopt($curl, CURLOPT_POSTFIELDS, $data); $resp = curl_exec($curl); curl_close($curl); echo $resp; ?>Response is also
Unauthorized 401: Invalid System ID
Do have anyone a suggestion ?
Thanks a lot
Rob