Code Monkey home page Code Monkey logo

homeassistant-goecharger's Introduction

Home Assistant integration for the go-eCharger (WIP)

hacs_badge Validate with hassfest

Integration for Homeassistant to view and Control the go-eCharger for electric Vehicles via the local ip-interface via API Version 1. In newer chargers the V1 API has to be enabled via the App first.

Features

  • attributes from charger available as sensors
  • switch to turn off/on charger
  • set charge limit in kWh (0.1 kWh steps)
  • set max current for charging in ampere (6-32A)
  • set absolute maximum current for charging (max can not be set higher than "absolute max")
  • no cloud connection needed to control the charger - only local ip-access needed.
  • correction factor for older devices which often present 5-10% lower voltage and therefore energy values

Warning: WIP - Breaking changes possible

This is the first version of the Integration so there are still breaking changes possible.

Installation

  • clone this repository
git clone https://github.com/cathiele/homeassistant-goecharger.git
  • copy the content of the custom_components-Folder to the custom_components folder of your home-assistant installation
# mkdir -p <your-ha-config-dir>/custom_components
# cp -r custom_components/goecharger <your-ha-config-dir>/custom_components
  • setup your Charger in the configuration.yaml (for always connected chargers):
goecharger:
  chargers:
    - name: charger1
      host: <ip of your charger>
    - name: charger2
      host: <ip or hostname of charger 2>
      correction_factor: factor for correction for total and session charged 

Sample View

screenshot of Home Assistant

Example Config

configuration.yaml

input_number:
  goecharger_charge_limit:
    name: Charge limit (kWh)
    min: 0
    max: 10
    step: 1

input_select:
  goecharger_max_current:
    name: Max current
    options:
      - 6
      - 10
      - 16
      - 20
      - 24
      - 32

automations.yaml

Important: Replace 111111 with your chargers name.

- id: '1576914483212'
  alias: 'goecharger: set max current on charger based on input select'
  description: ''
  trigger:
  - entity_id: input_select.goecharger_max_current
    platform: state
  condition: []
  action:
  - data_template:
      max_current: '{{ states(''input_select.goecharger_max_current'') }}'
    service: goecharger.set_max_current
- id: '1576915266692'
  alias: 'goecharger: set max_current input_select based on charger value'
  description: ''
  trigger:
  - entity_id: sensor.goecharger_111111_charger_max_current
    platform: state
  condition: []
  action:
  - data_template:
      entity_id: input_select.goecharger_max_current
      option: '{{ states.sensor.goecharger_111111_charger_max_current.state }}'
    service: input_select.select_option
- id: '1577036409850'
  alias: 'goecharger: set charge limit based on input'
  description: ''
  trigger:
  - entity_id: input_number.goecharger_charge_limit
    platform: state
  condition: []
  action:
  - data_template:
      charge_limit: '{{ states(''input_number.goecharger_charge_limit'') }}'
    service: goecharger.set_charge_limit
- id: '1577036687192'
  alias: 'goecharger: set charge_limit input based on charger'
  description: ''
  trigger:
  - entity_id: sensor.goecharger_111111_charge_limit
    platform: state
  condition: []
  action:
  - data_template:
      entity_id: input_number.goecharger_charge_limit
      value: '{{ states.sensor.goecharger_111111_charge_limit.state }}'
    service: input_number.set_value

Lovcelace-UI Card Example

Important: Replace 111111 with your chargers name.

cards:
entities:
  - entity: switch.goecharger_111111_allow_charging
  - entity: input_number.goecharger_charge_limit
  - entity: input_select.goecharger_max_current
  - entity: sensor.goecharger_111111_car_status
  - entity: sensor.goecharger_111111_charger_temp
  - entity: sensor.goecharger_111111_current_session_charged_energy
  - entity: sensor.goecharger_111111_current_session_charged_energy_corrected
  - entity: sensor.goecharger_111111_p_all
  - entity: sensor.goecharger_111111_p_l1
  - entity: sensor.goecharger_111111_p_l2
  - entity: sensor.goecharger_111111_p_l3
  - entity: sensor.goecharger_111111_u_l1
  - entity: sensor.goecharger_111111_u_l2
  - entity: sensor.goecharger_111111_u_l3
  - entity: sensor.goecharger_111111_i_l1
  - entity: sensor.goecharger_111111_i_l2
  - entity: sensor.goecharger_111111_i_l3
  - entity: sensor.goecharger_111111_energy_total
  - entity: sensor.goecharger_111111_energy_total_corrected
show_header_toggle: false
title: EV Charger (go-eCharger)
type: entities

homeassistant-goecharger's People

Contributors

bouni avatar cathiele avatar eingemaischt avatar jmust avatar zaubererty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-goecharger's Issues

cannot add integration anymore v0.25.0

After the update to version v0.25.0 I cannot add the integration anymore

go to new integration
try to add goe integration
fill out everything
press enter

  • home-assistant []
  • Charger Hardware: [v3]
  • Charger Firmware Version: [0.53.1]
  • Plugin Version: [0.25]

Additional context
error message:
User input malformed: expected float for dictionary value @ data['correction_factor']

Start charging not possible

When I want to start a charging process via the switch entity, the switch always jumps back. The charging process can be enabled immediately via the go-e app.

power control??

i would like to control the power of my wallbox but somehow i can’t do it with the automation. If I enter this it works

service: goecharger.set_max_current
data:
  max_current: 6

with the formula the correct result comes out in services but nothing happens in the automation - thank you very much for your help.

service: goecharger.set_max_current
data:
 max_current: {{ states('sensor.goecharger_wallbox_charger_max_current')|float + 1 }}

