GithubHelp home page GithubHelp logo

Server request problem about ha-myenergi HOT 4 CLOSED

cjne avatar cjne commented on June 13, 2024
Server request problem

from ha-myenergi.

Comments (4)

G6EJD avatar G6EJD commented on June 13, 2024

Highly unlikely to be a error of this integration. What’s happened is your server connection has changed or if you have had the service running for some time you now need an API key, do you use the Hub Serial number and API key or you can use any MyEnergi device serial number plus API key. They (ME) have been migrating customers to new servers recently

from ha-myenergi.

Ulrar avatar Ulrar commented on June 13, 2024

I feel like I've done that, but I'm not sure.
How do you go about adding that in ? Doesn't seem to be an option in the integration configuration.

from ha-myenergi.

Ulrar avatar Ulrar commented on June 13, 2024

Tried removing the integration and adding it again, and it just failed with a fresh API key.

image

This time it logs stuff, however :

Logger: aiohttp.server
Source: custom_components/myenergi/config_flow.py:84
Integration: myenergi ([documentation](https://github.com/cjne/ha-myenergi), [issues](https://github.com/cjne/ha-myenergi/issues))
First occurred: 2:56:01 PM (5 occurrences)
Last logged: 2:56:29 PM
Error handling request

Traceback (most recent call last):
  File "/config/custom_components/myenergi/config_flow.py", line 74, in _test_credentials
    await client.refresh()
  File "/usr/local/lib/python3.10/site-packages/pymyenergi/client.py", line 200, in refresh
    data = await self.fetch_data()
  File "/usr/local/lib/python3.10/site-packages/pymyenergi/client.py", line 253, in fetch_data
    keys = await self._connection.get("/cgi-get-app-key-")
  File "/usr/local/lib/python3.10/site-packages/pymyenergi/connection.py", line 85, in get
    return await self.send("GET", url)
  File "/usr/local/lib/python3.10/site-packages/pymyenergi/connection.py", line 65, in send
    theUrl = self.base_url + url
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 178, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/myenergi/config_flow.py", line 38, in async_step_user
    err, client = await self._test_credentials(
  File "/config/custom_components/myenergi/config_flow.py", line 84, in _test_credentials
    traceback.format_exception(
TypeError: format_exception() got an unexpected keyword argument 'etype'

from ha-myenergi.

Ulrar avatar Ulrar commented on June 13, 2024

Aha, figured it out, disabling ad blocking in pi hole for the setup seems to solve it.
I don't know what domain is getting blocked and by what list, but something is so if anyone else gets here with the same error there you go.
I've re-enabled it afterwards and I'm not seeing anything get blocked so presumably it's just during the setup, but we'll see

from ha-myenergi.

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.