Coder Social home page Coder Social logo

Comments (27)

Taraman17 avatar Taraman17 commented on July 2, 2024 1

Ok, succeded in running the commands, but when I start Homeassistant in the DevContainer, pymee gets overwritten with the original version.

Edit: found it - HA has to be run with option "skip pip"

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024 1

Thx, should be fixed

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

With a line of log code added, I could confirm that the node is found, but not added in the UI:

2023-02-16 08:44:54.321 INFO (MainThread) [custom_components.homee.config_flow] got access token for homee
2023-02-16 08:44:54.322 INFO (MainThread) [custom_components.homee.config_flow] homee task created
2023-02-16 08:44:54.465 INFO (MainThread) [custom_components.homee.config_flow] homee connected
2023-02-16 08:44:54.465 INFO (MainThread) [custom_components.homee.config_flow] homee disconnecting
2023-02-16 08:44:54.501 INFO (MainThread) [custom_components.homee.config_flow] homee config successfully tested
2023-02-16 08:44:54.502 INFO (MainThread) [custom_components.homee.config_flow] created new homee entry with ID XXXXXXXXX
2023-02-16 08:44:57.963 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.963 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor
2023-02-16 08:44:57.963 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.964 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor
2023-02-16 08:44:57.964 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.964 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor
2023-02-16 08:44:57.965 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.965 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor
2023-02-16 08:44:57.965 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.966 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor
2023-02-16 08:44:57.966 INFO (MainThread) [custom_components.homee.helpers] node foundGaragentor
2023-02-16 08:44:57.966 INFO (MainThread) [custom_components.homee.helpers] node foundHoftor

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

Today I decided to have a closer look into the code and found the causes for my problem.

The yard gate is controlled by a radio-relay which is of type IMPULSE_RELAY (Protocol 43) which is not yet configured as switch. Also it does not have the Attribute Type ON_OFF (1), but WatchdogOnOff (385) 1.

At this point my efforts stalled, beacuse I could use some help setting up the Devcontainer. I have the ha-core running fine, but don't know how to properly integrate this component for development. So far I just copied the files manually into the HA devcontainer, but now I don't know where the pymee files reside, which need to be changed also.

If I could get some hints on this, I should be able to add proper support for my two devices.

from hacs-homee.

Stklingner avatar Stklingner commented on July 2, 2024

@Taraman17 if you copy the repo files into vscode under custom_components/hacs-homee and then rebuild the container it should work IIRC

from hacs-homee.

Stklingner avatar Stklingner commented on July 2, 2024

Let me know how you get on - there are a few things I'd like to have a look at (edit: when I get the time) and I can add this to the list

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

@Taraman17 if you copy the repo files into vscode under custom_components/hacs-homee and then rebuild the container it should work IIRC

So that is copy the pymee files to a directory "vscode" in the custom_components/hacs-homee dir, or do you mean I copy them using vscode to the hacs-homee directory?

from hacs-homee.

Stklingner avatar Stklingner commented on July 2, 2024

So that is copy the pymee files to a directory "vscode" in the custom_components/hacs-homee dir, or do you mean I copy them using vscode to the hacs-homee directory?