Support changing the cable lock mode

Thanks for the work on this integration, it's already really nice :)

If I may request a feature: It would be useful to be able to change the mode of the cable lock ("normal mode", "always locked", "locked during charging"). That way it'd be possible just leave the charging cable at home, and have it automatically locked once the car leaves the home zone. And of course the other way around, put the lock in "normal mode" once the car is back home & attached, so that the next morning the cable could be removed.

Setup fails if charger offline on start

When the charger is offline when starting home assistant, I found this in my log:

2020-04-09 21:43:47 ERROR (MainThread) [homeassistant.setup] Error during setup of component goecharger
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable
...

go-e will also not show up any time later. I have to restart HA, which drops all torque values, unfortunately.
As the charger is a mobile charger, it is rather common for me, that it is not online that often. Do you think there is a way to make the component reboot-safe?

Integration is using deprecated `DEVICE_CLASS_*` constants

Describe the bug

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

To Reproduce

n/a

Expected behavior

n/a

Screenshots

n/a

Versions (please complete the following information):

  • home-assistant: 2021.12 and newer
  • Charger Hardware: [e.g. v2] n/a
  • Charger Firmware Version: [e.g. 0.40] n/a
  • Plugin Version: [e.g. 0.23] n/a

Additional context

n/a

Integration 'goecharger' not found

Servus,

Du hast genau das gebaut was ich gerade brauche :)

Leider schmeisst er nach dem Kopieren folgenden Fehler:

2019-12-26 14:52:16 ERROR (MainThread) [homeassistant.components.hassio] Component error: goecharger - Integration 'goecharger' not found.
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/goecharger/init.py", line 9, in
from goecharger import GoeCharger
ModuleNotFoundError: No module named 'goecharger'

Do not zero sensors at no reading

I am having challenges with using utility meters together with the kwh sensors. Does not matter which I am using, both gives 0 values on and off probably due to the api not responding fast enough. This is causing the utility meters to go crazy, eg reading from current session charged is 10.3 kwh, but the utility meter that is consuming that value gives 255 kwh.

Proposal is to not have the sensors to report 0 when not getting a new update, but rather stay on current value until new actual value is received.

I have set up some rest sensors to test this and the box does not seem to report 0 on and off, but sometimes the api does not report all values.

Update for sensor.goecharger_xxxxxx_fails

Hi, great project here; very helpful. I try to realize a control to set the max current based on the power, that my solar panels deliver. I have written a python script, that calculates the new max current, that should be set.

To set the max current from the python script I call the service:
goecharger.set_max_current

with this payload (the value is an example):
max_current: 11

When I call the service; i see this message in the Core-Log:

2021-02-28 19:08:52 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.goecharger_003339_u_l3 fails
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.0.22', port=80): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
raise exc
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/goecharger/sensor.py", line 113, in update
fetchedStatus = self._goeCharger.requestStatus()
File "/usr/local/lib/python3.8/site-packages/goecharger/goecharger.py", line 280, in requestStatus
status = self.__queryStatusApi()
File "/usr/local/lib/python3.8/site-packages/goecharger/goecharger.py", line 184, in __queryStatusApi
statusRequest = requests.get("http://%s/status" % self.host, timeout=5) # TODO: Configurable Timeout
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.0.22', port=80): Read timed out. (read timeout=5)

Calibration for older devices

The older version of the goecharger often detects a lower voltage - for example 215V while 230V are on the line.
Therefore the energy shown and extracted is about 10% too low.

I wrote several feature requests to the company, but they do not seem to be interested in fixing this bug in the older version.

So I would like to implement a calibration offset in this integration.

But: This is only a dirty workaround - if you suffer from the bug, too: Please file a bug at the manufacturer.

Cable lock/switch entity

Is your feature request related to a problem? Please describe.
I would like to lock the cable of my charger while I am away but unlock it when I am close by for fast switching to another cable for a friend.

Describe the solution you'd like
I would love to have a lock or switch entity to engage or disengage the lock via an automation.

Describe alternatives you've considered
Do this by app which is annoying because my friend that uses the other cable type needs to call me to start the process.

Additional context
ust seems to be the appropriate api.

unlock_state: Kabelverriegelung Einstellung
0: Verriegeln solange Auto angesteckt
1: Nach Ladevorgang automatisch entriegeln
2: Kabel immer verriegelt lassen

Apparently this state can also be set according to the api docs.

goecharger connection not established when HA restarts

I had a running charging sesssion and restartet HA.
After that, goecharger components never came back. Is this expected?
Is it possible to rescan for an existing goecharger when HA starts, rather than to start HA and then plug in goecharger?

Switch to API v2

My go-e offers a new API v2 (/api/status). It would be great to use that API instead of the v1 version (/status). e-go states that the new API reveals more information and is is surely the one that will be subject to further development.
I am not sure though whether the existence of the v2 API depends on hardware or firmware versions.
Mine are: Hardware V3, firmware 050.2 (as stated in the app).

Screenshot_20210624-124612~2

Keine Entititäten

*Hallo,

ich habe meinen Go-eCharger in Home assistant integriert. Leider bekomme ich nur eine Entitiät angezeigt. Ich kann sie mit einem Schalter nur ein oder aus schalten.

Da ich ziemlich neu auf dem Gebiet bin kenne ich mich auch noch nicht richtig aus.

