sockless-coding / garo_wallbox

Garo wallbox - Home Assistant Component
MIT License
20 stars 35 forks source link

Get status etcetera for slaves #8

Open stenrose opened 3 years ago

stenrose commented 3 years ago

It's possible to connect a secondary wallbox to a master, but accEnergy only shows the total energy usage for the master.

However, one can get the energy for the slaves through http://[ip-address]:2222/rest/chargebox/slaves/status. The slaves and total energy usage is also listed through http://[ip-address]:2222/rest/chargebox/config in an array called slaveList .

Here's an example:

$ curl --silent http://192.168.0.100:2222/rest/chargebox/slaves/status | jq
[
  {
    "reference": "My primary wallbox",
    "serialNumber": 12345,
    "lastContact": 1613501860157,
    "online": false,
    "loadBalanced": false,
    "phase": 0,
    "productId": 105,
    "meterStatus": 0,
    "meterSerial": "12345",
    "chargeStatus": 0,
    "pilotLevel": 25,
    "accEnergy": 1134100,
    "firmwareVersion": 6,
    "firmwareRevision": 9,
    "wifiCardStatus": 0
  },
  {
    "reference": "My secondary wallbox",
    "serialNumber": 12345,
    "lastContact": 1613501860157,
    "online": false,
    "loadBalanced": false,
    "phase": 0,
    "productId": 65,
    "meterStatus": 0,
    "meterSerial": "12345",
    "chargeStatus": 0,
    "pilotLevel": 8,
    "accEnergy": 60500,
    "firmwareVersion": 6,
    "firmwareRevision": 9,
    "wifiCardStatus": 1
  }
]

It getting the accEnergy from the slaves something that you might want to implement?

stenrose commented 3 years ago

FYI, the accEnergy on the first wallbox (i.e. the master) listed in the slaves array , is the same data that is listed as latestReading at http://[ip-address]:2222/rest/chargebox/status

sockless-coding commented 3 years ago

@stenrose Sure I can have a look at adding it. I don't have access to a setup like that, so could you provide a reading when you have something charging as well?

stenrose commented 3 years ago

Can post the full JSON tomorrow, but the chargeStatus changed to 64 when charging. When charging was complete it changed to 80.

Were unable to find any details on those IDs though.

stenrose commented 2 years ago

Forgot about this issue, but here comes a reading when charging.

$ curl --silent http://1.3.3.7:8080/servlet/rest/chargebox/slaves/false | jq
[
  {
    "reference": "Laddbox höger",
    "serialNumber": 123456,
    "lastContact": 1655028779556,
    "online": false,
    "loadBalanced": true,
    "phase": 4,
    "productId": 121,
    "meterStatus": 0,
    "meterSerial": "123456",
    "chargeStatus": 0,
    "pilotLevel": 6,
    "accEnergy": 3533500,
    "firmwareVersion": 7,
    "firmwareRevision": 9,
    "wifiCardStatus": 2,
    "connector": "NOT_CONNECTED",
    "accSessionEnergy": 0,
    "sessionStartValue": -1,
    "accSessionMillis": 0,
    "sessionStartTime": null,
    "currentChargingCurrent": 0,
    "currentChargingPower": 0,
    "nrOfPhases": 1,
    "twinSerial": -1,
    "cableLockMode": 0,
    "minCurrentLimit": 6,
    "dipSwitchSettings": 8155
  },
  {
    "reference": "Laddbox vänster",
    "serialNumber": 123456,
    "lastContact": 1655028768425,
    "online": false,
    "loadBalanced": true,
    "phase": 4,
    "productId": 65,
    "meterStatus": 0,
    "meterSerial": "123456",
    "chargeStatus": 64,
    "pilotLevel": 9,
    "accEnergy": 3045700,
    "firmwareVersion": 7,
    "firmwareRevision": 8,
    "wifiCardStatus": 1,
    "connector": "INITIALIZATION",
    "accSessionEnergy": 0,
    "sessionStartValue": -1,
    "accSessionMillis": 0,
    "sessionStartTime": null,
    "currentChargingCurrent": -1,
    "currentChargingPower": 0,
    "nrOfPhases": 1,
    "twinSerial": -1,
    "cableLockMode": 0,
    "minCurrentLimit": 6,
    "dipSwitchSettings": 8139
  }
]

It's now charging on "Laddbox vänster" which "chargeStatus": 64, indicates. The other box, "Laddbox höger", is not plugged in to a vehicle right now indicated by "chargeStatus": 0,.

When "Laddbox vänster" had vehicle plugged in waiting for schedule set by vehicle it had "chargeStatus": 48. It changes to 80 when completed.

FYI, it is not possible to change mode on the secondary charger, using /servlet/rest/chargebox/mode/{ALWAYS_{ON,OFF},SCHEMA}. So slave chargers are only available for monitoring status, energy etcetera.

I hope you are still interesting in implementing this, and just let me know if you need any further readings.

CBxGBG commented 12 months ago

Any updates on this? Is there a version or an addition to the integration that makes us able to handle two boxes where the Master holds the RPi and the Slave is connected to the Masters RPi. Would be great to be able to see and handle both boxes