Open 204maker opened 2 years ago
Hi, @204maker
As I understand it, you want to use setChargingProfile?
In this script, there is no universal constructor for commands, since commands have different paths, required data. I'll try to watch it over the next few days.
Added 'SetChargingProfile'.
To avoid customizing the script, you can simply change the script code in several places.
$stevePathArray = array(
// Local cmd (not use)
'signin' => '/' . $supervision . '/manager/signin',
'getTransaction' => '/' . $supervision . '/manager/transactions',
'getConnectorState' => '/' . $supervision . '/manager/home/connectorStatus',
// OCPP cmd
'ReserveNow' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/ReserveNow',
'RemoteStartTransaction' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/RemoteStartTransaction',
'RemoteStopTransaction' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/RemoteStopTransaction',
'UnlockConnector' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/UnlockConnector',
'DataTransfer' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/DataTransfer',
'Reset' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/Reset',
'SetChargingProfile' => '/' . $supervision . '/manager/operations/' . $ocppVersion . '/SetChargingProfile'
);
case 'SetChargingProfile':
$allow = true; // Allow command?
if($allow) {
// Redirect to SetChargingProfile page
$content = curlConnectTo($steveServerAddres, $stevePath);
// Get token
$token = getCSRFToken($content);
// Prepare form
$form = "chargePointSelectList=".$ocppProtocol.";".$getData['ChargeBoxID'].";".$endpointURL."&connectorId=".$getData['ConnectorID']."&chargingProfilePk=".$getData['ChargingProfileID']."&_csrf=".$token."";
// Send form
curl_setopt($curl, CURLOPT_POSTFIELDS, $form);
curl_exec($curl);
return 'Ok';
}
break;
Call:
curl "http://localhost:8080/main.php?key=1234&ChargeBoxID=Ecc029&cmd=SetChargingProfile&ChargingProfileID=1&ConnectorID=0"
Thank you so much! I was able to test it successfully today.
How about the MeterValues command? For example, Current.Export or Current.Import as measurand?
If I understand correctly, when charging, the station itself transmits the values of Current.Import, Current.Export?
You just want to get the freshest data from the transaction status page?
Or a request via TriggerMessage? (I do not know if he gives there values for the charging current)
The idea would be to use the Current.Import or Current.Export to act as a trigger/flag to indicate that charging have started/ended. Our SteVe server is currently down so I have not tried this yet.
Also, with the RemoteStartTransaction command, is it possible to call add a Charging Profile ID to it?
Hi @204maker,
Unfortunately, I will not have time to add this command, as I have to leave for a long time.
I really wanted to help you. Sorry.
Perhaps someone can help you with this, with knowledge of PHP, or try it yourself (the most important thing is to determine what data needs to be sent / received, this can be done through the web inspector in the browser and then you can use command templates).
Hai @DeltaVetal26 i implemented steve and api instences.
how to get the data from respective transcation id including start value, stop value, current voltage values, etc.
I would like to change the Charging Profile on-the-fly on the charge point, may I ask how will I be able to add this command on the Php file?