Ich habe die configuration.yaml angepasst und das automations.yaml eingepflegt. Alles nach der Dokumentation (111111111 wurde durch meinen namen des Chargers ersetzt.

Hab ich irgendwo was vergessen? Wo muss ich das Lovelace denn einpflegen?

API v.1 ist aktiviert.
Es ist eine CM2 Wallbox

Danke für eure Hilfe

Gemini partly works with api v1 enabled

I have a new gemini flex with version 53.7.
After enabling local HTTP API v1 in the app, most of the values show up.
So far I could successfully test changing max amps.

Plugin Version: 0.25.1

SwitchDevice is deprecated

Hi

Great work on this component, takes away a lot of effort creating all the rest calls through templating since I don't do Python very well!! :)

I just saw a message in my log though:

Logger: homeassistant.components.switch
Source: components/switch/__init__.py:125
Integration: Switch (documentation, issues)
First occurred: 10:10:33 AM (1 occurrences)
Last logged: 10:10:33 AM

SwitchDevice is deprecated, modify GoeChargerSwitch to extend SwitchEntity

/Andreas

set_stop_mode requested

Hi,

I'd like to enable and disable automatic charge shutdown after x kWh (due to connection to PV surplus power state).

Therefore the API call stop_mode (0/2) should be set.

Is there any chance to integrate this in the service calls and automations, e.g. like set_stop_mode for an input select?

Cheers!

Hagen

Fetching data problem after upgrading firmware to 051.3

Before upgrading go-e firmware to 051.3 everything worked fine for me.
I get the following error now (restart of go-e before) after a few minutes constantly:

Logger: custom_components.goecharger
Source: helpers/update_coordinator.py:193

Timeout fetching goecharger data

WIFI is connected with 50% signal strength.
Local HTTP API v1 is activated.
Home Assistant core is 2021.9.3

integration stopped working

Hi

I don't think I have done anything particular and only afterward upgrade my v2 charger to 041 fw.

The integration stopped working and when reinstalling and configuring I'm also getting the same error:

This error originated from a custom integration.

Logger: custom_components.goecharger
Source: custom_components/goecharger/__init__.py:91
Integration: go-eCharger (documentation, issues) 
First occurred: 1:31:32 AM (1 occurrences) 
Last logged: 1:31:32 AM

Unable to fetch state for Charger 038266

then

Logger: homeassistant.setup
Source: setup.py:310 
First occurred: 1:31:32 AM (2 occurrences) 
Last logged: 1:31:32 AM

Unable to prepare setup for platform goecharger.sensor: Platform not found (cannot import name 'STATE_CLASS_TOTAL_INCREASING' from 'homeassistant.components.sensor' (/usr/src/homeassistant/homeassistant/components/sensor/__init__.py)).

your help is appreciated

thanks

Unexpected error fetching goecharger data: Expecting value: line 1 column 1 (char 0)

After restart of home assistant all entities are unavailable. In the logs it says only
Unexpected error fetching goecharger data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/config/custom_components/goecharger/init.py", line 87, in fetch_states
fetchedStatus = await self._hass.async_add_executor_job(goeChargers[chargerName].requestStatus)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/goecharger/goecharger.py", line 308, in requestStatus
status = self.__queryStatusApi()
File "/usr/local/lib/python3.9/site-packages/goecharger/goecharger.py", line 204, in __queryStatusApi
status = statusRequest.json()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.9/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Read car_status in automation

I´m trying to react on the different states of car_status via automation.
Currently I´m only able to show the state via a message.
message: '{{ states(''sensor.goecharger_charger1_car_status'') }}'
This will print out the english text instead of a numerical value.
How do I get the numerical value and what data type do I have to set for the trigger?

State changes through REST on switch.goecharger_00xxxx_allow_charging not working

I am unable to activate/deactivate the charger through the home assistant rest api:

POST http://home.local/api/states/switch.goecharger_00xxxx_allow_charging
{"state":"on"}

{
    "attributes": {},
    "context": {
        "id": "d0d971e0605543adaa80ddda2b4e6406",
        "parent_id": null,
        "user_id": "d6608a685bca4227b5a5e0ec3514f679"
    },
    "entity_id": "switch.goecharger_00xxxx_allow_charging",
    "last_changed": "2020-07-11T15:58:40.274992+00:00",
    "last_updated": "2020-07-11T15:58:40.274992+00:00",
    "state": "on"
}

Will trigger the switch within home assistant itself on, but only until the next update of the component when it is flipped back to off, the charger itself will remain off for the whole time. Triggering the state change though the development tab will also show similar behaviour.

Doing a GET http://goe.local/mqtt?payload=alw=1 is successful.
Also, if i create this directly in the config:

rest_command:
  goe_on:
    url: 'http://goe.local/mqtt?payload=alw=1'
  goe_off:
    url: 'http://goe.local/mqtt?payload=alw=0'

switch:
  - platform: template
    switches:
      goe_charger_activate:
        friendly_name: "Activate"
        value_template: "{{ is_state('sensor.charger_unlocked', '1') }}"
        turn_on:
          service: rest_command.goe_on
        turn_off:
          service: rest_command.goe_off

Then this will successfully and permanently switch on the charger:
POST http://home.local/api/states/switch.goe_charger_activate
{"state":"on"}

Unfortunately I don't know enough python and custom components to check what's wrong in the component...

Invalid Config

Hallo, ich probiere es mal mit einem neuen Issue.
Ich bekomme folgende Fehlermeldung:

Invalid config for [goecharger]: [input_number] is an invalid option for [goecharger]. Check: goecharger->goecharger->input_number. (See /config/configuration.yaml, line 68).
Meine Einträge in der config sehen aber so aus, wie im Beispiel empfohlen:

goecharger:
host: 192.168.xx.yy
serial: ´001234´

input_number:
goecharger_charge_limit:
name: Charge limit (kWh)
min: 0
max: 10
step: 1

input_select:
goecharger_max_current:
name: Max current
options:
- 8
- 10
- 12
- 14

(natürlich mit der passenden IP und S/N)

Was mache ich denn falsch?

Unable to fetch state for Charger

Home Assistant 2021.6.3
go-eCharger Firmware Version 040.0
homeassistant-goecharger Version 0.22.0 installed from HACS

Device and entities are created. All entities are unavailable.

2021-06-11 09:40:14 ERROR (MainThread) [custom_components.goecharger] Unable to fetch state for Charger wallbox
2021-06-11 09:40:14 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform goecharger
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 615, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/config/custom_components/goecharger/sensor.py", line 191, in state
    return self.coordinator.data[self._chargername][self._attribute]
KeyError: 'wallbox'
2021-06-11 09:40:14 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform goecharger
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 615, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/config/custom_components/goecharger/switch.py", line 122, in is_on
    return True if self.coordinator.data[self._chargername][self._attribute] == "on" else False
KeyError: 'wallbox'
2021-06-11 09:40:14 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up goecharger platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 258, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 615, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/config/custom_components/goecharger/sensor.py", line 191, in state
    return self.coordinator.data[self._chargername][self._attribute]
KeyError: 'wallbox'
2021-06-11 09:40:14 ERROR (MainThread) [homeassistant.components.switch] Error while setting up goecharger platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 258, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 615, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 772, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/config/custom_components/goecharger/switch.py", line 122, in is_on
    return True if self.coordinator.data[self._chargername][self._attribute] == "on" else False
KeyError: 'wallbox'
2021-06-11 09:40:37 ERROR (MainThread) [custom_components.goecharger] Unable to fetch state for Charger wallbox
2021-06-11 09:40:37 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/config/custom_components/goecharger/sensor.py", line 191, in state
    return self.coordinator.data[self._chargername][self._attribute]
KeyError: 'wallbox'
2021-06-11 09:41:00 ERROR (MainThread) [custom_components.goecharger] Unable to fetch state for Charger wallbox
2021-06-11 09:41:00 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/config/custom_components/goecharger/sensor.py", line 191, in state
    return self.coordinator.data[self._chargername][self._attribute]
KeyError: 'wallbox'

Set current not working with sensor data

I have a PV solar system und would like change the charge current dynamically.
Here my config:
This is the conversion from power to current for a tow line charger

  - platform: template
    sensors:
      solar_charge_current:
        entity_id: sensor.kostal_pv_power
        friendly_name: "Solar Charge Current"
        unit_of_measurement: 'A'
        value_template: "{{ (states('sensor.kostal_pv_power')|int / 230 / 2)|round(0) }}"

This is my automation

- id: '1592747090585'
  alias: Set Solar Charge current
  description: ''
  trigger:
  - above: '6'
    below: '32'
    entity_id: sensor.solar_charge_current
    platform: numeric_state
  condition: []
  action:
  - data:
      enitiy_id: sensor.goecharger_0123456_charger_max_current
      max_current: '{{ trigger.to_state.state }}'
    service: goecharger.set_max_current
2020-06-25 08:14:24 ERROR (MainThread) [homeassistant.components.automation] Set Solar Charge current: Error executing script. Unexpected error for call_service at pos 1: invalid literal for int() with base 10: '{{ trigger.to_state.state }}'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
    self, f"_async_{cv.determine_script_action(self._action)}_step"
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 656, in _async_call_service_step
    *self._prep_call_service_step(), blocking=True, context=self._context
  File "/usr/src/homeassistant/homeassistant/core.py", line 1259, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1298, in _execute_service
    await self._hass.async_add_executor_job(handler.func, service_call)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/goecharger/__init__.py", line 55, in handle_set_max_current
    maxCurrent = int(maxCurrent)
ValueError: invalid literal for int() with base 10: '{{ trigger.to_state.state }}'

Any hint?

error during Home-Assistant startup (home-assistant.log)

Describe the bug
During startup following error is documented in home-assistant.log:

Unexpected error fetching goecharger data: dictionary changed size during iteration

2022-12-12 21:54:34.848 INFO (MainThread) [homeassistant.setup] Setting up goecharger
2022-12-12 21:54:34.848 DEBUG (MainThread) [custom_components.goecharger] async_setup
2022-12-12 21:54:34.848 DEBUG (MainThread) [custom_components.goecharger] Updating status...
2022-12-12 21:54:34.848 DEBUG (MainThread) [custom_components.goecharger] Finished fetching goecharger data in 0.000 seconds (success: True)
2022-12-12 21:54:34.849 INFO (MainThread) [homeassistant.setup] Setup of domain goecharger took 0.0 seconds
2022-12-12 21:54:34.892 INFO (MainThread) [homeassistant.components.camera] Setting up camera.mqtt
2022-12-12 21:54:34.893 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.4 seconds
2022-12-12 21:54:34.895 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel
2022-12-12 21:54:34.897 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 0.0 seconds
2022-12-12 21:54:34.898 INFO (MainThread) [homeassistant.setup] Setting up button
2022-12-12 21:54:34.900 INFO (MainThread) [homeassistant.setup] Setup of domain button took 0.0 seconds
2022-12-12 21:54:34.901 INFO (MainThread) [homeassistant.setup] Setting up climate
2022-12-12 21:54:34.908 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds
2022-12-12 21:54:34.911 INFO (MainThread) [homeassistant.setup] Setting up cover
2022-12-12 21:54:34.920 INFO (MainThread) [homeassistant.setup] Setup of domain cover took 0.0 seconds
2022-12-12 21:54:34.923 INFO (MainThread) [homeassistant.setup] Setting up fan
2022-12-12 21:54:34.930 INFO (MainThread) [homeassistant.setup] Setup of domain fan took 0.0 seconds
2022-12-12 21:54:34.950 INFO (MainThread) [homeassistant.setup] Setting up lock
2022-12-12 21:54:34.952 INFO (MainThread) [homeassistant.setup] Setup of domain lock took 0.0 seconds
2022-12-12 21:54:34.952 INFO (MainThread) [homeassistant.components.switch] Setting up switch.mqtt
2022-12-12 21:54:34.954 INFO (MainThread) [homeassistant.setup] Setting up humidifier
2022-12-12 21:54:34.958 INFO (MainThread) [homeassistant.setup] Setup of domain humidifier took 0.0 seconds
2022-12-12 21:54:34.961 INFO (MainThread) [homeassistant.setup] Setting up light
2022-12-12 21:54:34.963 INFO (MainThread) [homeassistant.setup] Setting up number
2022-12-12 21:54:34.965 INFO (MainThread) [homeassistant.setup] Setup of domain number took 0.0 seconds
2022-12-12 21:54:34.967 INFO (MainThread) [homeassistant.setup] Setting up select
2022-12-12 21:54:34.968 INFO (MainThread) [homeassistant.setup] Setup of domain select took 0.0 seconds
2022-12-12 21:54:34.970 INFO (MainThread) [homeassistant.setup] Setting up siren
2022-12-12 21:54:34.972 INFO (MainThread) [homeassistant.setup] Setup of domain siren took 0.0 seconds
2022-12-12 21:54:34.974 INFO (MainThread) [homeassistant.setup] Setting up text
2022-12-12 21:54:34.976 INFO (MainThread) [homeassistant.setup] Setup of domain text took 0.0 seconds
2022-12-12 21:54:34.979 INFO (MainThread) [homeassistant.setup] Setting up vacuum
2022-12-12 21:54:34.987 INFO (MainThread) [homeassistant.setup] Setup of domain vacuum took 0.0 seconds
2022-12-12 21:54:34.990 DEBUG (MainThread) [custom_components.goecharger] async_Setup_entry
2022-12-12 21:54:34.990 DEBUG (MainThread) [custom_components.goecharger] mappingproxy({'host': '192.168.178.68', 'name': 'ChargerLinks', 'scan_interval': 20, 'correction_factor': 0.9999})
2022-12-12 21:54:34.990 DEBUG (MainThread) [custom_components.goecharger] Updating status...
2022-12-12 21:54:34.991 DEBUG (MainThread) [custom_components.goecharger] update for 'ChargerLinks'..
2022-12-12 21:54:34.991 DEBUG (MainThread) [custom_components.goecharger] async_Setup_entry
2022-12-12 21:54:34.991 DEBUG (MainThread) [custom_components.goecharger] mappingproxy({'host': '192.168.178.67', 'name': 'charger_rechts', 'scan_interval': 20, 'correction_factor': 0.99999})
2022-12-12 21:54:34.991 DEBUG (MainThread) [custom_components.goecharger] Updating status...
2022-12-12 21:54:34.991 DEBUG (MainThread) [custom_components.goecharger] update for 'ChargerLinks'..
2022-12-12 21:54:35.059 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.goecharger
2022-12-12 21:54:35.062 INFO (MainThread) [homeassistant.components.switch] Setting up switch.goecharger
2022-12-12 21:54:35.082 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 1.3 seconds
2022-12-12 21:54:35.087 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mqtt
2022-12-12 21:54:35.088 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.mqtt
2022-12-12 21:54:35.089 INFO (MainThread) [homeassistant.components.button] Setting up button.mqtt
2022-12-12 21:54:35.090 INFO (MainThread) [homeassistant.components.climate] Setting up climate.mqtt
2022-12-12 21:54:35.091 INFO (MainThread) [homeassistant.components.cover] Setting up cover.mqtt
2022-12-12 21:54:35.092 INFO (MainThread) [homeassistant.components.fan] Setting up fan.mqtt
2022-12-12 21:54:35.097 INFO (MainThread) [homeassistant.components.lock] Setting up lock.mqtt
2022-12-12 21:54:35.098 INFO (MainThread) [homeassistant.components.humidifier] Setting up humidifier.mqtt
2022-12-12 21:54:35.099 INFO (MainThread) [homeassistant.components.number] Setting up number.mqtt
2022-12-12 21:54:35.100 INFO (MainThread) [homeassistant.components.select] Setting up select.mqtt
2022-12-12 21:54:35.101 INFO (MainThread) [homeassistant.components.siren] Setting up siren.mqtt
2022-12-12 21:54:35.102 INFO (MainThread) [homeassistant.components.text] Setting up text.mqtt
2022-12-12 21:54:35.108 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.1 seconds
2022-12-12 21:54:35.109 INFO (MainThread) [homeassistant.components.vacuum] Setting up vacuum.mqtt
2022-12-12 21:54:35.115 DEBUG (MainThread) [custom_components.goecharger.sensor] setup_platform
2022-12-12 21:54:35.115 DEBUG (MainThread) [custom_components.goecharger.switch] setup_platform
2022-12-12 21:54:35.248 INFO (MainThread) [homeassistant.components.light] Setting up light.mqtt
2022-12-12 21:54:35.384 INFO (MainThread) [homeassistant.setup] Setting up hacs
2022-12-12 21:54:35.384 INFO (MainThread) [homeassistant.setup] Setup of domain hacs took 0.0 seconds
2022-12-12 21:54:35.405 INFO (MainThread) [homeassistant.setup] Setting up tts
2022-12-12 21:54:35.439 INFO (SyncWorker_7) [pyfritzhome.fritzhome] Updating Templates ...
2022-12-12 21:54:35.440 INFO (SyncWorker_10) [pyfritzhome.fritzhome] Updating Devices ...
**2022-12-12 21:54:35.439 ERROR (MainThread) [custom_components.goecharger] Unexpected error fetching goecharger data: dictionary changed size during iteration**
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/goecharger/__init__.py", line 92, in fetch_states
    for chargerName in goeChargers.keys():
RuntimeError: dictionary changed size during iteration
2022-12-12 21:54:35.452 DEBUG (MainThread) [custom_components.goecharger] Finished fetching goecharger data in 0.461 seconds (success: False)
2022-12-12 21:54:35.454 DEBUG (MainThread) [custom_components.goecharger] update for 'charger_rechts'..

To Reproduce
Steps to reproduce the behavior:

  1. open home-assistant.log
  2. search for above error message

Expected behavior
home-assistant.log should contain no error message.

Screenshots
n.a.

Versions (please complete the following information):

  • home-assistant [2022.12.3]
  • Charger Hardware: [V3]
  • Charger Firmware Version: [0.54.3]
  • Plugin Version: [0.25.2]

pre- post- contactor mixed up?

My charger is connected to 230 Schuko with the adapter cable.
This is a glance I have set up:

columns: 3
entities:
  - entity: sensor.goecharger_111111_u_l1
  - entity: sensor.goecharger_111111_u_l2
  - entity: sensor.goecharger_111111_u_l3
  - entity: sensor.goecharger_111111_p_l1
  - entity: sensor.goecharger_111111_p_l2
  - entity: sensor.goecharger_111111_p_l3
  - entity: sensor.goecharger_111111_i_l1
  - entity: sensor.goecharger_111111_i_l2
  - entity: sensor.goecharger_111111_i_l3
  - entity: sensor.goecharger_111111_lf_l1
  - entity: sensor.goecharger_111111_lf_l2
  - entity: sensor.goecharger_111111_lf_l3
  - entity: sensor.goecharger_111111_pre_contactor_l1
  - entity: sensor.goecharger_111111_pre_contactor_l2
  - entity: sensor.goecharger_111111_pre_contactor_l3
  - entity: sensor.goecharger_111111_post_contactor_l1
  - entity: sensor.goecharger_111111_post_contactor_l2
  - entity: sensor.goecharger_111111_post_contactor_l3
show_icon: false
show_name: true
show_state: true
title: Phasenwerte
type: glance

it shows

  • u_l1 = 230V
  • pre_contactor_l1 = Off
  • pre_contactor_l3 = On

seems mixed up to me?

Temperature values seem to be swapped

Describe the bug
This picture shows temperature curves of my last charging session.
All temp values are about at the same level, except "Temp3".
As this is a single phase car, I would assume, that Temp3 is actually the temp of P1?
But when I look at https://github.com/cathiele/goecharger/blob/e8438d138794fa17e0c070fee6e840030a588e3a/goecharger/goecharger.py#L48 this seems to be straight forward.
On the other hand, I can't find any mapping definition in
https://github.com/goecharger/go-eCharger-API-v1/blob/master/go-eCharger%20API%20v1%20DE.md#r%C3%BCckgabeformat
which arry cell is which.

grafik

Versions:

  • home-assistant 2022.6.7
  • Charger Hardware: v2 ? device bought in 2020
  • Charger Firmware Version: 0.53 ?
  • Plugin Version: 0.25

Restart of goecharger not possible

Hi guys, is there any service to restart the wallbox? In the app I can restart it.
Often the box will only charge the car after I restart it for whatever reason so I want to make an automation if the car is not charging under certrain conditions when it should, restart the box.

Thanks

KWh limit is not set on wallbox

Hello,

if I set the charge Limit in Home Assistant there is no change in the app of the wallbox. Is this function work on FW 055.0 go-eCharger V3.

Problem with 0.19 with multiple chargers

Hi @cathiele ,

thanks for your great work and the recent implementation of multiple charge points this week.

I just updated to the latest 0.19 and want to give you some feedback.
(I used HACS to install the new version of the component). My config is

goecharger:
  chargers:
    - name: goe_dgar
      host: 192.168.x.y
    - name: goe_mgar
      host: 192.168.x.z

I restarted home assistant and found some new entities. The old ones did not disappear so I deleted them. The new naming-scheme seems less specific than the old one. The "goecharger_SERIAL"-prefix is missing so sensor.goecharger_SERIAL_charger_max_current became simply sensor.charger_max_current, sensor.goecharger_SERIAL_car_status became sensor.status which is very generic ;).

