Giter Site home page Giter Site logo

corvis / homeassistant_prana Goto Github PK

View Code? Open in Web Editor NEW
21.0 6.0 8.0 58 KB

HomeAssistant integration with Prana recuperators

License: GNU General Public License v3.0

Makefile 3.39% Python 96.61%
homeassistant homeassistant-components homeautomation homeassistant-custom-component prana-recuperators

homeassistant_prana's People

Contributors

corvis avatar

Stargazers

 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

homeassistant_prana's Issues

Automation Question

Thank you for this nice integration!

I am tiring to do an automation to set a certain speed when the kitchen extractor is on.
However I can't seem to find the right Action
I have tried Cal service: Set Fan speed but it doesn't do anything.
Same for set present-mode, set speed_change.

Can you put me in the right direction? Should I use a different method?

Can't read data from prana recuperator due to connection failing after 5 attempts

Hi.

First of all, thank you for the great work on this integration. I never thought I'd see my recuperator integrated with HA and I really appreciate the work you've done, both on the integration and the awesome prana_rc library.

I set up this integration and prana_rc server on my RPi (both running on the same HA OS) and when I first start the prana_rc docker container, everything works well.

But after some time, I always get the error from the title after which my recuperator disconnects from HA and becomes unavailable.

This is my setup:

  • HA OS running on RPi4, version 5.12; HA Core version is core-2021.4.6; Supervisor version is supervisor-2021.04.3
  • Prana RC server running on the same machine, deployed using Portainer (config from the prana_rc repository is used -- /run/dbus/system_bus_socket, hassio network, restart unless stopped policy, with default 8881 port mapping), version corvis/prana-rc:0.4.4 of the image
  • Integration installed using HACS as custom repository
  • RPi is ~6m away from the recuperator, in the same room

I can ping the prana_rc server from my laptop terminal, which means the server itself is running and it does show proper connection to the recuperator:

curl -X POST -H "Accept: application/json" http://homeassistant.local:8881/ -d '{ "jsonrpc": "2.0", "id": 1, "method": "prana.healthcheck" }'
{"result": {"version": "0.4.4", "timestamp": "2021-05-06T19:21:15.699394", "current_connections": ["XX:XX:XX:XX:XX:XX"]}, "id": 1, "jsonrpc": "2.0"}

But this is the log from HA, showing connection errors. I enabled the debug log and there is nothing in addition to these error snippets, which occur 3-4 times in the log.

2021-05-06 21:22:46 WARNING (MainThread) [custom_components.prana.fan] Can't read data from prana recuperator Prana (prana_XX_XX_XX_XX_XX_XX): RPC Invocation error -32000: Server error. Cause: RuntimeError: Connection to device XX:XX:XX:XX:XX:XX failed after 5 attempts
2021-05-06 21:22:46 ERROR (MainThread) [custom_components.prana.fan] Unexpected error fetching prana_XX_XX_XX_XX_XX_XX data: RPC Invocation error -32000: Server error. Cause: RuntimeError: Connection to device XX:XX:XX:XX:XX:XX failed after 5 attempts
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in _async_update_data
return await self.update_method()
File "/config/custom_components/prana/fan.py", line 67, in async_get_state
raise e
File "/config/custom_components/prana/fan.py", line 62, in async_get_state
return await prana_client.get_state(
File "/usr/local/lib/python3.8/site-packages/prana_rc/contrib/client/common.py", line 45, in get_state
await self.async_invoke(
File "/usr/local/lib/python3.8/site-packages/sizzlews/client/common.py", line 179, in async_invoke
return await self._invoke_request(rq, expected_response_type)
File "/usr/local/lib/python3.8/site-packages/sizzlews/client/aiohttp.py", line 47, in _invoke_request
return self._parse_rpc_response(await response.json(), expected_response_type)
File "/usr/local/lib/python3.8/site-packages/sizzlews/client/common.py", line 119, in _parse_rpc_response
raise RPCInvocationError.from_rpc_dict(response[RESPONSE_FIELD_EROR])
sizzlews.client.common.RPCInvocationError: RPC Invocation error -32000: Server error. Cause: RuntimeError: Connection to device XX:XX:XX:XX:XX:XX failed after 5 attempts
2021-05-06 21:22:46 DEBUG (MainThread) [custom_components.prana.fan] Finished fetching prana_XX_XX_XX_XX_XX_XX data in 2.729 seconds

This is the screenshot of how it looks like from the UI (all entities are disabled and unavailable).
image

If there is anything I can do more to help out in in resolving this issue, I'll gladly contribute.

New HA can't create entities

Hi,
I use the latest (2023.8) HA in Docker.

So far it was good, but now the integration is broken. The RC server works perfectly, I can see it from cli.

curl -X POST -H "Accept: application/json" http://192.168.0.65:8881/ -d '{ "jsonrpc": "2.0", "id": 1 , "method": "prana.get_state", "params": {"address": "00:A0:50:D2:F6:AF"} }'
{"result": {"speed_locked": 3, "speed_in": 3, "speed_out": 3, "brightness": 6, " night_mode": false, "auto_mode": false, "flows_locked": true, "is_on": false, "m ini_heating_enabled": false, "winter_mode_enabled": false, "is_input_fan_on": fa lse, "is_output_fan_on": false, "sensors": null, "timestamp": "2023-08-16T14:05: 28.192269"}, "id": 1, "jsonrpc": "2.0"}

I deleted the integration and then added it again by address because it doesn't find it. The addition is successful, but the entities are not created.

Its operation will be missed, several automations are connected to it. Could you look into why they are not created?

Thanks!

Cyber

INTEGRATION ERROR

Hi.

When i add integration, in the log i find this:

Error occurred loading configuration flow for integration prana: cannot import name 'IDX_IDENTIFIERS' from 'homeassistant.helpers.device_registry' (/usr/src/homeassistant/homeassistant/helpers/device_registry.py)

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.