[APP][Pro] Go-e Charger electric car charger

I have a go-e charger Smarte Ladestationen für Elektroautos: mobil & stationär | go-e and want to make a homey app for it.

So far I can add the device from a local network and use homey to read it’s values:

Now I want to take the next step, actually setting values through homey.

I’m puzzled though on how to do this. Is there a simple example available somewhere? The dev documentation is a little cryptic for a starter like me. Which app would you recommend for me to review the code of, to learn from?

Many thanks in advance!

Have you advanced with this app? The go-e charger specs look very tempting. Have you been able to add action to change the charge current? This way one could limit the charging for example according to household intake current or solar power generation etc.

Sorry for not been able to help, but I’m very interested with this device and your app.

Maybe the same person that have wrote the API documentation can help? https://github.com/peterpoetzi

Hi peltsi51,

Thanks for the encouragement, always nice to know there’s an interest.

I think it’s more of a time limitation than the difficulty which is holding me back at the moment. Also, I do understand the API of the go-e-charger but not so much the way I have to match the values to flow cards in Homey…? But I’m sure I’ll figure it out in the next month or so.

I’m considering two options for setting the charge current:

A. set an actual Aperage value
B. choose one of the five presets as set in the Go-e Charger app.

The former (option A) will give Homey more control, but also is more difficult to make as it has to be a value between the Max Amp as set in the go-e-charger app and the Min value of 6A. The Max Amp as set in the go-e-charger app can vary as per the users setting. If a user fails to match this to wall connection maximum, homey may actually break something / set of the cirquit breaker or worse…

The latter (option B) will give just a little less control for homey but will be easier to implement and will always follow the 5 preset Amps. It also has the benefit that you can move to one setting higher or lower depending on a flow and repeat this - so for instance if the Plugwise P1 notices your house total current use starts to match the total house connection, it can set one lower preset on the go-e-charger. If it still comes close, the flow will be triggered again to lower it once more.

Which one would you prefer? A or B?

Regards,

Tim

I was first thinking and also have tested a flow where I calculate the “remaining” amperage value that the charger can use in accordance of household intake power (3-phase). So the charger amperage value would be changed according to this value.

But your idea about the 5 preset values could be also used in same way.

So on my point of view there is no actual difference between the choices. Both of them gets the job done.

If you select the preset values, one can still make the mistake that set too large amperage value to the preset value and may trip the circuit breaker, but in any case the user have to know what he/she is doing.

I would suggest that you go with the B option if it is easier to make. Maybe later you can add the A option if someone needs it for some reason.

Couple of questions about the charger:
Is there a limit at which rate can you change the charger amperage value or preset amperage values?

Have you tested how the charged car reacts to the amperate or preset change? Does it work “online”? I mean that one is charging with 6A and then changes it to 10A, does the car change the charging current straight away or do you have to disconnect and reconnect first?

It works online, no problem. The limit is determined by the lowest possible maximum of:

  • The car’s charging ability (also influenced by the % of the battery being full)
  • The cable attached between car and go-e charger
  • The maximum setting in the go-e charger
  • The actual amperage setting in the go-e charger*

If any of these values changes, it also changes the amperage.
The last one is the one you can change ‘live’ and will have immediate effect.

I will try to implement B first.

Regards, Tim

Hi

I bought the Go-e charger and it and your app works great.

So the more you have the more you want -> Here are some ideas for the app.

Triggers

  1. Power changed
  2. The power meter changed
  3. Charging allowed on
  4. Charging allowed off
  5. Charging started (Actual car charging)
  6. Charging finished (Actual car charging)
  7. Temperature changed (could be added but maybe not so needed)
  8. Amperage changed (The power can be used in same manner so maybe not needed)
  9. Alarm activated

Conditions

  1. Charging allowed on/off
  2. Is charging (Actual car charging)
  3. Charging preset value is xxx, or this can be made through measurement and logic variable.
  4. All the measurements should be able to be used in logic variable to make for example greater/lower than conditions.

