Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-e Charger #57

Open
tomik671108 opened this issue Jul 23, 2023 · 15 comments
Open

go-e Charger #57

tomik671108 opened this issue Jul 23, 2023 · 15 comments
Labels
brand-addition For adding a new charger brand (or other brand).

Comments

@tomik671108
Copy link

Good morning.
I really like the created card.
I would like to adapt the card to my go-e Charger myself, but I don't know if I can do it, I'm not that advanced yet.
Is it possible to include the go-e Charger in the list of devices?.
Documentation needed:
https://github.com/goecharger/go-eCharger-API-v2
https://github.com/syssi/homeassistant-goecharger-mqtt
The behavior of the LEDs is described in the user manual:
https://strapi-s3-bucket.s3.eu-central-1.amazonaws.com/20230613_go_e_Charger_Gemini_FLEX_INSTALLATION_AND_OPERATING_GUIDE_EN_WEB_V1_2_832adb73fc.pdf
Regards
tomik67

@tmjo
Copy link
Owner

tmjo commented Jul 24, 2023

Hi!

Thanks for your kind words. I'd love to add support for your charger, but kindly read the wiki on how-to first. Let me know if anything is unclear.

Cheers!

@tmjo tmjo added the brand-addition For adding a new charger brand (or other brand). label Jul 24, 2023
@tomik671108
Copy link
Author

tomik671108 commented Aug 9, 2023

Hi.
Thank you for your great work and for directing me to the wiki on howto.
Thanks to this, I was able to configure the appearance of the card, sensors and switches.
The problem is the input select implementation of which I have a couple.
I get the same list to choose from every time:
currentlimits1:
- 0
- 6
- 10
- 16
- 20
- 25
- 32
.....even though the entity is for other values.

My checkboxes look like this:

Cable unlock mode.:
select.go_echarger_212417_ust

    legacy_options={
        "0": "Normal",
        "1": "Auto Unlock",
        "2": "Always Locked",
    },

Force state.:
select.go_echarger_212417_frc

    legacy_options={
        "0": "Neutral",
        "1": "Don't charge",
        "2": "Charge",
    },

Logic mode.:
select.go_echarger_212417_lmo

    legacy_options={
        "3": "Default",
        "4": "Eco mode",
        "5": "Automatic Stop",
    },

Phase switch mode.:
select.go_echarger_212417_psm

    legacy_options={
        "0": "Auto",
        "1": "Force single phase",
        "2": "Force three phases",
    },

These input selects are originally configured as a slider:

Maximum current limit.:
number.go_echarger_212417_ama

    key="ama",
    name="Maximum current limit",
    entity_category=EntityCategory.CONFIG,
    device_class=NumberDeviceClass.CURRENT,
    native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
    entity_registry_enabled_default=True,
    disabled=False,
    native_max_value=32,
    native_min_value=6,
    native_step=1,
),

Requested current.:
number.go_echarger_212417_amp

    key="amp",
    name="Requested current",
    entity_category=EntityCategory.CONFIG,
    device_class=NumberDeviceClass.CURRENT,
    native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
    entity_registry_enabled_default=True,
    disabled=False,
    native_max_value=32,
    native_min_value=6,
    native_step=1,
),

These input selects are originally configured as fields to manually enter values:

Automatic stop energy.:
number.go_echarger_212417_ate

    key="ate",
    name="Automatic stop energy",
    entity_category=EntityCategory.CONFIG,
    device_class=NumberDeviceClass.ENERGY,
    native_unit_of_measurement=ENERGY_WATT_HOUR,
    entity_registry_enabled_default=True,
    disabled=False,
    native_max_value=100000,
    native_min_value=1,
    native_step=1,
),

Automatic stop time.:
number.go_echarger_212417_att

    key="att",
    name="Automatic stop time",
    entity_category=EntityCategory.CONFIG,
    device_class=None,
    native_unit_of_measurement=TIME_SECONDS,
    entity_registry_enabled_default=True,
    disabled=False,
    native_max_value=86400,
    native_min_value=60,
    native_step=1,
),

I'd be grateful if you could point me in the right direction.
With gratitude
tomik67

@tmjo
Copy link
Owner

tmjo commented Aug 9, 2023

Hi,

Sounds nice you are having progress!