My main problem is, that I can only find a switch-entity for my first charger. That was named switch.goecharger_SERIAL_allow_charging in the old implementation. Now I can only find switch.SERIAL2 but no switch for my first charger.

Maybe I made a mistake in setup?

Thanks!
Michael

Can no add charger

I struggle in a really strange way ...
Integration is added, and IP and unique name is given but I get

User input malformed: expected float for dictionary value @ data['correction_factor']

Bildschirmfoto 2022-05-04 um 05 36 34

go-echarger not show as individual device in energy section

Describe the bug
I try to set up the new energy dashboard in home assistant and expect to add the go-eCharger in the "Individual devices" section. But only some other energy counters are listed, not the goe-charger.

To Reproduce
Go to Configuration->Energy->Add Device

I expect to find "sensor.goecharger_wallbox_energy_total", but it does not show up.

Screenshot_20210915_100054

Versions (please complete the following information):

  • home-assistant [supervisor-2021.09.0]
  • Charger Hardware: [v2]
  • Charger Firmware Version: [e.g. 041.0]
  • Plugin Version: [current master]

Guesses

I think devices need at least the following properties to be shown in the list:

      last_reset: '1970-01-01T00:00:00+00:00'
      device_class: energy
      state_class: measurement

[Q] Configure charger which is not always connected

