Hi Florian,
I did the addon update and tried your fix. Hope all I did was correct because I never worked with pre-released addons.
Just to make sure the installation worked I did:
openhab> bundle:list | grep evcc
288 │ Active │ 80 │ 3.4.0.202211281648 │ openHAB Add-ons :: Bundles :: evcc Binding
Looks good to me. After that, I looked for the item config:
Number:ElectricCurrent EVCC_Loadpoint0_MaxCurrent "Loadpoint0 max current" {channel="evcc:device:4d99bcba7d:loadpoint0#maxCurrent"}
Then I tried to change the item:
EVCC_Loadpoint0_MaxCurrent.sendCommand(9)
Log says:
2022-11-28 19:59:10.950 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Handling command 9 A (class org.openhab.core.library.types.QuantityType) for channel evcc:device:4d99bcba7d:loadpoint0#maxCurrent
2022-11-28 19:59:10.962 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - POST http://192.168.XXX.XXXX:7070//api/loadpoints/0/maxcurrent/9 -
2022-11-28 19:59:10.964 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Running refresh job ...
2022-11-28 19:59:10.978 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - GET http://192.168.XXX.XXX:7070//api/state - {"result":{"auth":{"vehicles":null},"batteryConfigured":false,"bufferSoC":0,"currency":"EUR","gridConfigured":false,"homePower":0,"loadpoints":[{"chargeCurrent":0,"chargeCurrents":[0,0,0],"chargeDuration":0,"chargePower":0,"chargeTotalImport":1129.8545230555542,"chargedEnergy":29927.087783813477,"charging":false,"connected":false,"connectedDuration":9223372036854775807,"enabled":false,"maxCurrent":16,"minCurrent":6,"minSoC":0,"mode":"pv","phaseAction":"inactive","phaseRemaining":0,"phasesActive":3,"phasesConfigured":3,"phasesEnabled":0,"pvAction":"inactive","pvRemaining":0,"targetSoC":100,"targetTime":null,"targetTimeProjectedStart":null,"title":"Wallbox","vehicleDetectionActive":false}],"prioritySoC":0,"pvConfigured":true,"pvPower":0,"residualPower":0,"savingsAmount":10.443100604140174,"savingsEffectivePrice":0.19741133258100965,"savingsGridCharged":54.327210927865856,"savingsSelfConsumptionCharged":47.4686391097281,"savingsSelfConsumptionPercent":46.631212463177604,"savingsSince":1667468807,"savingsTotalCharged":101.79585003759396,"siteTitle":"Home","sponsor":"XXX","tariffFeedIn":0.08,"tariffGrid":0.3,"vehicles":["unavailable"],"version":"0.108.2"}}
2022-11-28 19:59:10.980 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Found 1 loadpoints on site Home.
==> /var/log/openhab/events.log <==
2022-11-28 19:59:10.928 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' received command 9
2022-11-28 19:59:10.934 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EVCC_Loadpoint0_MaxCurrent' predicted to become 9
2022-11-28 19:59:10.949 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' changed from 16 to 9
2022-11-28 19:59:11.017 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' changed from 9 to 16
After that I tried it with no unit:
Number EVCC_Loadpoint0_MaxCurrent "Loadpoint0 max current" {channel="evcc:device:4d99bcba7d:loadpoint0#maxCurrent"}
Command:
EVCC_Loadpoint0_MaxCurrent.sendCommand(9)
Logging:
2022-11-28 20:01:30.929 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Handling command 9 A (class org.openhab.core.library.types.QuantityType) for channel evcc:device:4d99bcba7d:loadpoint0#maxCurrent
2022-11-28 20:01:30.942 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - POST http://192.168.XXX.XXX:7070//api/loadpoints/0/maxcurrent/9 -
2022-11-28 20:01:30.945 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Running refresh job ...
2022-11-28 20:01:30.959 [TRACE] [ab.binding.evcc.internal.api.EvccAPI] - GET http://192.168.XXX.XXX:7070//api/state - {"result":{"auth":{"vehicles":null},"batteryConfigured":false,"bufferSoC":0,"currency":"EUR","gridConfigured":false,"homePower":0,"loadpoints":[{"chargeCurrent":0,"chargeCurrents":[0,0,0],"chargeDuration":0,"chargePower":0,"chargeTotalImport":1129.8545230555542,"chargedEnergy":29927.087783813477,"charging":false,"connected":false,"connectedDuration":9223372036854775807,"enabled":false,"maxCurrent":16,"minCurrent":6,"minSoC":0,"mode":"pv","phaseAction":"inactive","phaseRemaining":0,"phasesActive":3,"phasesConfigured":3,"phasesEnabled":0,"pvAction":"inactive","pvRemaining":0,"targetSoC":100,"targetTime":null,"targetTimeProjectedStart":null,"title":"Wallbox","vehicleDetectionActive":false}],"prioritySoC":0,"pvConfigured":true,"pvPower":0,"residualPower":0,"savingsAmount":10.443100604140174,"savingsEffectivePrice":0.19741133258100965,"savingsGridCharged":54.327210927865856,"savingsSelfConsumptionCharged":47.4686391097281,"savingsSelfConsumptionPercent":46.631212463177604,"savingsSince":1667468807,"savingsTotalCharged":101.79585003759396,"siteTitle":"Home","sponsor":"XXX","tariffFeedIn":0.08,"tariffGrid":0.3,"vehicles":["unavailable"],"version":"0.108.2"}}
2022-11-28 20:01:30.962 [DEBUG] [ab.binding.evcc.internal.EvccHandler] - Found 1 loadpoints on site Home.
==> /var/log/openhab/events.log <==
2022-11-28 20:01:30.910 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' received command 9
2022-11-28 20:01:30.916 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'EVCC_Loadpoint0_MaxCurrent' predicted to become 9
2022-11-28 20:01:30.936 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' changed from 16 to 9
2022-11-28 20:01:31.027 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EVCC_Loadpoint0_MaxCurrent' changed from 9 to 16
Hope this helps you. Thank you!
Jens