Giter Site home page Giter Site logo

hass-sunweg's Introduction

This custom integration won't be supported anymore. The integration is now inside homeassistant 2024.01.1

SunWEG

GitHub Release GitHub Activity License

Black

hacs Project Maintenance

This component will set up the following platforms.

Platform Description
sensor Show info from SunWEG API.

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called sunweg.
  4. Download all the files from the custom_components/sunweg/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "SunWEG"

Configuration is done in the UI

  1. Type your SunWEG.net username and password.
  2. If you have multiple plants, select the one you want to add.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

Code template was mainly taken from @Ludeeus's integration_blueprint template


hass-sunweg's People

Contributors

rokam avatar dependabot[bot] avatar

Watchers

 avatar

hass-sunweg's Issues

Unknow Error

Trying to add the integration to Home Assistant 2023.12.3 and getting Unknow Error, the log says that user or passowrd wrong, but it´s ok.

Logs:

Dec 20 16:05:59 homeassistant homeassistant[688]: #033[31m2023-12-20 16:05:59.833 ERROR (MainThread) [aiohttp.server] Error handling request Dec 20 16:05:59 homeassistant homeassistant[688]: Traceback (most recent call last): Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request Dec 20 16:05:59 homeassistant homeassistant[688]: resp = await request_handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle Dec 20 16:05:59 homeassistant homeassistant[688]: resp = await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 233, in auth_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: return await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware Dec 20 16:05:59 homeassistant homeassistant[688]: response = await handler(request) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle Dec 20 16:05:59 homeassistant homeassistant[688]: result = await handler(request, **request.match_info) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin Dec 20 16:05:59 homeassistant homeassistant[688]: return await func(self, request, *args, **kwargs) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post Dec 20 16:05:59 homeassistant homeassistant[688]: return await super().post(request, flow_id) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper Dec 20 16:05:59 homeassistant homeassistant[688]: result = await method(view, request, data, *args, **kwargs) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post Dec 20 16:05:59 homeassistant homeassistant[688]: result = await self._flow_mgr.async_configure(flow_id, data) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 293, in async_configure Dec 20 16:05:59 homeassistant homeassistant[688]: result = await self._async_handle_step( Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 389, in _async_handle_step Dec 20 16:05:59 homeassistant homeassistant[688]: result: FlowResult = await getattr(flow, method)(user_input) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/config/custom_components/sunweg/config_flow.py", line 44, in async_step_user Dec 20 16:05:59 homeassistant homeassistant[688]: login_response = await self.hass.async_add_executor_job(self.api.authenticate) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run Dec 20 16:05:59 homeassistant homeassistant[688]: result = self.fn(*self.args, **self.kwargs) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/sunweg/api.py", line 63, in authenticate Dec 20 16:05:59 homeassistant homeassistant[688]: result = self._post(SUNWEG_LOGIN_PATH, user_data) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/sunweg/api.py", line 268, in _post Dec 20 16:05:59 homeassistant homeassistant[688]: result = self._treat_response(res) Dec 20 16:05:59 homeassistant homeassistant[688]: ^^^^^^^^^^^^^^^^^^^^^^^^^ Dec 20 16:05:59 homeassistant homeassistant[688]: File "/usr/local/lib/python3.11/site-packages/sunweg/api.py", line 279, in _treat_response Dec 20 16:05:59 homeassistant homeassistant[688]: raise SunWegApiError(result["message"]) Dec 20 16:05:59 homeassistant homeassistant[688]: sunweg.api.SunWegApiError: Usuário ou senha inválidos!#033[0m

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.