In the github readme you state:

setup your Charger in the configuration.yaml (for always connected chargers):

goecharger:
chargers:
  - name: charger1
    host: <ip of your charger>
  - name: charger2
    host: <ip or hostname of charger 2>

What does the config look like for not always connected chargers? ;)

Allowing switching between 1-line or 3-line charging

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
In addition to being able to service.set_max_current it would be great to also have an option like service.set_lines (1 or 3 phases).

Describe alternatives you've considered
Setting it manually via go-e app.

Additional context
Would give a good effort if you are using it in combination with PV. Switching to "one line mode" allows charging with lower power like 1000W (1 line) if there is not enough PV energy available, and dynamically increase up to 22 kW (3 lines), usually done via HA automation or Node Red.

Thank you!

Edit: I guess the params are not available in API v1 but in v2, maybe pwm/lfspt/fsptws/spl3.

Check configuration YAML spinning forever

After adding the integration with HACS and adding a simple onfiguration I couldn't check the YAML-file in the developer tools anymore.

This is my configuration:
Bildschirmfoto 2023-04-10 um 19 23 38

  • home-assistant 2023.4.2
  • Charger Hardware: v2
  • Charger Firmware Version: 0.41
  • Plugin Version: 0.25.2

Did I miss something?

automatically set max current for charging?

