Giter Club home page Giter Club logo

easee_hass's People

Contributors

astrandb avatar bortek avatar danielhiversen avatar dependabot[bot] avatar flopp999 avatar fondberg avatar hellowlol avatar henrikeri avatar iboboc avatar olalid avatar snjallingur avatar stevonl avatar theneedyguy avatar tmjo avatar tobiasbayer avatar valentinobianco 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  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

easee_hass's Issues

Basic schedule clock offset wrong

Seems the offset of the clock is wrong by one hour from what is reported in the easee app and the easee integration, it seems the same offset is for both start and stop

Smart charging

I try to change the smart charging state. I only can switch it on by using the easee.smart_charging service.

If I switch it by using switch.easee_home_12345_smart_charging, it tells me that only one parameter is defined, but 2 are given and it's not changing the smart charging state.

How could I change this state ?

Martin

Error in request from HA

This message appears quite often in the HA log file. The car is not plugged into the charger.

Logger: easee.easee
Source: /usr/local/lib/python3.8/site-packages/easee/easee.py:42
First occurred: 10:56:42 (15 occurrences)
Last logged: 11:01:10

Error in request to Easee API: {'errorCode': 0, 'errorCodeName': 'Uknown', 'type': None, 'title': 'Something went wrong. Try again', 'status': 500, 'detail': '[Empty in production]', 'instance': None}

Configured area for the device disappears

Hi,
Running latest HA (0.115.6) and latest Easee charger component (0.9.16).
Tested in two different HA instances.

How to replicate:

  • Configure an area for the Easee device
  • Change something in Options (i.e. add a monitored sensor)
  • Observe the area for the Easee device is now listed as "No area"

Services and their usage

easee.set_charger_dynamic_current
easee.set_charger_circuit_dynamic_current
easee.set_circuit_dynamic_current

Can someone explain to me the differences between these 3 service calls?

Change MaxCircuit

Hi,
first of all - thank you for creating this awesome HA integration.
One thing I observed: Is it possible to programmatically change MaxCircuit?

Background: when charging from PV, I'd like to periodically adjust charged Amps according to current power overhead.

Thanks,
Marcel

Implement all Equalizer states into the integration

Hello,

It looks like some of the states from the Equalizer are missing in the integration.
Here is what I have in Home Assistant through a binary sensor:

name: Easee Equalizer Home
id: 
state_latestPulse: 
state_clockAndDateMeter:
state_rcpi: 
state_localRSSI: 
state_softwareRelease: 
state_latestFirmware: 
friendly_name: Easee Equalizer Home Online
device_class: 

And here is what the API documentation is showing regarding the Equalizer states:

{
  "currentL1": 0,
  "currentL2": 0,
  "currentL3": 0,
  "voltageNL1": 0,
  "voltageNL2": 0,
  "voltageNL3": 0,
  "voltageL1L2": 0,
  "voltageL1L3": 0,
  "voltageL2L3": 0,
  "activePowerImport": 0,
  "activePowerExport": 0,
  "reactivePowerImport": 0,
  "reactivePowerExport": 0,
  "cumulativeActivePowerImport": 0,
  "cumulativeActivePowerExport": 0,
  "cumulativeReactivePowerImport": 0,
  "cumulativeReactivePowerExport": 0,
  "clockAndDateMeter": "string",
  "rcpi": 0,
  "maxPowerImport": 0,
  "localRSSI": 0,
  "softwareRelease": 0,
  "latestFirmware": 0,
  "isOnline": true,
  "latestPulse": "2021-08-18T12:07:37.204Z",
  "ledMode": 0,
  "equalizedChargeCurrent_L1": 0,
  "equalizedChargeCurrent_L2": 0,
  "equalizedChargeCurrent_L3": 0
}

Could it be implemented in a future update so that we can retrieve the values presented in the Easee app for the Equalizer?

How do I change the password?

I have changed the password to Easee cloud but can't find any way to change it in the integration. Adding it to easee: section in configuration.yaml resulted in configuration error: Maybe it's not possible or I didn't do it in a proper way. If possible some documentation would be very nice. I can't find the source directory listed below.

Clicking 'Alternativ' in the integration just results in an endless message for the integration to be installed.

