Giter Club home page Giter Club logo

Comments (28)

connor9 avatar connor9 commented on June 1, 2024

I should have added that the integration in the fork is in the branch https://github.com/connor9/wiserHomeAssistantPlatform/tree/integrate-alternate-wiser-api

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

hey there, thanks for this. Let me review your stuff over the weekend and lets see where we go :-)

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

Hey Connor , whilst it pains me to throw away some of my own code - IM IN!

I checked out your code and yeah nice work, also looked at how you retrofitted your code with my HA platform and quite pleased on how easy it was to replace my API with your one..

Im happy to pull the fork, test it, and extend it accordingly.

How far are you with publishing to pypi? thats a requiremnet for HA to accept a new component.

Angelo

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

ps sorry for the delay, redecorating the house takes time..... too much time

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

Wow, it is really nice to see the projects merging. I hope we will get some good results soon.
@asantaga do you think it will be possible to merge "boost" functionality easily?

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

yeah boost should be easy , i just need some time to pull your stuff into mainline,
is your branch fully working?

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

Hey again. Like your redecorating, in a completely unrelated coincidence (I hope!), I've had a boiler failure up until yesterday. That took all the attention to fix and is now sorted.

I'll be pushing things onto pypi tomorrow now that I'm past that part of things. It'll require a little bit of testing to make sure it's stable with the main codebase but boost is working. The main tests needed are that it works stably with the update pattern of the home assistant updates. I'll get things posted to pypi tomorrow with some extra documentation as well.

Here's hoping the boiler failure wasn't caused by the new thermostat. It is an old boiler so probably not!

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

I've got the initial package on Pypi now: https://pypi.org/project/python-draytonwiser-api/
This matches the latest master commit of https://github.com/connor9/python-draytonwiser-api

I've updated my branch on the fork of wiserHomeAssistantPlatform to pull from the Pypi repository: (https://github.com/connor9/wiserHomeAssistantPlatform/tree/integrate-alternate-wiser-api)

I've got that version working with a straight pull from the git repository and adding the appropriate home assistant configuration block.

I'm currently away from home at the moment so I don't have direct access to the Drayton Wiser controller. I've done one test remotely with the real controller and it was working but will definitely need some more testing before it can be merged into the main branch. It likely has some bugs as the Drayon API will expose random JSON keys at different times depending on what mode the controller is in.

Here's the example output from the test:
ha_test
I've tested this on a brand new fresh docker version of HA.

As I'm working remotely until next week I've created a sample controller with Flash to output JSON files as real HTTP calls - https://github.com/connor9/draytonwiser-mock-server

I've also tested this with a fresh docker container and it's working fine for development. I.e. I can put in 192.168.0.18:5005 in place of the Hub IP and the flask API server returns the calls as if it's the controller. At the moment it doesn't change the values but I'm planning to add that so that I can make the Python API library more robust and easier to test with home assistant without hammering the real Wiser controller.

The next steps will be to test a different controller with this branch and catch and obvious mistakes. Then it can be updated quickly to handle the existing like for like replacement. We should be able to finish that next week. I'll be doing more testing this week to try to iron out any gotchas.

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

Hi guys,

If it would be helpful I can do some testing on my Drayton over the next few days.

I will do the install from the updated branch in the fork and would keep you updated with my findings.

Thanks.

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

@mrvladis It would help me if you could test from https://github.com/connor9/wiserHomeAssistantPlatform/tree/integrate-alternate-wiser-api - The setup instructions are identical to the main branch (other than after checking out from git changing the branch to 'integrate-alternative-wiser-api' before copying. If that turns out to be a hassle I can merge it into my main branch without affecting the root project).

If there are any obvious bugs they should should up in the Home Assistant log. These will be things like it not finding the pypi package, or it messing up a JSON key read, or any number of smaller problems. These are the ones I'll need to sort out before it can be merged into the main branch. Thanks!

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

