Bei mir kommen gerade noch keine Werte, da ich vermutlich seit gestern abend das Fahrzeug noch nicht bewegt habe, aber das Ziel ist es die Werte über die http-Abfragen zu holen:
https://github.com/flobz/psa_car_contro ... acc_api.md
Bei mir kommen gerade noch keine Werte, da ich vermutlich seit gestern abend das Fahrzeug noch nicht bewegt habe, aber das Ziel ist es die Werte über die http-Abfragen zu holen:
Habt ihr hierfür schon eine Lösung gefunden.
Code: Alles auswählen
2024-02-25 10:15:04,188 - {modules.common.store._api:30} - {INFO:store soc_ev1} - Saving CarState(soc=45, range=92, soc_timestamp=1708852400000)
2024-02-25 11:03:23,514 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - Tronity: FaultState FaultStateLevel.ERROR, FaultStr <class 'TypeError'> ("unsupported operand type(s) for -: 'float' and 'NoneType'",), Traceback:
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 66, in update
car_state = self._get_carstate_by_source(vehicle_update_data, source)
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 111, in _get_carstate_by_source
return CarState(soc=calc_soc.calc_soc(vehicle_update_data,
File "/var/www/html/openWB/packages/modules/vehicles/common/calc_soc/calc_soc.py", line 13, in calc_soc
imported_since_start = vehicle_update_data.imported - imported_start
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
[....]
2024-02-25 13:26:03,848 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - Tronity: FaultState FaultStateLevel.ERROR, FaultStr <class 'TypeError'> ("unsupported operand type(s) for -: 'float' and 'NoneType'",), Traceback:
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 66, in update
car_state = self._get_carstate_by_source(vehicle_update_data, source)
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 111, in _get_carstate_by_source
return CarState(soc=calc_soc.calc_soc(vehicle_update_data,
File "/var/www/html/openWB/packages/modules/vehicles/common/calc_soc/calc_soc.py", line 13, in calc_soc
imported_since_start = vehicle_update_data.imported - imported_start
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
2024-02-25 13:31:49,234 - {modules.common.store._api:30} - {INFO:store soc_ev1} - Saving CarState(soc=46, range=98, soc_timestamp=1708864201000)
2024-02-25 13:31:52,235 - {modules.common.store._api:30} - {INFO:store soc_ev1} - Saving CarState(soc=98, range=290, soc_timestamp=1708864205000)
Code: Alles auswählen
@reboot <USER> sleep 10 && python3 /home/<USER>/.local/bin/psa-car-controller --web-conf -p 5000 -l 0.0.0.0
Code: Alles auswählen
[
{
"id": "5dcd72290d5c99a5",
"type": "debug",
"z": "6440f0d1b248b507",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 500,
"y": 840,
"wires": []
},
{
"id": "1845364c838762d0",
"type": "http request",
"z": "6440f0d1b248b507",
"name": "",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://<ip:port>/get_vehicleinfo/<yourVIN>",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 310,
"y": 760,
"wires": [
[
"5dcd72290d5c99a5",
"6110dd8833bebe9a"
]
]
},
{
"id": "23eff85f42d02611",
"type": "inject",
"z": "6440f0d1b248b507",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 760,
"wires": [
[
"1845364c838762d0"
]
]
},
{
"id": "6110dd8833bebe9a",
"type": "rbe",
"z": "6440f0d1b248b507",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload.energy[0].level",
"topi": "topic",
"x": 510,
"y": 760,
"wires": [
[
"368e52e00d381d88"
]
]
},
{
"id": "e71f227f0a178faf",
"type": "mqtt out",
"z": "6440f0d1b248b507",
"name": "SOC setzen",
"topic": "openWB/set/lp/1/%Soc",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "cd7464abf11d1ee0",
"x": 950,
"y": 760,
"wires": []
},
{
"id": "368e52e00d381d88",
"type": "change",
"z": "6440f0d1b248b507",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.energy[0].level",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 760,
"wires": [
[
"e71f227f0a178faf",
"2aa901cced305946"
]
]
},
{
"id": "cd7464abf11d1ee0",
"type": "mqtt-broker",
"name": "OpenWB",
"broker": "<ip der OpenWB>",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Herzlichen Dank, mache ich!
Pendragon hat geschrieben: ↑Mi Feb 28, 2024 2:01 pm So in der Art mache ich es jetzt auch gerade. Und wie ich gerade sehe updated der PSA-Controller den Ladezustand auch während des Ladens. Somit muss man nicht auf die Berechnung gehen
Da der Tronity Fehler, wie oben auch bei mir regelmäßig auftrat bin ich nun davon weg...