[APP][Pro] Easee charger - Small. Smart. Full of power

Hi guys, I do still have login/authorization issues with the Homey Easee app in combination with a completely different software (EVCC) . I’m on app version 1.6.8. The problem is, after about 1day, it seems that my other application (independent of homey, but uses as well the easee API) tells me "

ERROR 2023/07/10 12:57:08 switch phases: Get “https://api.easee.com/api/sites/xxx/circuits/xxx/settings”: unexpected status: 401 (Unauthorized)"

every 10s. As soon as I’m stopping the Homey Easee app and restart EVCC the messages are gone and everything works as expected. I can then start the Homey Easee app again and everything works. The Homey App doesn’t show any errors during that time. So the problem must be related to Homey Easee or the combination of Homey Easee and EVCC. I would say there is a refresh issue somehow on the homey app which cause any other logins for my account to fail. Any comments on this issue? Or could it be a polling issue that two software are causing too much traffic on the easee API? I read something that easee changed a few things just recently.

EDIT: here are some discussion from EVCC (Easee unexpected status: 401 (Unauthorized) · evcc-io/evcc · Discussion #8757 · GitHub), not really sure - the outcome is still unclear.

Just for your information. It seems that the issue was related to the Easee Cloud API. The guys from EVCC raised a support ticket about the issue and now it seems to be solved. I don’t know the details. So everything seems to be fine again.

1 Like

@Richard_B what is the exact purpose of the “Tax”-part of the “set charging price”-flow?

I am using Tibber so I set the “Price Changed” and then added 0,79 into the tax field because this is the additional cost that I have on top of Tibber for each kWh used, however it doesn’t seem to have any effect in the Easee-app. For now I had to solve it with simple logic calculations.

I’m just replicating what the Easee API exposes. You can pass 0 as tax and it won’t be passed to Easee. If you pass it the app will assume costPerKwhExcludeVat equals costPerKWh - taxPerKWh

1 Like

Any plans to make the app available on the cloud solution?

Currently no plans, but you should never say never.
Early last year Athom was pushing this actively, but not since. I guess they have been busy with new HP23 and Easee similarly busy with their problems.

Too bad :disappointed_relieved: Would be nice if the app becomes available for Homey cloud as well. Cloud to cloud communication between easee and Homey, controlling / monitoring easee in the same way as from the Pro.

tir. 22. aug. 2023 kl. 08:43 skrev Richard Barkestam via Homey Community Forum <notifications@athom.discoursemail.com>:

Hi. There is some problems controlling easee with the piggy bank app. I don’t know if the problem is within piggy or easee app, but they started some time after this app was updated. Can you look into it?

Can you be more specific?

It never harms to provide also API logs (see settings of Easee app) together with diag. report right after “some” problems happens

Hi, I also have trouble with piggy and easee, I almost give up. However, i kinda gets it to work with manually flows by setting dyn circuit current = 20A and then setting dyn charger current = 6A to start carefull charging and increase slowly afterwards.

This api error shows up all the time:
2023-08-24T18:59:58.093Z
Error: Invalid Capability: target_charger_current
at ChargerDevice.getCapabilityOptions (/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:592:25)
at /app/drivers/charger/device.js:528:30
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Also, when piggy tries to start charging this happens:
2023-08-24T19:08:30.824Z Set dynamic circuit current to ‘40’
,2023-08-24T19:08:30.825Z Setting dynamic circuit current to ‘40/40/40’
2023-08-24T19:12:32.620Z Set dynamic charger current to ‘6’
,2023-08-24T19:12:32.620Z Setting dynamic charger current to ‘0’

And if i try to start it manually by turning it ON in the device it says:
2023-08-24T19:21:46.793Z Starting charge
,2023-08-24T19:21:48.681Z Failed to start charging, lets try resume

I use the equalizer as well, i have been in contact with easee to see if its possible to improve refresh rate, but they wanted to contact you and mentioned:
“I believe we need to get in touch with the developer Richard Barkestam of the Easee Plugin for Homey, because I do not know myself how they have developed it and which endpoints they use. The Easee app uses a websocket stream to receive the data, that’s why the data is updated almost in realtime.”



1 Like

Well, it’s not really up to @Richard_B , as Athom does not allow individuals to submit cloud apps. For this to happen the app must change owner to the company Easee under a verified developer account. I think these are restrictions Athom set up in order for community developers to get paid eventually. So this is entirely in the hands of Easee…

@Richard_B Do you know why this happens? The “charger_status” capability error is the reason why piggybank does not work

Seem like you (@Glenn_Johnsen @arovik ) got the same error?
missing capability

Do I dare to guess you both run HP23? It is a very weird error message since the capability is there, and further, before setting value for any capability I check if this device has the capability (if (this.hasCapability(key)) {).

I have seen this before on tokens with HP23, where I on one line check if token exists, then second line try to set a value and then get the error token doesn’t exist. This bug Atom solved.

I just started the app via CLI and no errors as of yet. Will keep it running like this and see if I get anything.
Is it too much work to try and remove the device and add it again?

Yes I have a HP23. I already have tried removing the device and readding. Could always do it again. Also think i removed the app last time. I have been using piggy bank together with easee on HP23 before the summer. It worked then. But it stopped working after some of your last versions of the easee app

removed it, removed app, reinstalled and added again.
No errors in log just yet, but the api error showed seconds after adding again

Last API error: 2023-08-29T10:33:23.208Z
Error: Invalid Capability: target_charger_current
at ChargerDevice.getCapabilityOptions (/node_modules/@athombv/homey-apps-sdk-v3/lib/Device.js:592:25)
at /app/drivers/charger/device.js:528:30
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

LOG:
2023-08-29T10:33:22.390Z Easee charger initiated, ‘
,2023-08-29T10:33:22.393Z Setting up capabilities
,2023-08-29T10:33:22.394Z Updating capability options ‘onoff’
,2023-08-29T10:33:22.530Z Remove existing capability ‘measure_charge’
,2023-08-29T10:33:22.714Z Remove existing capability ‘measure_charge.last_month’
,2023-08-29T10:33:22.891Z Storing credentials for user '
*@gmail.com
,2023-08-29T10:33:22.892Z Encrypting credentials for user ‘*****@gmail.com
,2023-08-29T10:33:22.924Z Getting charger site info
,2023-08-29T10:33:22.944Z Adding timers

ok, read the stacktrace too poorly last time, but problem is similar
Line that fails is self.getCapabilityOptions(capability).max, and check what is checked on line before - if (self.hasCapability(capability)). On one line it is there, and next line it is not there. This is though a problem that has been around in the past as well with HP23 - I recognise it.

Will see what I can find

const capability = 'target_charger_current';
if (self.hasCapability(capability)) {
    if (self.getCapabilityOptions(capability).max != settings.maxChargerCurrent) {
        self.logMessage(`Updating '${capability}' max value to '${settings.maxChargerCurrent}'`);
        self.setCapabilityOptions(capability, {
            max: settings.maxChargerCurrent,
        }).catch(err => {
            self.error(`Failed to update ${capability} capability options`, err);
        });
    }
}

So this means you found a error in the code? Will that result in a new version of the app?

No error in the code, just proving that Athom has a bug in their SDK.
But yes, I usually release a new version when I fix bugs :grinning:

No bug is fixed here yet, question is how to work around their bug…

:+1:

tir. 29. aug. 2023 kl. 11:29 skrev Frode Heggelund via Homey Community Forum <notifications@athom.discoursemail.com>: