[APP][Pro] 50five - Smart charging at home for you electric vehicle


Bug fix: “Stop met opladen” geeft altijd “Missing Capability Listener: evcharger_charging”

Probleem: De registerCapabilityListener voor de evcharger_charging capability stond in een else-blok. Dit betekent dat de listener alleen geregistreerd werd als de capability al bestond. Bij eerste installatie (wanneer addCapability() aangeroepen wordt) werd de listener nooit geregistreerd — waardoor de flow actie “Stop met opladen” altijd mislukte met de fout Missing Capability Listener: evcharger_charging.

Fix: registerCapabilityListener verplaatst buiten het else-blok zodat hij altijd geregistreerd wordt.

Pull Request: https://github.com/kaohlive/com.newmotion.my/pull/25

Tijdelijke oplossing: installeer de gefikte versie lokaal via Homey CLI:

Ik zal hem dit weekend mergen en publiceren :+1:

Done, its on test now:

However, you also chnge the start stop behavior with a pause function, very nice.
I cant test it is already done and should work.

Hello,

The app was updated yesterday morning since then my Homey flow will start loading my EV, but loading directly stops again (not triggered by any flow). When I use the 50Five app, the loading works like normal.

Sjoerd

@Coert_Noordermeer can you validate why it is failing?

I used to start the transaction with the button in Homey. But after the last install I’ve been having issues that the button is turning off again after switching it on. I’ve had two times that my charging point was blocked.

I’ve just read the latest update notes and it says:

“Fix: charging toggle is now registered on first install; toggle now pauses/resumes the active session (Block/Unblock) instead of starting a new transaction. Contributed by Coert Noordermeer.”

But why would you want the button to block/unblock the port? And how do I charge the car with the selected pass from Homey now? Can I change what this button does? Because the App from 50Five (native App on iOS) is not a really fine working app. I would like the button to behave like it always did?

Hi

I think I fixed it. Can you please publish?

Thanks for the quick update, I will test this as soon as possible.

For me it is working again.

Thanks for the update.

I can no longer stop a charging session. To make matters worse, instead of stopping, it completely blocks my charger, making the light turn red. I have to go to the site of 50five to first unblock my charger before I can use it again. Is there a way to downgrade the app to vers 4.1.14 to see if that works?

@Coert_Noordermeer can you help thijs?

Unfortunately, it is still not working quite right. Pressing the ‘Charging’ button in the app does start a session. This works again. However, when it is finished charging and I press the button, I immediately get the same problem again. It seems like the ‘charging station’ gets blocked again instead of the current session being stopped as it was. I can confirm that this is the same problem as @thijscrombeen. Can this be changed back to how it was?

By the way, I still don’t understand why this was changed. Surely, using the button, you would just want to start a new charging session with the card and stop it as a whole? Not a blockage or anything?

@KingSize32 and @thijscrombeen — I ran into the exact same issue and dug into the code. The root cause is in onCapabilityOnoff: it was always calling unblockSession() regardless of whether an active session existed. Without an active session, the API call fails and Homey reverts the state back to false — which is why it looks like charging starts and immediately stops.

The fix: check evcharger_charging_state first:

  • If state is plugged_in_charging or plugged_in_paused → use blockSession() / unblockSession() (session stays active, can resume without RFID card)

  • If no active session → use startSession() with RFID card / stopSession()

This fix has already been merged: https://github.com/kaohlive/com.newmotion.my/pull/28

Regarding blockSession() vs stopSession(): the reason for preserving the session is that you can resume charging without needing the RFID card again. If you prefer a full stop, that’s a valid alternative — happy to discuss what makes most sense as default behavior.

@thijscrombeen — PR #28 is updated. The new version adds a “Pause session on stop” setting in the chargepoint device settings:

  • Default (OFF) = stopSession() — exactly the same as v4.1.14 :white_check_mark: this is what you want
  • ON = blockSession() — session stays active, resume without RFID (for automatic energy management)

You don’t need to change anything — the default restores your expected behavior automatically after the update.

@Coert_Noordermeer this PR was already completed last week it seems? So I think you need to create a new one.

@Coert_Noordermeer indeed that PR was already closed, can you ensure you update your fork and create a new PR with this fix? Before last release I also did some dependabot updates on old libraries/security patches.

Thank you, if I understand correctly, it is working again as before and I don’t need to adjust anything. I will try it in the coming days.

I also briefly checked the new option in the device settings, but I don’t see it listed. Under ‘Advanced Settings’, I only see the options → Car settings, Printed Number of…, Include Charge, Energy.

Furthermore, I noticed in your previous post that there were two scenarios.

  • If state is plugged_in_charging or plugged_in_paused → use blockSession() / unblockSession() (session stays active, can resume without RFID card)

  • If no active session → use startSession() with RFID card / stopSession()

But the second option will never do a stopSession() because the status will always be ‘plugged_in_charging or plugged_in_paused’ if there’s a session started by the button or an RFID card physically. So it will do a 'blockSession()/unblockSession() action instead of ‘stopSession()’.

I’ve just tested it again and the exact same issue appears. The session is started with the push of the button but cannot be stopped/finished when hitting the button upon completion of the charging. It switches the button off for a few seconds and then on again.

After that the charger is blocked. The only way I can unblock it is by loggin in to the portal (website) and unblock the charger again.

@KingSize32 — found the root cause. The issue is in SessionAction in 50five.js:

.catch(err => {

return err; // swallows the error — doesn't throw!

})

When the API call fails (e.g. StopTransaction rejected), the error is returned as a value instead of thrown. So onCapabilityOnoff thinks it succeeded, but the update loop then sees the charger is still charging and reverts evcharger_charging back to true — which is the “briefly off then back on” you’re seeing.

Regarding the setting not being visible: PR #31 is not yet merged — once @Kaoh merges and publishes, the “Pause session on stop” setting will appear and the default will be stopSession().

The underlying API failure (why StopTransaction is rejected) still needs investigation — a diagnostic report or the Homey developer tools logs at https://tools.developer.homey.app would help identify why the API call fails.

merged and published to test and pending publication