Actions

  1. Allow charging on
  2. Allow charging off
  3. Change the preset (1-5)
  4. All the measurement should be able to be used in logic variable to save for example the charged energy

I wish I could help you making this app, but my js skills are pretty much non existent. But I can help you with testing when you get the changed versions of the app ready.

Hi peltsi51,

I’ve had some time to update the app.
sorted out a minor bug, and added the first flow card: charging finised.

This results in another beta version, 0.2.1.
Once reviewed by Homey Athom, it will become available.

Looking forward to your opinion.

Regards, Tim

Hi Tim

Got the updated app and made some tests.

I noticed couple of things.

  1. The “Car connected…” trigger will trigger all the time when the car is connected (about every 2 seconds), not only when the car is actually first time connected. Should be fixed.

  2. The “Car connected…” trigger is not triggered when the charging is started straight away when you connect the car. I know that you don’t get this information straight from the charger, but probably can be made in the app? Other option is to rename the trigger into something like “Car connected and waiting for charging permit”.

  3. The “Charging started” trigger seems to work properly. Great!

  4. The “Finished Charging” trigger does not trigger if you manually disconnect the car (unplug) during charging. I know that you don’t get this information straight from the charger, but probably can be made in the app? Other option is to rename the trigger into something like “Finished Charging and car connected”.

  5. The status of the charging (Status integer “car”) is also a little bit off I think. Here are some proposions
    a. Status integer value 1 is now “Waiting for connection” in the status page of the device and in the “Device status” tag it’s “Ready to connect car”, these should be at least the same. In my opinion it should be something like “Car not connected”
    b. Status integer value 2 is pretty much ok. It can also be “Car connected, charging”
    c. Status integer value 3 is now “Communicatin with car…” in the status page of the device and in the “Device status” tag it’s “Car connected, waiting for car data”, these should be at least the same. In my opinion it should be something like “Car connected, charging not allowed”
    d. Status integer value 4 is pretty much ok. It can also be “Car connected, charging finished”

  6. Can you make all the charger measurement available also in insights?

Thanks again for the good work, it’s going to the right direction.

Hi Jarkko,

Thanks for testing!

  1. I will fix this, it’s a bug.
  2. This one is difficult. I will have to look into this, in accordance with 5c. The suggestion “Car connected, charging not allowed” is not correct, as this status (3) actually means the charger and car are getting ready to start the charging and are communication the charging parameters. I think i will rename to “Getting ready to start charging”.
  3. I noticed the same so that is good to know!
  4. This raises the question: Should unplugging manually, fire this trigger? Maybe another trigger should be there, ‘charging terminated’ (meaning the charging has stopped for a number of reasons, including unplugging). Personally I would want to use ‘Finished Charging’ only for when the car is finished charging (100%) or the max session kWh is reached. Termination of the charging (Charging terminated) could then be used for other use cases and will be tiggered if status value ‘2’ changes to any other status value. If charging’s finished and the car is disconnected within the 5 seconds it takes to update the valueof status to “charging finished”, I don’t have enough info to trigger this status. My BMW i3 gives a ‘charging finised’ signal to the charger every time I unlock the car so that this status will almost alway be triggered. I’m not sure if this goes for every EV.
  5. Statusses:
    a. I will change this to : “No car connected” everywhere.
    b. I will keep this “Charging”. I will see if there is another value to be created which is “Car connected” and is set to YES for status 2, 3 and 4 and to NO for status 1.
    c. Like i said at #2, I think i will rename to “Getting ready to start charging”.
    d. I will keep this “Charging finished” and try to make another boolean which monitors if a car is connected.
  6. I will look into this.

Many thanks for doing tests! This is valuable information for further developing the app.

Best regards,

Tim

Hi Tim

Thanks for the fast answer.

  1. OK
  2. You are right about that. Your suggestions sounds good to me.
  3. OK
  4. Another trigger for the “Charging terminated” would be better solution. I have done this with the GET http request card, and made the logic that whenever the value changes from 2->something else the charging is finished, disregarding is the charging actually 100% or not (I don’t care :D)
  5. Every suggestion sound good to me.
  6. OK
  7. I have Opel Ampera which has a one phase charger. The amperage in the device shows the actual amperage divided by three. Can this be fixed somehow? There is a status (hex value “pha”) in the api which could be used. This is not vital thing to do, but to the end of todo list.

