Personal log of yet another digital native.
http://IP
installinstaller123 or Evcharging123 (the latter if your provisioner changed it per the Installation Guide).Advanced / OCPPBasic / Server:
9000centralOcular-IQ-Garagewsws://[HASS-IP]:9000/central/Ocular-IQ-GarageAvailability toggleCharge Control toggle (unknown function)Maximum Current slider 0-32A (for my single phase charger)Session Current Limit greeyed our slider no values (possibly only active during charge or a read-only sensor?)Current ImportCurrent OfferedEnergy Active Import RegisterEnergy Meter StartEnergy SessionSoCStop ReasonTemperatureTime SessionTransation IdVoltageReset buttonUnlock buttonStatus Firmware, Timestamp Config Response, and Tiemstamp Data Transfer.Tools/Actions and the following YAML action:
action: ocpp.get_configuration
data:
devid: charger
sDomain: [HASS-IP]sPort: '9000'sURL: /centralId: Ocular-IQ-GaragewPwd.bsDomain: ocpp.ocularcharging.com.aubsPort: '9113'bsURL: /ocpp/energybId: [SERIAL]SE5000H-[SERIAL] deviceWND-3Y-400-MB devicebsDomain to its existing value:
action: ocpp.configure
data:
devid: charger
ocpp_key: bsDomain
value: ocpp.ocularcharging.com.au
reboot_required: false action: ocpp.configure
data:
devid: charger
ocpp_key: bsDomain
value: "[HASS-IP]"
reboot_required: true action: ocpp.get_configuration
data:
devid: charger
bsDomain: [HASS-IP]bsPort, bsURL to match non-b entries.bId to Ocular-IQ-MeterbsecurityProfile from 2 to 0 to match securityProfile key.
action: ocpp.configure
data:
devid: charger
ocpp_key: bsecurityProfile
value: 0
[custom_components.ocpp] Charger websocket path=/central/Ocular-IQ-MeterOpen Charge Point Protocol (OCPP) device so I added it with configuration:
meterLatency Ping and Latency Pong just like the charger itself.meterValue data containing CT current, grid power, eco mode, and solar-enabled status.powerToGrid matched solar export in watts; negative values are assumed to represent import, pending confirmation.EcoMode configuration key. Ideally this would become a writable control, but its values and write behaviour still need investigation.ocpp.configure for primary device charger:
bsPort -> sPortbsDomain -> sDomainbsURL -> sURLbsecurityProfile -> securityProfilebId -> Ocular-IQ-Meter or similar to distinguish from Ocular-IQ-ChargerData transfer received from Ocular-IQ-Meter:Connection latency from 'central' to 'Ocular-IQ-Meter':sensor.py in the OCPP custom integration to add support for the new meter values. Just before if num_connectors > 1
if cpid == "meter":
for metric in (
"Current.Ocular.Grid",
"Power.Active.Ocular.Grid",
"Ocular.EcoMode",
"Ocular.SolarEnabled",
):
entities.append(
ChargePointMetric(
hass,
central_system,
cpid,
_mk_desc(metric),
connector_id=None,
charger_device_id=charger_device_id,
)
)
ocppv16.py and replace the `on_data_transfer_method with:
@on(Action.data_transfer)
def on_data_transfer(self, vendor_id, **kwargs):
"""Handle a Data transfer request."""
_LOGGER.debug("Data transfer received from %s: %s", self.id, kwargs)
self._metrics[0][cdet.data_transfer].value = datetime.now(tz=UTC)
self._metrics[0][cdet.data_transfer].extra_attr = {vendor_id: kwargs}
if (
self.id == "Ocular-IQ-Meter"
and vendor_id == "IoCharger"
and kwargs.get("message_id") == "meterValue"
):
try:
payload = json.loads(kwargs["data"])
grid = payload["sampledValue"]["powerGrid"][0]
current = float(grid["current"][0])
power = float(grid["powerToGrid"])
eco_mode = payload["ecoMode"]
solar_enabled = payload["enableSolar"]
if not math.isfinite(current) or not math.isfinite(power):
raise ValueError("Non-finite grid measurement")
if not isinstance(eco_mode, str) or not isinstance(solar_enabled, bool):
raise ValueError("Invalid eco mode or solar-enabled value")
values = {
"Current.Ocular.Grid": (current, "A"),
"Power.Active.Ocular.Grid": (power, "W"),
"Ocular.EcoMode": (eco_mode, None),
"Ocular.SolarEnabled": (
"Enabled" if solar_enabled else "Disabled",
None,
),
}
for key, (value, unit) in values.items():
self._metrics[0][key].value = value
self._metrics[0][key].unit = unit
self._async_refresh_metric_entities(list(values))
except (KeyError, IndexError, TypeError, ValueError) as err:
_LOGGER.warning("Invalid Ocular meterValue from %s: %s", self.id, err)
return call_result.DataTransfer(status=DataTransferStatus.accepted.value)
Current.Ocular.Grid which correlated 95% to the grid current reading from Solaredge Modbus.Power.Active.Ocular.Grid which correlated 95% to the grid power reading from Solaredge Modbus.Ocular.EcoMode which required further investigation to determine numeric range.Ocular.SolarEnabled which required further investigation but may be a sensor indicating that on the charger, enableSolar was set to 1.Ocular.EcoMode and Ocular.SolarEnabled values correspond to:
Ocular.SolarEnabled and charger enableSolar values.enableSolar from 1 to 0 and observe changes in Ocular.SolarEnabled sensor.
action: ocpp.configure
data:
devid: charger
ocpp_key: enableSolar
value: "0"
reboot_required: true
Ocular.SolarEnabled changed to Disabled!1Ocular.SolarEnabled changed back to Enabled!EcoMode from 1 to 0 and observe changes in meter Ocular.EcoMode sensor.
action: ocpp.configure
data:
devid: charger
ocpp_key: EcoMode
value: "0"
reboot_required: true
Ocular.EcoMode changed from PV to Fast, which corresponds to known advertised charge modes!EcoMode from 0 to 2 and observe changes in meter Ocular.EcoMode sensor.
action: ocpp.configure
data:
devid: charger
ocpp_key: EcoMode
value: "2"
reboot_required: true
Ocular.EcoMode changed from PV to PV_plus, which corresponds to known advertised charge modes!Ocular.EcoMode sensor on the meter corresponds to the charger’s EcoMode sensor.
0 on the charger maps to Fast on the meter.1 on the charger maps to PV on the meter.2 on the charger maps to PV_plus on the meter.Ocular.SolarEnabled sensor on the meter corresponds to the charger’s enableSolar sensor.ocpp.configure at the charger changes behaviour NOT at the meter.ecoMode value of 0 corresponds to meter EcoMode value of Fast.