@connor9
Tried it on latest raspberryPI3 container installation.
Got the following:
homeassistant_1 | 2019-02-05 22:37:00 ERROR (SyncWorker_18) [homeassistant.loader] Error loading custom_components.wiser. Make sure all dependencies are installed homeassistant_1 | Traceback (most recent call last): homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 117, in _load_file homeassistant_1 | module = importlib.import_module(path) homeassistant_1 | File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module homeassistant_1 | return _bootstrap._gcd_import(name[level:], package, level) homeassistant_1 | File "<frozen importlib._bootstrap>", line 994, in _gcd_import homeassistant_1 | File "<frozen importlib._bootstrap>", line 971, in _find_and_load homeassistant_1 | File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked homeassistant_1 | File "<frozen importlib._bootstrap>", line 665, in _load_unlocked homeassistant_1 | File "<frozen importlib._bootstrap_external>", line 678, in exec_module homeassistant_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed homeassistant_1 | File "/config/custom_components/wiser.py", line 25, in <module> homeassistant_1 | from draytonwiser import Manager homeassistant_1 | ModuleNotFoundError: No module named 'draytonwiser' homeassistant_1 | 2019-02-05 22:37:00 ERROR (SyncWorker_18) [homeassistant.loader] Unable to find component wiser homeassistant_1 | 2019-02-05 22:37:05 INFO (MainThread) [homeassistant.components.http.view] Serving /api/config/core/check_config to 127.0.0.1 (auth: True) homeassistant_1 | 2019-02-05 22:37:05 ERROR (SyncWorker_19) [homeassistant.loader] Error loading custom_components.wiser. Make sure all dependencies are installed homeassistant_1 | Traceback (most recent call last): homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 117, in _load_file homeassistant_1 | module = importlib.import_module(path) homeassistant_1 | File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module homeassistant_1 | return _bootstrap._gcd_import(name[level:], package, level) homeassistant_1 | File "<frozen importlib._bootstrap>", line 994, in _gcd_import homeassistant_1 | File "<frozen importlib._bootstrap>", line 971, in _find_and_load homeassistant_1 | File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked homeassistant_1 | File "<frozen importlib._bootstrap>", line 665, in _load_unlocked homeassistant_1 | File "<frozen importlib._bootstrap_external>", line 678, in exec_module homeassistant_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed homeassistant_1 | File "/config/custom_components/wiser.py", line 25, in <module> homeassistant_1 | from draytonwiser import Manager homeassistant_1 | ModuleNotFoundError: No module named 'draytonwiser' homeassistant_1 | 2019-02-05 22:37:05 ERROR (SyncWorker_19) [homeassistant.loader] Unable to find component wiser

I'll try to rebuild docker image to have this module installed.

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

Ok, Just decided to try to add the module temporary to the already running container.
It did started successfully.

Looking into the logs - I feel like HUB might be under the DoS attack :)
homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Room/13 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3915 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: RoomStat/None homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3916 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Room/14 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3917 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: RoomStat/None homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3918 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Room/15 homeassistant_1 | 2019-02-05 22:57:38 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3919 homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: RoomStat/1368 homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3920 homeassistant_1 | 2019-02-05 22:57:39 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:39 INFO (SyncWorker_8) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:39 INFO (SyncWorker_8) [draytonwiser.wiserapi] get_data - item: homeassistant_1 | 2019-02-05 22:57:39 INFO (SyncWorker_8) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:39 INFO (SyncWorker_15) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:39 INFO (SyncWorker_15) [draytonwiser.wiserapi] get_data - item: homeassistant_1 | 2019-02-05 22:57:40 INFO (SyncWorker_15) [draytonwiser.wiserapi] Querying Wiser Heat Hub homeassistant_1 | 2019-02-05 22:57:40 INFO (SyncWorker_8) [draytonwiser.wiserapi] get_data - query: 3922 homeassistant_1 | 2019-02-05 22:57:40 INFO (SyncWorker_8) [draytonwiser.wiserapi] get_data - cache: 818 homeassistant_1 | 2019-02-05 22:57:40 INFO (MainThread) [custom_components.climate.wiser] State requested for room 13 homeassistant_1 | 2019-02-05 22:57:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/ homeassistant_1 | 2019-02-05 22:57:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Room/13

