Git Product home page Git Product logo

Comments (14)

crobbins215d avatar crobbins215d commented on September 23, 2024

I'm on
homeassistant 2022.12.6
Supervisor 2022.11.2
Operating System 9.4

from home-assistant-hypervolt-charger.

joshcliffejones avatar joshcliffejones commented on September 23, 2024

I have the same issue having just added the integration last night only for it to succeed in adding to HA, but pulling through no devices or entities :(

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

I'm not sure what's happening here. Maybe the start up occurs in a different order, or some step is missing from what I expect.
Thanks for the logs - that's helpful. Would you be able to capture again with:

  1. The 1.0.2 release as this adds some more logging, and
  2. Debug log level enabled for the integration. So this adding to your configuration.yaml:
logger:
  default: warning
  logs:
    custom_components.hypervolt_charger: debug

Thanks!

from home-assistant-hypervolt-charger.

joshcliffejones avatar joshcliffejones commented on September 23, 2024

Many thanks for your help @gndean

Ive updated and dumped out a snippet of the debug log!

2022-12-17 19:22:18.292 WARNING (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Update_state_from_schedule, unauthorised
2022-12-17 19:22:20.173 ERROR (MainThread) [homeassistant.components.switch] Error adding entities for domain switch with platform hypervolt_charger
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
if entity.unique_id is not None:
File "/config/custom_components/hypervolt_charger/switch.py", line 44, in unique_id
return super().unique_id + "_charging"
File "/config/custom_components/hypervolt_charger/hypervolt_entity.py", line 33, in unique_id
return self.coordinator.data.charger_id
AttributeError: 'NoneType' object has no attribute 'charger_id'
2022-12-17 19:22:20.192 ERROR (MainThread) [homeassistant.components.switch] Error while setting up hypervolt_charger platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 289, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
if entity.unique_id is not None:
File "/config/custom_components/hypervolt_charger/switch.py", line 44, in unique_id
return super().unique_id + "_charging"
File "/config/custom_components/hypervolt_charger/hypervolt_entity.py", line 33, in unique_id
return self.coordinator.data.charger_id
AttributeError: 'NoneType' object has no attribute 'charger_id'
2022-12-17 19:22:20.316 ERROR (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] Notify_on_hypervolt_session_in_progress_push error: 'NoneType' object has no attribute 'is_charging'
2022-12-17 19:22:20.326 ERROR (MainThread) [custom_components.hypervolt_charger.hypervolt_api_client] notify_on_hypervolt_sync_push error: 'NoneType' object has no attribute 'led_brightness'
2022-12-17 19:22:20.331 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up hypervolt_charger platform for sensor
Traceback (most recent call last):
File "/config/custom_components/hypervolt_charger/hypervolt_update_coordinator.py", line 78, in _update_with_fallback
state = await self.api.update_state_from_schedule(
File "/config/custom_components/hypervolt_charger/hypervolt_api_client.py", line 139, in update_state_from_schedule
state.activation_mode = HypervoltActivationMode.PLUG_AND_CHARGE
AttributeError: 'NoneType' object has no attribute 'activation_mode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/hypervolt_charger/hypervolt_api_client.py", line 49, in login
async with session.get("https://api.hypervolt.co.uk/login-url") as response:
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 545, in connect
raise ClientConnectionError("Connector is closed.")
aiohttp.client_exceptions.ClientConnectionError: Connector is closed.

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

Traceback (most recent call last):
File "/config/custom_components/hypervolt_charger/hypervolt_update_coordinator.py", line 71, in _async_update_data
return await self._update_with_fallback()
File "/config/custom_components/hypervolt_charger/hypervolt_update_coordinator.py", line 95, in _update_with_fallback
await self.api.login(self.api_session)
File "/config/custom_components/hypervolt_charger/hypervolt_api_client.py", line 103, in login
raise CannotConnect from exc
custom_components.hypervolt_charger.hypervolt_api_client.CannotConnect

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

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 "/config/custom_components/hypervolt_charger/hypervolt_update_coordinator.py", line 73, in _async_update_data
raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/hypervolt_charger/sensor.py", line 38, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 197, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Thanks @joshcliffejones, that looks like the same type of error as @crobbins215d
Any chance of repeating after having changed the logger level for the integration using the snippet in #6 (comment)?
There should be more lines logged once the logger level is changed.

from home-assistant-hypervolt-charger.

crobbins215 avatar crobbins215 commented on September 23, 2024

Updated.

Added
logger:
default: warning
logs:
custom_components.hypervolt_charger: debug

Restarted, cleared log. Reloaded hypervolt

Logs attached
home-assistant_2022-12-18T16-56-18.833Z.log

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Thanks - investigating 👀

from home-assistant-hypervolt-charger.

joshcliffejones avatar joshcliffejones commented on September 23, 2024

Thanks @joshcliffejones, that looks like the same type of error as @crobbins215d Any chance of repeating after having changed the logger level for the integration using the snippet in #6 (comment)? There should be more lines logged once the logger level is changed.

Many thanks! I added the logger level entry and have attached the logs

home-assistant_hypervolt_charger_2022-12-18T22-41-09.232Z.log

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

OK, I've created V1.0.3 with some slight changes to the initialisation logic and some extra debug logging. Give it a go and if still no joy, can you attach some logs again. Thanks!

from home-assistant-hypervolt-charger.

crobbins215 avatar crobbins215 commented on September 23, 2024

Amazing work @gndean , thats got mine working, thank you for sorting

image

Side note and unrelated but the title doesn't have a logo icon, that's just a FYI, isn't an issue
image

Thank you again!!!

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Great news 🎉 Thanks for the feedback.
An icon should be arriving soon. For that, I've had to submit images to this global repository and that's only just accepted today, so hopefully HACS / HA should update soon: https://github.com/home-assistant/brands

from home-assistant-hypervolt-charger.

crobbins215 avatar crobbins215 commented on September 23, 2024

🎉

from home-assistant-hypervolt-charger.

joshcliffejones avatar joshcliffejones commented on September 23, 2024

OK, I've created V1.0.3 with some slight changes to the initialisation logic and some extra debug logging. Give it a go and if still no joy, can you attach some logs again. Thanks!

I can confirm mine is now working too! 👍 Superb work @gndean and a swift fix at that!

from home-assistant-hypervolt-charger.

gndean avatar gndean commented on September 23, 2024

Great 🎉 Thanks for confirming

from home-assistant-hypervolt-charger.

Related Issues (20)

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.