Best Regards Jarkko

v 0.3.1 b is there.

  1. is fixed for me
  2. the separate trigger is only applicable to the status. maybe later there will be a condition for car connected.
  3. added a separate trigger for this called “Charging ended”
  4. fixed these
  5. measurements are in insights. I’ve had to change the kW from the current power supplied to Watts, so it show up correctly in homey ENERGY.
  6. I believe it’s fixed. Could you check in v 0.3.1?

Thanks and best regards,

Tim

Hi

Thanks for the update. Can you lighten up what is the situation with the app after the homey store update? I cannot find the app in the store, so do I have to install the app with the github source and CLI or is there some other way to install the beta app?

Best Regards Jarkko

Hi Jarkko,

I’m sorry, I had some trouble figuring this out myself, too.
I’ll look into in and let you know asap. :slight_smile:

Best regards,

Tim

Apparently I had to have had the app submitted for certification, so it was removed from the app store. I’ve done so again but it failed due to some minor compliancy issues. I’ve fixed the issues in version 0.3.3 which is now under review for certification.

Now we wait… :wink:

There it is!

Hi Tim

You got the commands for amperage and on/off working! Great work. The one phase amperage measurement value is now also working.

I did some testing and the app is looking great at the moment. I did get rid of most of my API request workaround which I have made in the meanwhile to get the Go-e connected.

I have still couple of suggestions, observations and one bug to report. I will continue the testing and let you know if I find anything.

Bug

  1. In conditions, the inverted condition is not working. For example I made the condition “Car not charging”. It is true always when the car is charging, so not inverted. Didn’t test the “charging finished” trigger.

Observations

  1. When you have the charging allowed and you connect the car the triggers “car connected” and “charging started” sometimes trigger both (which in my opinion is correct), but sometimes only “charging started” is triggered. I think this might be due to the update frequency of the homey<->Goe, so that you don’t always get the “car connected”. Is there some logic to be done in the app?
  2. Same happens when you disconnect the plug during charging. The “car disconnected” won’t always trigger.
  3. Same happens when the car is connected and the charging is allowed. The “charging allowed” is not always triggered.
  4. And I think all the triggers have the same issues than presented in points 1-3 due to the status handling of the Go-e device.

The points 2-4 are minor nuisance, but if there is a possibility to make some kind of “state machine” inside the app according to the state changes of the Go-e it would be great.

Suggestion/requests

  1. Could you add a trigger for the any “device status” change?

  2. Could you add the total energy measurement to variables so that it can be used to calculate charged energy. I find the “Power supplied in this session” hard to use because when you unplug the car the “power supplied in this session” will go to 0 value. And I want to unplug the car whenever I want :wink:

Will make a donation for you for this work! Thanks a lot.

Best regards Jarkko

Hi Jarkko,

First of all, thanks again for testing!

Bug

  1. I’ll look into it this weekend. My car was fully charged last time I was working on it so I had no way of testing :slight_smile:

Obs.

  1. You’re right about the update frequency being an issue. The API of the Go-E charger gives all status values at each request and I’ve now setup the update frequency to each 5 seconds. Much faster can’t be done because the charger will stop responding to too many requests.
    There already is some logic in the app where it compairs the previous status value with the new status value, I can work this out further to make it function even better. This might also fix the issue I found myself that if you use the homey to ‘activate’ the charger, It won’t detect the status change.
  2. same as for #1, i’ll look into it
  3. same
  4. same

suggestions:

  1. that should be easy, there is already the logic.
  2. I’ll try :slight_smile:

As regards to the donation: thank you very kindly!

I’ll be in touch,

Best regards,

Tim

Hi Tim

Can you point out in which file of the source code the logic for status triggers is made? I might be able to help you with the logic. (Can read the JS but can’t write :D)

Regards Jarkko

It’s in the _pollChargerState in device.js: