asantaga / wiserHomeAssistantPlatform

Platform and related climate/sensors to support the Drayton Wiser Home Heating System
MIT License
221 stars 43 forks source link

General Discussions #70

Closed asantaga closed 2 years ago

asantaga commented 4 years ago

Hey all, feel free to use this issue to ask questions ideas for our next release 2.0./

For bugs please log an issue For other queries either use this issue or the Home Assistant forum https://community.home-assistant.io/t/drayton-wiser-home-assistant-integration/80965/47

thanks!

msp1974 commented 4 years ago

I'm still getting over the excitement of R1.9. Good job!

asantaga commented 4 years ago

It is pretty damm complete now..

I think we should focus on getting into HA as a native component... I was reviewing docs yesterday and I think its pretty much done.. Give it a couple of weeks so we can make sure there isnt anything we should fix/enhance at the same time then we'll look at it..

asantaga commented 4 years ago

Hey all,

Mark has been super busy and made some changes which add config flow to the integration. Im not sure what else we need to do on this before publishing it to HA as a native component?

Can people please test dev?

Fulch commented 4 years ago

HA version 0.107.1 Dev branch testing.

Getting this error at one minute intervals.

2020-03-20 12:49:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state state = self.state File "/usr/src/homeassistant/homeassistant/components/water_heater/init.py", line 137, in state return self.current_operation File "/config/custom_components/wiser/water_heater.py", line 78, in current_operation WISER_TO_HASS_STATE[self.data.wiserhub.getHotwater.get("Mode")] or STATE_OFF AttributeError: 'function' object has no attribute 'get'

Not sure if it's related but I don't think I had these water heater services before the update.

image

asantaga commented 4 years ago

I'll investigate tonight.. I didnt see them in my build, i wonder why...

, @msp1974 fyi

msp1974 commented 4 years ago

Hi, sorry been quiet for a while. Been dealing with the new C word!

This is my fault, I was playing with adding a water heater component to manage the hot water functions. I wont load if you do not have hot water capability on your hub and I dont have that on mine (only single channel). I should have pointed it out more clearly and that it needed testing by someone who has.

Couple of options 1) disable it loading in the config file entry by removing hot water from the list of components to load. I shouldn't have committed this in the last commit. 2) fix it from this error as we have someone to test it. I dont really know the json structure as cannot see on my hub.

Happy to do which ever option as my fault.

Fulch commented 4 years ago

I do actually have a hot water channel on my heat hub and use it daily via a schedule. I'm happy to test and report back if you have any changes to suggest that I could make.

asantaga commented 4 years ago

I'm puzzled, this is water_heater is for the hot water system right?

I've looked at my wiser app and I don't have the option to set the temperature or the "mode".

Currently we already have set_water_mode (on/off/auto) and I think the only one missing is the ability to set the away mode affects hw (although there is button)

Perhaps just back these out until they are better understood?

msp1974 commented 4 years ago

I think that is probably right. i was looking at it as I had seen a few smart thermostats use it to manage HW. I think it is a good solution to manage the hot water functions as if you add the entity for this, you can change the mode from the UI and it has built in services, but probably best as a branch until fully understood and tested. Will send you a PR to back out (small change to init and remove water_heater.py) and then create another branch for this.

asantaga commented 4 years ago

ok, I think thats best.. Im not convinced its needed...., look forward to the PR.. Thanks

asantaga commented 4 years ago

@Fulch , all checked in and appears to be ok now , with no errors. Can we check this, if its all ok, I'll make a 2.0 release then 100% focus on pushing to native HA

I mean with this corona stuff theres nothing else to do eh?

Fulch commented 4 years ago

Running the latest Dev release since late yesterday and everything looks good!

asantaga commented 4 years ago

Same here.. I'll give it to the weekend and then push it as a 2.0 release..

asantaga commented 4 years ago

So far it works fine so I will release 2.0 this weekend,