When I have tried to update the temperature on Thermostat or iTRV I got the following:
`
omeassistant_1 | 2019-02-05 22:59:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 921
homeassistant_1 | 2019-02-05 22:59:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818
homeassistant_1 | 2019-02-05 22:59:38 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.wiser_controller_unknown (<class 'custom_components.sensor.wiser.WiserDevice'>) took 8.051 seconds. Please report platform to the developers at https://goo.gl/Nvioub
homeassistant_1 | 2019-02-05 22:59:38 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02

omeassistant_1 | 2019-02-05 23:02:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
homeassistant_1 | Traceback (most recent call last):
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 291, in _handle_service_platform_call
homeassistant_1 | await func(entity, data)
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/init.py", line 574, in async_service_temperature_set
homeassistant_1 | await entity.async_set_temperature(**kwargs)
homeassistant_1 | File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
homeassistant_1 | result = self.fn(*self.args, **self.kwargs)
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/init.py", line 384, in set_temperature
homeassistant_1 | raise NotImplementedError()
homeassistant_1 | NotImplementedError
homeassistant_1 | 2019-02-05 23:02:41 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02-05 23:02:41 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Device/53935

homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 2213
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818
homeassistant_1 | 2019-02-05 23:03:17 WARNING (MainThread) [homeassistant.components.sensor] Updating wiser sensor took longer than the scheduled update interval 0:00:30
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02-05 23:03:17 INFO (SyncWorker_17) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Device/1368
homeassistant_1 | 2019-02-05 23:03:17 INFO (SyncWorker_17) [draytonwiser.wiserapi] get_data - item:
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub
homeassistant_1 | 2019-02-05 23:03:17 INFO (SyncWorker_17) [draytonwiser.wiserapi] Querying Wiser Heat Hub
homeassistant_1 | 2019-02-05 23:03:17 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 2215
homeass

homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3137
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818
homeassistant_1 | 2019-02-05 23:05:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.wiser_first_floor_bedroom is taking over 10 seconds
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [custom_components.climate.wiser] State requested for room 9
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: Room/9
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - query: 3138
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - cache: 818
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - http://192.168.127.4/data/domain/
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] get_data - item: RoomStat/None
homeassistant_1 | 2019-02-05 23:05:40 INFO (MainThread) [draytonwiser.wiserapi] Querying Wiser Heat Hub
`

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

Hm,

After 10 minutes container hanged.... so even "docker kill" failed to stop it.

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

Oh what fun!! I'll look into this tomorrow. Lucky me working from home but also exams to take..

What wiser system do u have? @mrvladis?

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

@asantaga I have 3 channel Wiser controller:

  • Hot Water
  • Thermostat Kitchen (Just thermostat that control the circuit (3) for Kitchen )
  • Thermostat Living Room (Group of Thermostat + 3 iTRV circuit (1) )
  • iTRV Bedroom (circuit (1))
  • iTRV Guest room (circuit (1))
  • iTRV Wardrobe room (circuit (1))

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

@asantaga @mrvladis I've left some fairly verbose logging in the backend API but using INFO, ERROR etc to allow the backend to say what it's doing. The INFOs are there to see how much home assistant calls the backend which is the main get_data function.

The backend tries to keep a count of every time it's called for testing purposes. When the INFO line shows:
get_data - query: 2213
get_data - cache: 818
that's it showing how many times the get_data (which is the refresh of data) is called. The cache: 818 means that the call was within a 5 second follow-up window so it used the cached result of the previous call to the API. This is hard-coded at the moment in the backend in wiserapi.py. I've used this because the I've noticed that the Wiser Controller will hang every once in a while and the cache can be used for the brief periods when it doesn't return properly.

The 5 second cache window should also prevent the controller from being called too much but I'm not sure how frequently Home Assistant calls the update. Does it respect the configuration setting update_interval or is that being ignored?

I've got my home assistant running in a docker container as well so I'll try to replicate the hanging as well later tonight.

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

@connor9 thanks a lot for the update.
Few questions:
Would it be a separate "get_data - query: 3916" entry for each and one of the devices or you do a call to get an update for all the devices in one go?
The reason asking, is that I can see the multiple entries in the log within the same "second", and not all of them reuse cache.
I guess with multiple devices, like in my case - it may be problematic for the gateway API to keep up with the load.