Hi

I'm awaiting my e-go to arrive - I was wondering if anyone is controlling automatically their charging current based on PV excess production and how? would it make sense to add it as an additional feature to this plugin? I have such value (grid export) constantly monitored in HA through a sensor.

thanks

Platform goecharger does not generate unique IDs.

Hi

I'm running Home Assistant 2021.9.6 with custom component V0.0.7

My logs are full of the following:

2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_car_status is already used by sensor.goecharger_garage_car_status - ignoring sensor.goecharger_Garage_car_status
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_max_current is already used by sensor.goecharger_garage_charger_max_current - ignoring sensor.goecharger_Garage_charger_max_current
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_absolute_max_current is already used by sensor.goecharger_garage_charger_absolute_max_current - ignoring sensor.goecharger_Garage_charger_absolute_max_current
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_err is already used by sensor.goecharger_garage_charger_err - ignoring sensor.goecharger_Garage_charger_err
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_access is already used by sensor.goecharger_garage_charger_access - ignoring sensor.goecharger_Garage_charger_access
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_stop_mode is already used by sensor.goecharger_garage_stop_mode - ignoring sensor.goecharger_Garage_stop_mode
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_cable_lock_mode is already used by sensor.goecharger_garage_cable_lock_mode - ignoring sensor.goecharger_Garage_cable_lock_mode
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_cable_max_current is already used by sensor.goecharger_garage_cable_max_current - ignoring sensor.goecharger_Garage_cable_max_current
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_pre_contactor_l1 is already used by sensor.goecharger_garage_pre_contactor_l1 - ignoring sensor.goecharger_Garage_pre_contactor_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_pre_contactor_l2 is already used by sensor.goecharger_garage_pre_contactor_l2 - ignoring sensor.goecharger_Garage_pre_contactor_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_pre_contactor_l3 is already used by sensor.goecharger_garage_pre_contactor_l3 - ignoring sensor.goecharger_Garage_pre_contactor_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_post_contactor_l1 is already used by sensor.goecharger_garage_post_contactor_l1 - ignoring sensor.goecharger_Garage_post_contactor_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_post_contactor_l2 is already used by sensor.goecharger_garage_post_contactor_l2 - ignoring sensor.goecharger_Garage_post_contactor_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_post_contactor_l3 is already used by sensor.goecharger_garage_post_contactor_l3 - ignoring sensor.goecharger_Garage_post_contactor_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_temp is already used by sensor.goecharger_garage_charger_temp - ignoring sensor.goecharger_Garage_charger_temp
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_temp0 is already used by sensor.goecharger_garage_charger_temp0 - ignoring sensor.goecharger_Garage_charger_temp0
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_temp1 is already used by sensor.goecharger_garage_charger_temp1 - ignoring sensor.goecharger_Garage_charger_temp1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_temp2 is already used by sensor.goecharger_garage_charger_temp2 - ignoring sensor.goecharger_Garage_charger_temp2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charger_temp3 is already used by sensor.goecharger_garage_charger_temp3 - ignoring sensor.goecharger_Garage_charger_temp3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_current_session_charged_energy is already used by sensor.goecharger_garage_current_session_charged_energy - ignoring sensor.goecharger_Garage_current_session_charged_energy
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_charge_limit is already used by sensor.goecharger_garage_charge_limit - ignoring sensor.goecharger_Garage_charge_limit
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_adapter is already used by sensor.goecharger_garage_adapter - ignoring sensor.goecharger_Garage_adapter
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_unlocked_by_card is already used by sensor.goecharger_garage_unlocked_by_card - ignoring sensor.goecharger_Garage_unlocked_by_card
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_energy_total is already used by sensor.goecharger_garage_energy_total - ignoring sensor.goecharger_Garage_energy_total
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_wifi is already used by sensor.goecharger_garage_wifi - ignoring sensor.goecharger_Garage_wifi
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_u_l1 is already used by sensor.goecharger_garage_u_l1 - ignoring sensor.goecharger_Garage_u_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_u_l2 is already used by sensor.goecharger_garage_u_l2 - ignoring sensor.goecharger_Garage_u_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_u_l3 is already used by sensor.goecharger_garage_u_l3 - ignoring sensor.goecharger_Garage_u_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_u_n is already used by sensor.goecharger_garage_u_n - ignoring sensor.goecharger_Garage_u_n
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_i_l1 is already used by sensor.goecharger_garage_i_l1 - ignoring sensor.goecharger_Garage_i_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_i_l2 is already used by sensor.goecharger_garage_i_l2 - ignoring sensor.goecharger_Garage_i_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_i_l3 is already used by sensor.goecharger_garage_i_l3 - ignoring sensor.goecharger_Garage_i_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_p_l1 is already used by sensor.goecharger_garage_p_l1 - ignoring sensor.goecharger_Garage_p_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_p_l2 is already used by sensor.goecharger_garage_p_l2 - ignoring sensor.goecharger_Garage_p_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_p_l3 is already used by sensor.goecharger_garage_p_l3 - ignoring sensor.goecharger_Garage_p_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_p_n is already used by sensor.goecharger_garage_p_n - ignoring sensor.goecharger_Garage_p_n
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_p_all is already used by sensor.goecharger_garage_p_all - ignoring sensor.goecharger_Garage_p_all
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_lf_l1 is already used by sensor.goecharger_garage_lf_l1 - ignoring sensor.goecharger_Garage_lf_l1
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_lf_l2 is already used by sensor.goecharger_garage_lf_l2 - ignoring sensor.goecharger_Garage_lf_l2
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_lf_l3 is already used by sensor.goecharger_garage_lf_l3 - ignoring sensor.goecharger_Garage_lf_l3
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_lf_n is already used by sensor.goecharger_garage_lf_n - ignoring sensor.goecharger_Garage_lf_n
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_firmware is already used by sensor.goecharger_garage_firmware - ignoring sensor.goecharger_Garage_firmware
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_serial_number is already used by sensor.goecharger_garage_serial_number - ignoring sensor.goecharger_Garage_serial_number
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_wifi_ssid is already used by sensor.goecharger_garage_wifi_ssid - ignoring sensor.goecharger_Garage_wifi_ssid
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_wifi_enabled is already used by sensor.goecharger_garage_wifi_enabled - ignoring sensor.goecharger_Garage_wifi_enabled
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_timezone_offset is already used by sensor.goecharger_garage_timezone_offset - ignoring sensor.goecharger_Garage_timezone_offset
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.sensor] Platform goecharger does not generate unique IDs. ID Garage_timezone_dst_offset is already used by sensor.goecharger_garage_timezone_dst_offset - ignoring sensor.goecharger_Garage_timezone_dst_offset
2021-11-11 20:01:34 ERROR (MainThread) [homeassistant.components.switch] Platform goecharger does not generate unique IDs. ID Garage_allow_charging is already used by switch.goecharger_garage_allow_charging - ignoring switch.goecharger_Garage_allow_charging