just saw a issue (https://github.com/asantaga/wiserHomeAssistantPlatform/issues/79) which was closed by toby (unprintable characters in the SSID screwing up JSON).. Its not "really" a bug, the JSON produced is invalid. Toby may produce a PR and if he does it this weekend I'll wait for it.

not critical TBH~

Surprisingly cold outside isnt it

TobyLL commented 4 years ago

Hi all, I have the water heater functionality on my Wiser system. I think the reason for having the water heater component is so that you can use the Boost 30m/1h/2h/3h preset functionality, in the same way you can for each room. I'm happy to do some testing if needed.

asantaga commented 4 years ago

Hey all, anyone else got the same issue as m01 on entities (https://github.com/asantaga/wiserHomeAssistantPlatform/issues/81)?

@TobyLL , yeah makes sense, will do for 2.1 Im thinking the easiest option is to create a service which allows the boosting of hotwater (similar to wiser.boost_heating). Also enhance the sensor.wiser_hot_water to indicate if its boosted

asantaga commented 4 years ago

Published 2.0 :-)

asantaga commented 4 years ago

So how is all doing with self-isolation.. For me its turned out to mean I have even less time! (childcare etc)

phixion commented 4 years ago

moved to my parents place, away from the city to a more isolated landside spot. equipped them with a rpi hassos a couple of weeks ago and now setting up some basic automations and watch the corona sensor change states. hope yall good!

scooper1 commented 4 years ago

it appears that 2.0 release is broken Breaks on two systems I have control of It broke on startup - maybe insists on config flow via integrations page - No warning in release notes to convert yaml to config flow it maybe to do with the latest superviser release changing to internal DNS server returned back to 1.91 all is ok again error for 2.0 is Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 163, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 50, in wrapper result = await method(view, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 92, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/config/custom_components/wiser/config_flow.py", line 72, in async_step_user ip=user_input[CONF_HOST], secret=user_input[CONF_PASSWORD] File "/config/custom_components/wiser/config_flow.py", line 44, in _test_connection return await self.hass.async_add_executor_job(self.wiserhub.getWiserHubName) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, **self.kwargs) File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 228, in getWiserHubName return self.wiserNetworkData.get("Station").get("MdnsHostname") AttributeError: 'NoneType' object has no attribute 'get'

asantaga commented 4 years ago

Logged https://github.com/asantaga/wiserHomeAssistantPlatform/issues/83

Fulch commented 4 years ago

Using 2.0 release. Similar error, not quite the same though. Despite the error, Wiser appears to be fully functional! Dropping back to Dev version still produces the error, is this due to the API update?

2020-03-30 00:05:52 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry WiserHeat036CB1 for wiser Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 216, in async_setup hass, self File "/config/custom_components/wiser/init.py", line 156, in async_setup_entry await data.async_update_device_registry() File "/config/custom_components/wiser/init.py", line 232, in async_update_device_registry connections={(CONNECTION_NETWORK_MAC, self.wiserhub.getMACAddress())}, File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 231, in getMACAddress return self.wiserNetworkData.get("Station").get("MacAddress") AttributeError: 'NoneType' object has no attribute 'get'

asantaga commented 4 years ago

created patch, see #83 , available for testing. Easy workaround today is to not use config flow but use configuration.yaml parameters..

(reason for bug is wiser upgraded the hub firmware and broke us)

asantaga commented 4 years ago

Ive pulled the R2.0 Release from HACS, until we are sure whats broken it its best to not use it..

Love firmware updates

msp1974 commented 4 years ago

@scooper1 fyi

created patch, see #83 , available for testing. Easy workaround today is to not use config flow but use configuration.yaml parameters..

(reason for bug is wiser upgraded the hub firmware and broke us)

Have posted this on another issue also but don't know how to link that comment into this issue so apologies for posting it twice.

the config flow in v2.0 of this component will do one of 3 things.

1) If you have an entry in config.yaml, it will import this into a config flow config. This is to support all those using prior to v2.0 (like most of us here!). Once it has done so, entry in config.yaml can be removed (of left alone if you want but it won't use it anymore). This is how it needs to work if you want to support config flow. 2) You can manually add by adding through the integration page. In which case it will ask for ip and secret key and create a config from it. It has to be able to connect to the hub when creating this way to get the other devices attached to be created. 3) When this is integrated into the main HA repo, it will support discovery of the hub and just ask for the key. Zeroconf discovery is only supported for core components.

msp1974 commented 4 years ago

See issue #83 . Appears to be a bug in the wiserHub.py api. A PR has been submitted to fix this. Once @asantaga has had chance to update api I think v2.0 will work fine.

asantaga commented 4 years ago

New Release , R2.1_beta1 released..

If this is all good then I'll simply make a new release R2.1

ps because I made it a pre-release it will only show if you say show beta

image

scooper1 commented 4 years ago

still broken for me first set of errors from config.yaml second set from integrations

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 109, in async_init result = await self._async_handle_step(flow, flow.init_step, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/config/custom_components/wiser/config_flow.py", line 203, in async_step_import return await self.async_step_user(user_input=user_input) File "/config/custom_components/wiser/config_flow.py", line 72, in async_step_user ip=user_input[CONF_HOST], secret=user_input[CONF_PASSWORD] File "/config/custom_components/wiser/config_flow.py", line 44, in _test_connection return await self.hass.async_add_executor_job(self.wiserhub.getWiserHubName) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 228, in getWiserHubName return self.wiserNetworkData.get("Station").get("MdnsHostname") AttributeError: 'NoneType' object has no attribute 'get'


2020-03-31 00:25:55 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 163, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 50, in wrapper result = await method(view, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 92, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/config/custom_components/wiser/config_flow.py", line 72, in async_step_user ip=user_input[CONF_HOST], secret=user_input[CONF_PASSWORD] File "/config/custom_components/wiser/config_flow.py", line 44, in _test_connection return await self.hass.async_add_executor_job(self.wiserhub.getWiserHubName) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, **self.kwargs) File "/usr/local/lib/python3.7/site-packages/wiserHeatingAPI/wiserHub.py", line 228, in getWiserHubName return self.wiserNetworkData.get("Station").get("MdnsHostname") AttributeError: 'NoneType' object has no attribute 'get'

msp1974 commented 4 years ago

@asantaga Angelo, i think you haven't set the api version in manifest.json to the correct 1.7.0.2 version so its still pulling the api version with the bug in it.

asantaga commented 4 years ago

yup, thats you get when you dont tear down the test environment... it already had 1.0.7.2

fixed and released R2.1_beta2

julezman commented 4 years ago

yup, thats you get when you dont tear down the test environment... it already had 1.0.7.2

fixed and released R2.1_beta2

Up and running again for me with beta2. #83 seems to be fixed. Haven't tested in depth but the wiser entities are present after the install of beta2 which wasn't the case with 2.0 or 2.1_beta1. Thanks @asantaga!

scooper1 commented 4 years ago

looks good for a full release only noticed one small bug or typo the name construction for roomstat battery level is missing a "_" before the battery_level in the battery level attribute name

msp1974 commented 4 years ago

looks good for a full release only noticed one small bug or typo the name construction for roomstat battery level is missing a "_" before the battery_level in the battery level attribute name

@asantaga sent you a PR for this but sounds like we are good to make this a release.

asantaga commented 4 years ago

I'll merge the PRs (there are two of them) tonight , test it in my new test environment and release 2.1 tonight

asantaga commented 4 years ago

Hey guys,

need a little help with battery levels and roomstats. From speaking to wiser support and from the various TRVs I have , I have worked out that voltage of 25= dead and 30=Full. In latest dev branch Ive patched the code so that this is shown for battery sensors. The % figures match what is reported in the TRV sensor's english text (battery level)..

However, RoomStats are different and can work for longer, alas I dont have much data to what "wiser" considers low.

If possible can u guys look at the roomstat sensor (not battery) , and report back what "voltage" levels you are seeing and corresponding to the English text battery level, from that I can work out the range..

My room stat is reporting voltage of 25 and battery level of "normal"..

any others?

Can you report this in https://github.com/asantaga/wiserHomeAssistantPlatform/issues/90 rather than here.

Thanks all!

asantaga commented 4 years ago

Hey all,

Just wanted to say HAPPY EASTER to you all :-)

asantaga commented 4 years ago

2.2Beta now available for testing via HACS PreRelease channel

julezman commented 4 years ago

Hey all,

Just wanted to say HAPPY EASTER to you all :-)

Happy Easter to you too! Thanks for your amazing work on this.

asantaga commented 4 years ago

Seeing no (major) issues with 2.2 Ive released it as a production 2.2

For the next release we are going to focus on native HA integration (yeah I said that last time :) and fixing a bug where TRVs dont stay off (https://github.com/asantaga/wiserHomeAssistantPlatform/issues/95)

asantaga commented 4 years ago

R2.3 Released, mainly bug fixes

djashjones commented 4 years ago

What about out of HACS and into HA as an integration?

djashjones commented 4 years ago

Or even homebridge or Hubitat integration?

asantaga commented 4 years ago

@djashjones We're moving out of HACS to HA natively, I was working on that this weekend (see branch PrepForPublishing.. That said Mark (@msp1974 ) wants to rewrite the configFlow components to be "properly" done, so he wants to rewrite those first. I'll be working on the HA docs part whilst he does this..

One thing I did notice is that once we move to HA natively you cant use HACS , there would be a name clash, and also releasing patches etc will be done on HA's schedule. We dont be able to release a new version "just like that" :-) and :-(

The way I think patches are done is by users surgically tweaking the HA distro...

I actually prefer the HACS approach, its a package manager vs you modify the entire distro... but it is what it is...

asantaga commented 4 years ago

Do we need homebridge support baked in? Isnt HomeKit baked into HA??? (excuse my ignorance Im an android man)

djashjones commented 4 years ago

Trying to ditch HA but there is a version of homekit in HA.

I know some people want wiser in hubitat the development has stalled.

Homebridge is a peice of software which allows 3 party devices to be added into homekit via plug-ins.

But then again there is a homebridge add-on for hubitat.

If it means I have to run HA for wiser only then so be it, it's not a big issue. It's a nice to have, since you have done a api library.

asantaga commented 4 years ago

Ah got it.

I think the low hanging fruit is to just use HA for wiser.. but I'll have a look at hubitat,. Always nice to see other home automation systems

asantaga commented 4 years ago

Just checked out Hubitat.. Whats the valueprop there? From what I can see it appears to be a competitor to HA but includes hardware and cloud service right?

Alas its out of stock so even if i decided to give it a go I couldnt get one...

djashjones commented 4 years ago

I would class Hubitat as a SmartThings competitor but with local control.

I'm finding HA with every update, something breaks and hence high maintenance, So I am moving all my devices (z-wave & Zigbee) over to Hubitat. I like HA, it is the best software out there but it is just not stable enough. Must be a headache for you too as they breaking your integration, lol.

I might be getting some free time soon so I might have a go of developing a Hubitat app using your api as it's the best out there!

I brought my Hubitat from a polish ebay seller as I could not buy one in the UK without buying direct from hubitat.

asantaga commented 4 years ago

Yeah the different HA releases is a pain. What I dont like is the "method" they've chosen to host components. I love the HACS approach, its much simpler.. Whereas they advocate forking the entire project ... As a comparison, its like saying you want to add a app to linux, so you have to fork the entire ubuntu distro.....

package manager is the way to go..but ho hum

djashjones commented 4 years ago

That's why I stopped updated HA unless I have to. It causes more issues than it fixes.