Unfortunately the select-entity is not fully supported "natively" as it wasn't available when the card was initially made. It seems quite popular these days, so I'll take a look at implementing it better (but don't expect it to happen very soon though, days are too full right now).

You probably already know, but a basic implementation works, for instance something like:

  group2:
    - entity_id: select.go_echarger_212417_ust
      text: Your custom text if you want one

The above will open the HA default UI when clicking on the select entity of the card, so it's not using the card dropdown items and gives an additional step which is of course not the intetion of the card. If there was a service to call, the card has an option to use custom dropdownitems. The current limit list is used as default, so you would have to specify to use those dropdowns like the below example:

  group2:
    - entity_id: select.go_echarger_212417_ust
      text: Your text if you want one
      type: dropdown
      dropdownitems:
        - Normal
        - Auto Unlock
        - Always Locked

Yet, the card does nothing with the selection. You'd have to specify a service call for that to happen which works well for "regular" services. I see that the select integration provides a service call named select.select_option which in theory may work with the card. Something like:

  group2:
    - entity_id: select.go_echarger_212417_ust
      text: Your text if you want one
      type: dropdown
      dropdownitems:
        - Normal
        - Auto Unlock
        - Always Locked
      service: select.select_option
      service_data:
        target:
          entity_id: select.go_echarger_212417_ust
        data:
          option: '#SERVICEVAL#'

I'm not sure if the select integration requires the value (for instance 0) or if it allows for the text (for instance "Normal") to be sent. Something like the below should in theory work, but I couldn't get it running when doing a quick test on one of my select-entities:

  group2:
    - entity_id: select.pump1
      text: Pump1
      type: dropdown
      dropdownitems:
        - 'Off'
        - Medium
        - High
      service: select.select_option
      service_data:
        target:
          - entity_id: select.pump1
        data:
          - option: '#SERVICEVAL#'

The value #SERVICEVAL is replaced by the card to selected value when executing the call. Either I did some silly mistakes in my test here, or there is some kind of bug or mismatch with the select service call. Perhaps you could fool around with it and see if you get it working or what error messages you get?

@tomik671108
Copy link
Author

tomik671108 commented Aug 9, 2023

I tried this:

- entity_id: select.go_echarger_212417_lmo
  text: Logic_mode
  type: dropdown
  dropdownitems:
    - Default
    - Eco mode
    - Automatic Stop
  service: select.select_option
  service_data:
    target:
      entity_id: select.go_echarger_212417_lmo
    data:
      option: '#SERVICEVAL#'

... the checkbox shows up correctly, but I get the following message::
Failed to call select/select_option service. extra keys not allowed @ data['data']

When I call it directly from the entity, I get the following message:
The state has changed to "Eco mode" triggered by the select.select_option service

@tmjo
Copy link
Owner

tmjo commented Aug 9, 2023

Yeah, that's what I got. There might be some incompatability. I'll see if I can fix it.

@tomik671108
Copy link
Author

It would be great

@tomik671108
Copy link
Author

tomik671108 commented Aug 11, 2023

I think I managed to get this function to work properly, now it looks like this and works:

- entity_id: select.go_echarger_212417_lmo text: Logic mode icon: mdi:format-list-checkbox type: dropdown dropdownitems: - Default - Eco mode - Automatic Stop service: select.select_option service_data: option: '#SERVICEVAL#' entity_id: select.go_echarger_212417_lmo

....and the forum post on this topic was helpful.:
https://smarthome.community/topic/1008/home-assistant-service-call-json-formatting-question/8
....where it says:
"Yeaup I have run into this issue with as well, for some reason HA doesn't like it.target"

@tomik671108
Copy link
Author

I'm sorry that the code looks like this, before when I pasted the formatting was correct, in the preview I have it normally.

@IamMattM
Copy link

IamMattM commented Feb 12, 2024

I have just stumbled across this post.
Recently acquired a go-e gemini and will be interested to read through the progress made here.

By the way are you aware of the go-e (mqtt) HACS integration ?
https://github.com/syssi/homeassistant-goecharger-mqtt

and the older http api v1:
https://github.com/cathiele/homeassistant-goecharger

@K3vb3rt
Copy link

K3vb3rt commented Apr 9, 2024

I just installed the Gemini as well. Is anyone so kind and shares his code for a nice Gemini card (template)? Im not able to configure :-(

@IamMattM
Copy link

IamMattM commented Apr 9, 2024

I just installed the Gemini as well. Is anyone so kind and shares his code for a nice Gemini card (template)? Im not able to configure :-(

I have not had the opportunity to look into it myself since, but I gather that @tomik671108 might already have sussed out the required yaml for the card and a new const_goe.ts supporting the Go-e gemini (using go-e mqtt integration) ?

If so it would be great to have visibility of this if working for you @tomik671108 ?

@tomik671108
Copy link
Author

My card looks like this:

Zrzut ekranu 2024-04-11 o 20 23 26

At the top, on the left side, I have placed additional information that you can remove if you do not need it, from the top they are:

  • charger WiFi signal strength (RSSI)
  • pGrid value, i.e. the value of exporting electricity from solar panels to the power grid (the vehicle is charged with surplus energy)
  • expected maximum charging value
  • information about the vehicle's battery status
  • current, predicted range of the vehicle

Here is the configuration page:

Zrzut ekranu 2024-04-11 o 20 24 27

Photos of the charger to choose from:

go-e-charger-gemini-22-kw_frontansicht

go-e-charger-gemini-22-kw-laden-frontansicht

You need to put them in the Home Assistant folder, for example:
config//local/assets/go-e-charger-gemini-22-kw_frontansicht.png

And now the code that works for me, fill out the configuration page, confirm, go to "show code editor" and paste the code, but replace the entities with your own, the code is in the attachment because it formats incorrectly.:

go-e_card.txt

@K3vb3rt
Copy link

K3vb3rt commented Apr 11, 2024

Thank you soooo much!! Much appreciate it :-) Made my day <3

@IamMattM
Copy link

IamMattM commented Apr 11, 2024

@tomik671108
You're a STAR ! This card looks great !
Thank you for taking the time to post back all of this information, and share the outcome of your effort in porting the card for the go-e EVSE.
Looks very neat indeed.

@IamMattM
Copy link

IamMattM commented Apr 13, 2024

@tmjo @tomik671108
Got your version of the custom card for my go-e EVSE working as per your clear instructions (needed HACS custom brand icon package for the hyundai logo)

image

I was wondering if you had or already knew of a way to use an animated .gif overlay that would be triggered when the charger is active ?
What name should it take ?

go-e-ChargingOverlay,gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brand-addition For adding a new charger brand (or other brand).
Projects
None yet
Development

No branches or pull requests

4 participants