I think I really need some assistance, I’m trying to set up a Teison EV charger with OCPP and node red.
For the time being I’ve set up basic Home Assistant automations which turn the unit on when solar power export is above 1.3kw and off when consumption is above 0.4kw.
Next I’ve set up a helper that calculates the desired charge rate setting in Amps from the total power export and the current charge rate (with a minimum rate of 6A as that appears to be the chargers minimum).
{% set e = states('sensor.eagle_200_meter_power_demand') | float %}
{% set c = states('sensor.farm_charger_current_import') | float %}
{% if (((e * -1000)/240) + (c -1) )|round(0) > 6 | float %}
{{ (((e * -1000)/240) + (c -1) )|round(0)}}
{% else %}
{{6}}
{% endif %}
Finally i’ve attempted to set up a node-red flow that adjusts the charge rate.
[
{
"id": "281a947a8b14ff9e",
"type": "tab",
"label": "Teison Charger",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b04e52fda3e61e34",
"type": "inject",
"z": "281a947a8b14ff9e",
"name": "Every 3 minutes",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "180",
"crontab": "",
"once": true,
"onceDelay": "10",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 60,
"wires": [
[
"be9d746797bb56f6"
]
]
},
{
"id": "be9d746797bb56f6",
"type": "api-current-state",
"z": "281a947a8b14ff9e",
"name": "Nic at home",
"server": "eab52739.9cf7d8",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "person.nic",
"state_type": "str",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 330,
"y": 60,
"wires": [
[
"546711f7015f21f3"
],
[
"0adfd55bbd68c670"
]
]
},
{
"id": "0adfd55bbd68c670",
"type": "api-current-state",
"z": "281a947a8b14ff9e",
"name": "Moose at home",
"server": "eab52739.9cf7d8",
"version": 3,
"outputs": 2,
"halt_if": "home",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "person.lucy",
"state_type": "str",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "1",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 540,
"y": 60,
"wires": [
[
"546711f7015f21f3"
],
[]
]
},
{
"id": "2241e15b5a26e675",
"type": "api-current-state",
"z": "281a947a8b14ff9e",
"name": "Get EV Charge Rate",
"server": "41108723.0bf848",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "sensor.ev_charge_rate",
"state_type": "str",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "num"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 160,
"y": 240,
"wires": [
[
"bdb53f1b2c30e860"
]
]
},
{
"id": "bdb53f1b2c30e860",
"type": "api-call-service",
"z": "281a947a8b14ff9e",
"name": "Set Teison",
"server": "eab52739.9cf7d8",
"version": 7,
"debugenabled": true,
"action": "ocpp.set_charge_rate",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "{\"devid\":\"car_charger\",\"limit_amps\":\"payload\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "str"
}
],
"queue": "none",
"blockInputOverrides": false,
"domain": "ocpp",
"service": "set_charge_rate",
"x": 410,
"y": 240,
"wires": [
[]
]
},
{
"id": "546711f7015f21f3",
"type": "api-current-state",
"z": "281a947a8b14ff9e",
"name": "Charger is on",
"server": "eab52739.9cf7d8",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "switch.farm_charger_charge_control",
"state_type": "str",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 140,
"y": 160,
"wires": [
[
"2241e15b5a26e675"
],
[]
]
},
{
"id": "eab52739.9cf7d8",
"type": "server",
"name": "Home Assistant",
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "",
"connectionDelay": false,
"cacheJson": false,
"heartbeat": false,
"heartbeatInterval": "",
"statusSeparator": "",
"enableGlobalContextStore": false
},
{
"id": "41108723.0bf848",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30,
"areaSelector": "friendlyName",
"deviceSelector": "id",
"entitySelector": "id",
"statusSeparator": "at: ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "h23",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]
I’m stuck at
1/ the spamming of notifications from the charger
• randomly “Warning: Start transaction failed with response Rejected”
• and regularly “Charger 0312209102324480672 rebooted”
• and “Warning: charger reported Rejected while setting MeterValuesSampledData=Current.Export,Current.Import,Current.Offered,Energy.Active.Export.Interval,Energy.Active.Export.Register,Energy.Active.Import.Interval,Energy.Active.Import.Register,Energy.Reactive.Export.Interval,Energy.Reactive.Export.Register,Energy.Reactive.Import.Interval,Energy.Reactive.Import.Register,Frequency,Power.Active.Export,Power.Active.Import,Power.Factor,Power.Offered,Power.Reactive.Export,Power.Reactive.Import,RPM,SoC,Temperature,Voltage”
2/ My Edit action node in node-red is wrong. I can’t work out how to send the sensor.ev_charge_rate to the charger.
if anyone can assist me I’d be eternally grateful
Nic