I have also checked the CPU load on my Raspberry PI and within the container with the "old" and "new" wiserapi.py. I can say there is a noticeable difference and on "new" it a bit higher.

Thanks.

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

quick look today and I think thats the problem. My original code used a caching mechanism to stop excessive calls.. that said.. it should be transparent to the data provider..

have scheduled time this evening to look at this.....

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

@asantaga I'm pretty sure your code is respecting the caching mechanism correctly.

I think I've spotted the problem in my code. I'm testing it now and so far so good. The root of the problem is that I didn't write proper thread-safe code so the system time interval parameter that it was using to determine if it should cache is not being respected between worker threads. I've done a recent test with the mock-server and I can see that it's now only seeing requests every 5 minutes to the server. This means it's respecting the 300 seconds from the configuration finally. I haven't tested this with a live wiser controller only the mock server from https://github.com/connor9/draytonwiser-mock-server

I will update the backend to use proper thread-safe code next week when I'm back from my holiday. I'll also make sure that it takes the refresh value properly from the home assistant setup code. As the first pass at showing you the changes was a proof of concept I'll need to check more of the code changes I made in the home assistant part. Most of my testing of the backend has been on the command line where I've not written and threaded tests so that's how I've missed it. I'll add in some threaded tests to make sure the library has good coverage.

In the meantime, I've put in a fix which passes a force refresh flag from the home assistant update function. This tells the backend data provider to explicitly refresh the data source. Every other request will use the cache. It also relies on a newer version of the Pypi package which is now at 1.0.1 but this is specified in the wiser.py component with REQUIREMENTS = ['python-draytonwiser-api==1.0.1']. I've also add a few few logger calls for the moment to check which functions are triggering get_data calls and when.

I had to rebuild my test container to force it to pickup the new 1.0.1 library. There must be a better way to force it to update but I didn't have time to look it up!

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

cool, where do u get the time! :-)

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

nice!
@connor9 @asantaga I'll test the updated version later today and let you know the results.

from wiserhomeassistantplatform.

connor9 avatar connor9 commented on June 1, 2024

Side projects are easier to do when you're on holiday and stuck inside with the rain!

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

ive downloaded (cloned) a version of connor9's code to see how it works.. so far looking nice...

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

@connor9 Im testing this out in a docker container, thought Id run it parallel to my old working code and its throwing up "invalid device"

Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/wiser.py", line 33, in setup_platform
for device in handler.getWiserHubManager().get_all_devices():
File "/usr/local/lib/python3.6/site-packages/draytonwiser/manager.py", line 153, in get_all_devices
device = self.get_device(jsoned['id'])
File "/usr/local/lib/python3.6/site-packages/draytonwiser/manager.py", line 166, in get_device
device = Device.create(**device_data)
File "/usr/local/lib/python3.6/site-packages/draytonwiser/device.py", line 60, in create
raise Exception("Invalid Device")

This is when rendering the sensors (devices) climate works fine..

Any ideas?

from wiserhomeassistantplatform.

mrvladis avatar mrvladis commented on June 1, 2024

So, I have tried the latest code as well.
I'm getting the following error:
2019-02-11 20:09:43 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
homeassistant_1 | Traceback (most recent call last):
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 291, in _handle_service_platform_call
homeassistant_1 | await func(entity, data)
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/init.py", line 574, in async_service_temperature_set
homeassistant_1 | await entity.async_set_temperature(**kwargs)
homeassistant_1 | File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
homeassistant_1 | result = self.fn(*self.args, **self.kwargs)
homeassistant_1 | File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/init.py", line 384, in set_temperature
homeassistant_1 | raise NotImplementedError()
homeassistant_1 | NotImplementedError

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

ok, I think the issue is the new library isnt happy with different payloads from the drayton hub. When I get time I'll start debugging it standalone... Looking at the way the code is embedded, replacing my legacy code, it should be plug-n-play

from wiserhomeassistantplatform.

asantaga avatar asantaga commented on June 1, 2024

Closing for now, my library is now on pypi and works fine.

from wiserhomeassistantplatform.

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.