Is this expected? what should I do to avoid duplicate IDS?

MaxCurrent not set

I got it working so far, but my go-e-charger does not react on setting the MaxCurrent. The switch does work, but MaxCurrent as well as charge limit are not working.
The charger works on Firmware version 040.0. The logs does not show anything suspicious
Do you have any hints?

No 'version' key in the manifest file for custom integration 'goecharger'.

Please release a new version, preferably 0.13.0 to get my already merged PR #31 integrated and prevent HA from printing the error message:

No 'version' key in the manifest file for custom integration 'goecharger'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'goecharger'

Error in HA Log with TMA

I get following error in HA Log with the integration

`Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.goecharger
Source: custom_components/goecharger/init.py:87
Integration: go-eCharger (documentation, issues)
First occurred: 06:43:25 (1 occurrences)
Last logged: 06:43:25

Unexpected error fetching goecharger data: float() argument must be a string or a number, not 'NoneType'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
return await self.update_method()
File "/config/custom_components/goecharger/init.py", line 87, in fetch_states
fetchedStatus = await self._hass.async_add_executor_job(goeChargers[chargerName].requestStatus)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/goecharger/goecharger.py", line 309, in requestStatus
response = GoeChargerStatusMapper().mapApiStatusResponse(status)
File "/usr/local/lib/python3.9/site-packages/goecharger/goecharger.py", line 50, in mapApiStatusResponse
t1 = float(valueOrNull(status.get('tma', []), GoeCharger.TMA_1))
TypeError: float() argument must be a string or a number, not 'NoneType'
`

Versions (please complete the following information):

  • home-assistant 2022.3.8
  • Charger Hardware: [v3]
  • Charger Firmware Version: [0.53.1]
  • Plugin Version: [e.g. 0.24.1]

Best regards,
Stefan

How input number show up as integer?

The integration is working like charm... Thank you!

One thing: Any idea where to config that the values of input number show up as integer and not float in Lovelace?
Bildschirmfoto 2022-01-21 um 09 19 09

User input malformed: expected float for dictionary value @ data['correction_factor

Describe the bug
Trying to add HACS installed and when entering data I receive: "User input malformed: expected float for dictionary value @ data['correction_factor']", so I can't integrate it.

To Reproduce
Steps to reproduce the behavior:
Go to HACS and install
Go to add integration and select "go-e charger"

Versions (please complete the following information):
Home Assistant 2022.8.6
Supervisor 2022.08.3
Operating System 8.4
Frontend 20220802.0 - latest

Additional context
Have it running on a rpi4 in parallel and it works fine for month (haven't changed it though, other but updating over time)

image

Possible use multiple goecharger?

Hello,
is it possible use multiple goecharger?
I have 2 goechargers and wanted to control both of them in home assistant.
How can i do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.