Logger: easee.easee
Source: /usr/local/lib/python3.8/site-packages/easee/easee.py:31
First occurred: 21:58:39 (1 occurrences)
Last logged: 21:58:39
Bad request service (400: {'errorCode': 100, 'errorCodeName': 'InvalidUserPassword', 'type': None, 'title': 'Username or password is invalid', 'status': 400, 'detail': '[Empty in production]', 'instance': None} https://api.easee.cloud/api/accounts/token)

Invalid Add-on repository!

Getting Invalid Add-on repository! error message when trying to add repo in Home Assistant OS 5.10:

21-01-14 05:13:11 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/fondberg/easee_hass repository 21-01-14 05:13:12 ERROR (MainThread) [supervisor.store] https://github.com/fondberg/easee_hass is not a valid add-on repository 21-01-14 05:13:12 ERROR (MainThread) [supervisor.utils.json] Can't read json from /data/addons/git/bc29b0ef/repository.json: [Errno 2] No such file or directory: '/data/addons/git/bc29b0ef/repository.json' 21-01-14 05:13:12 WARNING (MainThread) [supervisor.store.data] Can't read repository information from /data/addons/git/bc29b0ef/repository.json 21-01-14 05:13:12 INFO (MainThread) [supervisor.store] Loading add-ons from store: 66 all - 0 new - 0 remove 21-01-14 05:13:12 INFO (MainThread) [supervisor.resolution.fixups.store_execute_remove] Remove invalid Store: bc29b0ef 21-01-14 05:13:12 INFO (MainThread) [supervisor.store.git] Removing custom add-on repository https://github.com/fondberg/easee_hass 21-01-14 05:13:13 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING 21-01-14 05:13:13 INFO (MainThread) [supervisor.resolution.check] System checks complete

Feature request.

I would like to have a service that exposes the access.

This way i can use a device tracker in ha that disabled rfid access when the car is parked next to the charger and reenable this with the cars isnt parked there.

I dont know if this is possible atm, i assumed that it would be possible to just add

    async def require_rfid_access(allowed: bool):
        """ Set charger dynamic current """
        json = {"authorizationRequired": allowed}
        return await easee.post(f"/api/chargers/{charger.id}/settings", json=json)

    await require_rfid_access(True)


    async def set_access(accesslevel: int):
        """"1: Open for all
              2: Access to all users with Easee account.
              3: Access to whitelisted users
         """"
        return await easee.put(f"/api/chargers/{charger.id}/access/", json=accesslevel)

But it dont seem to change anything in the easee cloud.

Edit:
Pressing the button in the app seems to change the access to Access to all users with a Easee account (the data is sends is 2)

set_access seems to work but the car isnt home atm so i need to check that this works as intented.

Car Charge Automation base on Solar production

I am trying to create an automation based on solar production and car Screenshot 2021-05-28 at 09 37 09
Screenshot 2021-05-28 at 09 35 27

But I don't get it to run based on my requirements.
Same thing when I trying to run the service in the developer tool. Please see attached images.
Is there anything else I should insert in the easee service beside the charger ID? Or anything else that I missed

Thanks in advance
Adam

Config flow could not be loaded

After installing the custom component through HACS I can't configure it. I get this error from Configurations->Integrations.

I'm running core-2021.3.2 and supervisor-2021.03.4

Screenshot 2021-03-07 at 14 06 42

Best regards,

cablelocked and consumption_days_1 does not seam to update

Release 0.9.12 and previous

cablelocked does not update any mater if I lock or unlock it
consumption_days_1 remains 0, the other time intervals are working fine. Also, the session_energy is working fine and increases during the day.

Let me know if I can help in any way or supply more information if you can replicate the problem

Thanks for all the changes, really happy with this integration

Strange behavior from the “cableLocked” sensor (or actually switch)

From forum: https://community.home-assistant.io/t/easee-ev-charging-station/186474/70

Hi,

I started testing this integration today, and so far it looks very promising. Thank you @fondberg and the rest of the developers! :-)

I did notice some (in my opinion) strange behavior from the “cableLocked” sensor (or actually switch), switch.easee_charger_ehXXXXXX_cablelocked, and I was just wondering if this is by design or a bug:

  • If a car is connected to the charger, and the “permanent lock” is enabled, the “cablelocked” switch is “on”.

  • I go ahead and turn the “cablelocked” switch to “off” in Home Assistant.

  • This disables the “permanent lock” option as I can verify this in the Easee app and web page.

  • However the “cablelocked” switch will jump back to “on” in Home assistant. (Probably because the cable is still in fact locked as there is a car connected).

  • I can not re-enable the “permanent lock” from Home Assistant, as the switch is already “on”.

  • This means there is an inconsistency between what the switch displays (state.cableLocked?), and what the switch actually does when switched (state.lockCablePermanently?).

