return Constants.DEFAULT_HEARTBEAT_INTERVAL
}
- public setSupervisionUrls (urls: string | string[], saveStationInfo = true): void {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- this.stationInfo!.supervisionUrls = urls
- if (saveStationInfo) {
- this.saveStationInfo()
- }
- this.configuredSupervisionUrl = this.getConfiguredSupervisionUrl()
- }
-
public setSupervisionUrl (url: string): void {
if (
this.stationInfo?.supervisionUrlOcppConfiguration === true &&
) {
setConfigurationKeyValue(this, this.stationInfo.supervisionUrlOcppKey, url)
} else {
- this.setSupervisionUrls(url)
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ this.stationInfo!.supervisionUrls = url
+ this.configuredSupervisionUrl = this.getConfiguredSupervisionUrl()
+ this.saveStationInfo()
}
}
stationInfoFromFile.templateHash === stationInfoFromTemplate.templateHash
) {
return setChargingStationOptions(
- this,
{ ...Constants.DEFAULT_STATION_INFO, ...stationInfoFromFile },
options
)
stationInfoFromTemplate
)
return setChargingStationOptions(
- this,
{ ...Constants.DEFAULT_STATION_INFO, ...stationInfoFromTemplate },
options
)
}
export const setChargingStationOptions = (
- chargingStation: ChargingStation,
stationInfo: ChargingStationInfo,
options?: ChargingStationOptions
): ChargingStationInfo => {
if (options?.supervisionUrls != null) {
- chargingStation.setSupervisionUrls(options.supervisionUrls, false)
+ stationInfo.supervisionUrls = options.supervisionUrls
}
if (options?.persistentConfiguration != null) {
stationInfo.stationInfoPersistentConfiguration = options.persistentConfiguration
name="number-of-stations"
placeholder="number of stations"
/>
- <p>Options:</p>
+ <p>Template options overrides:</p>
<ul>
+ <li>
+ Supervision url:
+ <input
+ id="supervision-url"
+ v-model.trim="state.supervisionUrl"
+ type="url"
+ name="supervision-url"
+ placeholder="wss://"
+ />
+ </li>
<li>
Auto start:
<input v-model="state.autoStart" type="checkbox" true-value="true" false-value="false" />
() => {
uiClient
.addChargingStations(state.template, state.numberOfStations, {
+ supervisionUrls: state.supervisionUrl.length > 0 ? state.supervisionUrl : undefined,
autoStart: convertToBoolean(state.autoStart),
persistentConfiguration: convertToBoolean(state.persistentConfiguration),
ocppStrictCompliance: convertToBoolean(state.ocppStrictCompliance),
ready: false,
template: '',
numberOfStations: 1,
+ supervisionUrl: '',
autoStart: false,
persistentConfiguration: true,
ocppStrictCompliance: true,