Sorry, half asleep today - copy the "homee" folder in "custom_components"
from hacs-homee into a folder called "custom_components" in the core repository using vscode (you can just drag the folder from your explorer/finder into vscode's file list on the sidebar), then rebuild the container and it will install the dependencies.

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

I got so far, but now I need to change files in the pymee library.
How do I achieve that?

from hacs-homee.

Stklingner avatar Stklingner commented on July 2, 2024

SW> I got so far, but now I need to change files in the pymee library.

How do I achieve that?

Nice job so far! So now we need to take a modified version of pymee that you’re going to be playing around with:

  1. Fork freshlybrewed’s pymee repo to your account
  2. open the terminal in your dev environment in vscode (down the bottom)
  3. Now you should be able to do pip uninstall pymee and then pip install git+https://"your repo"@"whichever branch you want"
  4. Modify your pymee code in another window, commit back to GitHub then reinstall as per 3 to try out (if in doubt, rebuild the container)
  5. Rinse and repeat

You used to be able to change the manifest requirement to a GitHub reference and use the “install all dependencies” command in the dev environment but this broke a while back…

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

Great, thank you. Try that as soon as I have time.

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

First progress is made - I can discover the devices as switches and have the position sensor for the garage door.
When I try to use the switches however I get errors.

Edit: I found out, that I looked for the wrong Switch-Attribute. That fixed, I still get the error:

2023-02-19 14:54:00.880 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall homee.set_value (c:01GSN2NRMX0B5EW5HSJCKA5HWS): node=3, attribute=22, value=1>
Traceback (most recent call last):
  File "/workspaces/ha-core/homeassistant/core.py", line 1749, in catch_exceptions
    await coro_or_task
  File "/workspaces/ha-core/homeassistant/core.py", line 1774, in _execute_service
    await self._hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/workspaces/ha-core/config/custom_components/homee/__init__.py", line 67, in handle_set_value
    hass.async_create_task(homee.set_value(node, attribute, value))
  File "/workspaces/ha-core/homeassistant/core.py", line 520, in async_create_task
    task = self.loop.create_task(target)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 438, in create_task
    task = tasks.Task(coro, loop=self, name=name)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 755, in call_soon
    self._check_thread()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 792, in _check_thread
    raise RuntimeError(
RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one
2023-02-19 14:54:00.882 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!:   File "/home/vscode/.vscode-server/extensions/ms-python.python-2023.2.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 1118, in __call__
    ret = self.original_func(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/workspaces/ha-core/config/custom_components/homee/__init__.py", line 67, in handle_set_value
    hass.async_create_task(homee.set_value(node, attribute, value))
  File "/workspaces/ha-core/homeassistant/core.py", line 520, in async_create_task
    task = self.loop.create_task(target)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 438, in create_task
    task = tasks.Task(coro, loop=self, name=name)

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

Research showed that this might be related to the debugging environment, so today as the updated pymee lib was available I tested on my production HA and there it works. ;-)

from hacs-homee.

Pr0mises avatar Pr0mises commented on July 2, 2024

@Taraman17 are you also able to control your Garagentor with hass? I only get the current status (most of the time i need to update the device status in the homee app to have the current status in hass) and a position slider which does nothing.

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

@Pr0mises after the update I get the Garagedoor as a switch and a sensor.
Before there was the slider which did not work, since the opener only accepts impulses to start/stop and not position commands.

Yesterday on testing it worked well - this morning it doesn't. Need to find out why.

from hacs-homee.

Pr0mises avatar Pr0mises commented on July 2, 2024

@Taraman17 did you mean it reverted back to the slider?
The update didn't do anything to my garagedoor. I'll try to purge homee from hass and connect it again if it changed for you

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

I noticed that the slider is still present.
I need to also change cover.py so that it does not reacts on impulse operators

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

@Stklingner follow up question:
Is there a way to get the logs from the pymee library out of the DevContainer?
I saw it logs quite a lot of interesting stuff.

from hacs-homee.

Stklingner avatar Stklingner commented on July 2, 2024

@Taraman17 As you've surmised, they should be somewhere in the container but I'm not sure where to begin - the structure is explorable via the vscode terminal so should be findable!

I only used python scripts when dealing with pymee; I find that there's so much going on in HA it's difficult to really see what it's doing...

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

@Stklingner Thx, I figured out, that if I put logging to debug, I see it in the HA Logs via the UI.

from hacs-homee.

serdar-22 avatar serdar-22 commented on July 2, 2024

hello

since the update i have the issue, that only sometimes can open the garage door.

i have to click at least 5-6 times, that sometimes garage door will open.
i dont found any errors in the log.

thank you very much for your support

from hacs-homee.

serdar-22 avatar serdar-22 commented on July 2, 2024

sorry after restart its ok 👍🏾

from hacs-homee.

Pr0mises avatar Pr0mises commented on July 2, 2024

v2.3 is working for me. Good job !

from hacs-homee.

spainpiio avatar spainpiio commented on July 2, 2024

All of a sudden, all of my dimmer switches have disappeared and are shown as unavailable.
The sensors of these dimmers, however, are available.
They are Fibaro & Qubino dimmers that work directly in Homee.
I have already deleted the integration and reinstalled, restarted....
Does anyone have any ideas?

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

Can you set the logging to info and post the logs from HACS-homee?

from hacs-homee.

spainpiio avatar spainpiio commented on July 2, 2024

Logger: homeassistant.components.light
Source: custom_components/homee/light.py:42
Integration: Licht (documentation, issues)
First occurred: 08:52:43 (1 occurrences)
Last logged: 08:52:43

Error while setting up homee platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/homee/light.py", line 107, in async_setup_entry
devices.append(HomeeLight(node, light_set, index, config_entry))
File "/config/custom_components/homee/light.py", line 153, in init
self._supported_features = get_light_features(self)
File "/config/custom_components/homee/light.py", line 42, in get_light_features
features |= ColorMode.BRIGHTNESS #
TypeError: unsupported operand type(s) for |=: 'int' and 'ColorMode'

and

Logger: homeassistant.helpers.service
Source: helpers/service.py:645
First occurred: 08:52:44 (4 occurrences)
Last logged: 09:42:59

Unable to find referenced entities light.pb_oficina_luz or it is/they are currently not available

from hacs-homee.

Taraman17 avatar Taraman17 commented on July 2, 2024

Fixed with #32

from hacs-homee.

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.