(Sidenote: If a car is not connected to the charger, the switch will function more as expected, as the state.lockCablePermanently and state.cableLocked will be the same state (both true or both false), however there is a delay where the switch goes back to the previous state for a while before it updates).

In my opinion this is not logical behavior from a switch, and my suggestion is to divide this in 2 parts:

  • A switch which relates only to the “permanent lock” so this function can be easily switched on/off (both manually and in automations).

  • A sensor for showing if the cable is locked or not (this is basically what the switch shows as it is now, however this should not be a switch as you cannot control this anyway. You can only control if the cable is permanently locked or not)

Power vs Energy units

Power is measured in W, energy in Wh.
All of the energy sensors currently have "W" as their unit, so that should be changed.
(If the easee API returns values in Wh or kWh I do not know...).

PS. Thanks for good work.

Issues related to adding/removing sensors

Testing version 0.9.19 and there are still issues related to adding/removing sensors:

  • Removing all sensors causes the device to disappear as well. Not sure if it is by design or not, but it should not be necessary, as it is possible to have a device without entities.

  • Similarly, if you remove all currently selected sensors but also add some new sensors in the same operation, this will also cause the device to be removed/regenerated, so you will see some strange behavior in the HA Integration UI (The line which says "1 device and X entities" disappears, and you have to refresh the page for it to appear again). The device also loose the area information when this happens.

  • If you remove a sensor, and wait 10-15 seconds, the "ghost" sensor will still reappear in the entities list (NOTE: It's will no longer be listed under the "Easee EV charger" integration, so you have to look at all entities to see it). So if you try to readd the sensor without restarting HA inbetween, you will still get the *_2 naming for the new sensor.

Be able to start charging immediatly, ergo pause smart charging.

When using the Tibber app, I can easily press "start" in the app when the car is connected and the car start charging. The functionality is possible since I have the Tibber pulse and have smart charging available. I would like to get this functionality in Home Assistant instead so I can use only a lovelace dashboard and not the Tibber app.
Would this be possible? I am fairly new to home assistant so I'm not entirely sure how service calls works, but I suppose this is something that has to be done by an automation? Any help would be much appreciated.

Update for sensor current fails

Hello,

Firstly thanks for a great integration. I just got installed 2 Easee Home charger with a Ease Equalizer and get the following errors after integration to Home Assistant :

2021-08-17 19:41:13 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.garage_current fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in async_device_update
raise exc
File "/config/custom_components/easee/entity.py", line 280, in async_update
self._state = self._state_func(self.data.state)
File "/config/custom_components/easee/const.py", line 178, in <lambda>
max(
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'
2021-08-17 19:46:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.driveway_current fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in async_device_update
raise exc
File "/config/custom_components/easee/entity.py", line 280, in async_update
self._state = self._state_func(self.data.state)
File "/config/custom_components/easee/const.py", line 178, in <lambda>
max(
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType'

It looks like there is something wrong with the current sensors on both Easee Home. I see that they are listed as "unavailable" in the entity list in HA

Any ideas what this might be?
Is is just because no cars are currently charging?

Cheers.

No module named 'signalrcore.transport'

Thanks for a great component.

After upgrading to HA Core 2021.03.2 this morning Easee would not load with the following error.

Unable to import component: No module named 'signalrcore.transport'

I removed the component, which I installed before you made it to HACS default, and reinstalled from the default repository. Now when I try to add the integration in HA I get the following error

Error occurred loading configuration flow for integration easee: No module named 'signalrcore.transport'

Cable locked permanently entity class

The "Cable permanently locked charger" device seems to be implemented as a switch, not a lock.
When included in Lovelace it appears as a switch, not LOCK/UNLOCK.

Screenshot 2020-11-29 at 12 03 59

Error unloading entry

Sometimes (or always?) when changing custom units in the integration options, I seem to get an error saying "Error unloading entry".

Logger: homeassistant.config_entries
Source: helpers/entity_component.py:176
First occurred: 9:49:01 PM (2 occurrences)
Last logged: 9:49:01 PM

Error unloading entry tmjo for sensor
Error unloading entry tmjo for switch
Traceback (most recent call last):
  File "/workspaces/git/homeassistant/config_entries.py", line 309, in async_unload
    result = await component.async_unload_entry(  # type: ignore
  File "/workspaces/git/homeassistant/components/sensor/__init__.py", line 72, in async_unload_entry
    return await hass.data[DOMAIN].async_unload_entry(entry)
  File "/workspaces/git/homeassistant/helpers/entity_component.py", line 176, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

On one occation I had duplicat sensors made (automatically given an _2 suffix by HA), and it got really messy. Solved by removing entities and adding again, but shouldn't be like this. When this happens, it seems like custom units is not working well although it works as intended when "cleaning up". Anyone see how this can be fixed? Perhaps this is the cause for the error reported by nsimb in #28 as well?

Current per phase?

I assume that all exposed data is added as sensors in the (awesome) integration? Is in that case, the API really not exposing current in, or power in, per phase? Should be requested from Easee since it will be required for correct and efficient power control (eg manual load balancing).

Errors in log every minute after upgrading to latest version

Hi
I noticed after upgrading to latest version (0.9.16) I had errors logged every minute.
Just now I removed the component and started from scratch, just to make sure the error is not in my configuration.

Running latest HA (0.115.6) and latest Easee charger component (0.9.16).

The errors repeats constantly like this every minute:

2020-10-06 12:12:31 ERROR (MainThread) [easee.easee] Got other exception from status
2020-10-06 12:12:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status
await raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 40, in raise_for_status
raise NotFoundException(data)
easee.exceptions.NotFoundException
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/easee/entity.py", line 49, in async_refresh
self.schedule = await self.charger.get_basic_charge_plan()
File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan
plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan")
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get
await self.check_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 107, in check_status
raise Exception(ex) from ex
Exception
2020-10-06 12:13:31 ERROR (MainThread) [easee.easee] Got other exception from status
2020-10-06 12:13:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status
await raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 40, in raise_for_status
raise NotFoundException(data)
easee.exceptions.NotFoundException
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/easee/entity.py", line 49, in async_refresh
self.schedule = await self.charger.get_basic_charge_plan()
File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan
plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan")
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get
await self.check_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 107, in check_status
raise Exception(ex) from ex
Exception
2020-10-06 12:14:31 ERROR (MainThread) [easee.easee] Got other exception from status
2020-10-06 12:14:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status
await raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 40, in raise_for_status
raise NotFoundException(data)
easee.exceptions.NotFoundException
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/easee/entity.py", line 49, in async_refresh
self.schedule = await self.charger.get_basic_charge_plan()
File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan
plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan")
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get
await self.check_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 107, in check_status
raise Exception(ex) from ex
Exception
2020-10-06 12:15:31 ERROR (MainThread) [easee.easee] Got other exception from status
2020-10-06 12:15:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status
await raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 40, in raise_for_status
raise NotFoundException(data)
easee.exceptions.NotFoundException
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/easee/entity.py", line 49, in async_refresh
self.schedule = await self.charger.get_basic_charge_plan()
File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan
plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan")
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get
await self.check_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 107, in check_status
raise Exception(ex) from ex
Exception

Custom units mandetory?

Don't know when added but I hade some problems so removed and added the integration again.
When in options for choosing sensors the custom units are now mandatory to be able to Submit
Is this intensional?
Once added one I can submit and then again remove the custom units. However, the conversion does not disappear.
so can't get back my kwh

forgot to add version v0.9.13

Missing energy bar randomly

Randomly (not too often) there are missing bars. Not sure if this is related to the Easee integration or HA core.
See attached
Screenshot 2021-09-10 095809

Does only report text values to InfluxDB

I have enabled pretty much all sensors for my Easee integration and my HASS installation has InfluxDB configured.

But when I configure dashboards in Grafana (with InfluxDB as source) I can only find sensors, in the list, which have a text string value. None of the other sensors, such as voltage, total power, session energy, etc. shows up. But sensors such as status, locked charger, etc shows up with their text string value.

Is this an error with data type or similar or is it something on my end?

If there are no schedules we should not spam the logs

2020-08-05 11:49:23 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.easee_charger_eh239897_basic_schedule fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
await self.async_update() # type: ignore
File "/config/custom_components/easee/sensor.py", line 456, in async_update
self._state = self.get_value_from_key(self._state_key)
File "/config/custom_components/easee/sensor.py", line 439, in get_value_from_key
value = self.charger_data.schedule[second]
KeyError: 'id'

Cannot call service on turn_on/off smart_charging()

I am unable to use the Switch entity to turn on or off the Smart Charging.
When using the Easee-app, I see the change instantly in HA, but using the switch returns the following:

"Failed to call service switch/turn_on/off. smart_charging() takes 1 positional argument but 2 were given"

Make "Cost per kwh" writable

First, thank you for a very solid integration, way above the average HACS integration.

Having "Cost per kwh" writable would allow me to feed this data from another source, such as tibber:sensor.electricity_price_*, getting a more accurate representation of the current cost.

binary_sensor.easee_home_#####_online not disconnected?

Hi. Is this sensor reporting the connection between the integration to Easee's servers or the connection between Easee's servers and the charger? My Easee mobile app reports the chager as being offline (as I have pulled the circut braker) but the binary sensor reports claims it's online. The other sensors work as expected. It would be cool if this could report on the charger being offline as I would like to use this as a way to notify me if the charger trips the circut braker or goes offline and stops charging the car.

Easee component not starting

HASS version 0.114.4
Easee component version: 0.9.13
Installed using HACS.

I haven´t figured out how to get this component running. Home assistant log says that the component is loaded:
2020-09-14 12:46:48 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for easee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

But it does not show up it Intregrations. And I cant find any entity or any service related to easee.

I have set the log to debug( custom_components.easee: debug ), but it logs absolutely nothing.

I have tried uninstalling and reinstalling the component using hacs. ( made sure no cache was left after uninstall)

Do you have any idea?

binary_sensor.basic_schedule - TypeError: list indices must be integers or slices, not str

I've been getting this every now and then, believe it is only on restart of HA. I can take a look at it later, just pasting the error message while I remember it :) After some time, the sensor is updated correctly, so it is not a major problem.

Logger: homeassistant.helpers.entity
Source: custom_components/easee/entity.py:232
First occurred: 8:51:22 (1 occurrences)
Last logged: 8:51:22

Update for binary_sensor.easee_1_basic_schedule fails
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 "/config/custom_components/easee/entity.py", line 249, in async_update
    self._state = self.get_value_from_key(self._state_key)
  File "/config/custom_components/easee/entity.py", line 232, in get_value_from_key
    value = self.charger_data.schedule[second]
TypeError: list indices must be integers or slices, not str

Connection is already closed error

Not critical, but I add it for later follow-up. From time to time I get these annoying "connection is already closed". I guess we can fix that by ignoring the error if already closed in a try/except or something.

Logger: websocket
Source: /usr/local/lib/python3.8/site-packages/websocket/_logging.py:61
First occurred: 10 May 2021, 22:57:00 (4 occurrences)
Last logged: 14:34:20

error from callback <bound method BaseHubConnection.on_socket_error of <signalrcore.hub.auth_hub_connection.AuthHubConnection object at 0x7f49774ae070>>: Connection is already closed.
error from callback <bound method BaseHubConnection.on_socket_error of <signalrcore.hub.auth_hub_connection.AuthHubConnection object at 0x7f49736df490>>: Connection is already closed.
error from callback <bound method BaseHubConnection.on_socket_error of <signalrcore.hub.auth_hub_connection.AuthHubConnection object at 0x7f4973189ac0>>: Connection is already closed.
error from callback <bound method BaseHubConnection.on_socket_error of <signalrcore.hub.auth_hub_connection.AuthHubConnection object at 0x7f496d046100>>: Connection is already closed.

New error message?

Hi Love this plugin!

this has been working 100% since installation for +5 months but after the last Easee update I get this error
image
And all the sensors are now off-line

The Easee APP on my phone works 100% so something in the integration might have changed?
Running latest HAC version of the easee_hass and latest Hassio version

Minor annoyance in friendly name of entities

Testing version 0.9.19 and it makes sense to use the charger name in the friendly name as you now do.
However there is a minor annoyance where you seem to convert the charger name to lowercase.
In example my charger is named "Easee Home 01".
The device in HA is named correctly "Easee Home 01".
But the entities in HA is named "Easee home 01*", in example "Easee home 01 status". (Note the lowercase "h")

Too many requests

How often do the integration call the Easee API?
Easee blocked my IP-address because it was making too many requests...

Add sensor for voltage from charger

The charger can report voltage during charging wich can be useful in understanding the health of the installation. More specifically, I had problem with the car refusing to charge properly and it seems as the low voltage ( 190V and below at some specific conditions) might have been the cause. Beeing able to monitor the phase voltages at the charging point would be valueable.

In the Easee API the voltages seems to be reported in /api/chargers/{id}/state with the following response

{
"smartCharging": true,
"cableLocked": true,
"chargerOpMode": 1,
"totalPower": 0,
"sessionEnergy": 0,
"energyPerHour": 0,
"wiFiRSSI": 0,
"cellRSSI": 0,
"localRSSI": 0,
"outputPhase": 0,
"dynamicCircuitCurrentP1": 0,
"dynamicCircuitCurrentP2": 0,
"dynamicCircuitCurrentP3": 0,
"latestPulse": "2021-02-09T09:44:41.971Z",
"chargerFirmware": 0,
"latestFirmware": 0,
"voltage": 0,
"chargerRAT": 0,
"lockCablePermanently": true,
"inCurrentT2": 0,
"inCurrentT3": 0,
"inCurrentT4": 0,
"inCurrentT5": 0,
"outputCurrent": 0,
"isOnline": true,
"inVoltageT1T2": 0,
"inVoltageT1T3": 0,
"inVoltageT1T4": 0,
"inVoltageT1T5": 0,
"inVoltageT2T3": 0,
"inVoltageT2T4": 0,
"inVoltageT2T5": 0,
"inVoltageT3T4": 0,
"inVoltageT3T5": 0,
"inVoltageT4T5": 0,
"ledMode": 0,
"cableRating": 0,
"dynamicChargerCurrent": 0,
"circuitTotalAllocatedPhaseConductorCurrentL1": 0,
"circuitTotalAllocatedPhaseConductorCurrentL2": 0,
"circuitTotalAllocatedPhaseConductorCurrentL3": 0,
"circuitTotalPhaseConductorCurrentL1": 0,
"circuitTotalPhaseConductorCurrentL2": 0,
"circuitTotalPhaseConductorCurrentL3": 0,
"reasonForNoCurrent": 0,
"wiFiAPEnabled": true,
"lifetimeEnergy": 0,
"offlineMaxCircuitCurrentP1": 0,
"offlineMaxCircuitCurrentP2": 0,
"offlineMaxCircuitCurrentP3": 0
}

Suggestion is to either implement support for the inVoltageTxTy or to implement all parameters above.

Minor name change suggestion

sensor.easee_[...]_in_current should be named sensor.easee_[...]_input_current to match with sensor.easee_[...]_output_current.

Integration fails to start on latest HA core-2021.8.0b4

The Easee integration fails to start on the latest beta. It fails with the following message:

Logger: homeassistant.setup

Source: setup.py:173
First occurred: 9:48:42 (1 occurrences)
Last logged: 9:48:42

Setup failed for easee: Unable to import component: cannot import name >'ELECTRICAL_CURRENT_AMPERE' from 'homeassistant.const' >(/usr/src/homeassistant/homeassistant/const.py)

Please let me know if you need more logs or similar.

Startup easee component error

This error message appeared 12 times after startup of HA.
Version 0.9.14
The car is not plugged in.

Logger: homeassistant.helpers.entity
Source: custom_components/easee/sensor.py:152
First occurred: 19:49:53 (12 occurrences)
Last logged: 19:51:23

Update for sensor.easee_charger_eh266759_consumption_days_1 fails
Update for sensor.easee_charger_eh266759_consumption_days_30 fails
aiohttp.client_exceptions.ClientResponseError: 503, message='', url=URL('https://api.easee.cloud/api/sessions/charger/EH266759/total/2020-09-18T19:49:53.632696/2020-09-19T19:49:53.632696')

The above exception was the direct cause of the following exception:

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 469, in async_device_update
await self.async_update() # type: ignore
File "/config/custom_components/easee/sensor.py", line 152, in async_update
self._state = await self.charger.get_consumption_between_dates(
File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 90, in get_consumption_between_dates
await self.easee.get(f"/api/sessions/charger/{self.id}/total/{from_date.isoformat()}/{to_date.isoformat()}")
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get
await self.check_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status
await raise_for_status(response)
File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 43, in raise_for_status
raise Exception(data) from e
Exception:

<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

AssertionError

I'm getting this issue, every time, on HASS restart:

2021-02-16 11:35:40 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/easee/controller.py", line 376, in refresh_sites_state
    self.update_ha_state()
  File "/home/homeassistant/.homeassistant/custom_components/easee/controller.py", line 284, in update_ha_state
    entity.async_schedule_update_ha_state(True)
  File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 438, in async_schedule_update_ha_state
    assert self.hass is not None
AssertionError

I'm running the latest version via HACS (on Raspberry PI OS).

Let me know if you need any additional information. Thanks in advance.

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.