home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.99k stars 29.64k forks source link

Plugwise Anna not reporting heating #28947

Closed sanderdw closed 4 years ago

sanderdw commented 4 years ago

Home Assistant release with the issue: 0.102.1

Last working Home Assistant release (if known): 0.101 reporting heating correctly

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Integration: https://www.home-assistant.io/integrations/plugwise

Description of problem: If i go to the html app of Anna (v1.8.20) it says heating (flame icon). But i don't see the status heating anymore in HA. In the Thermostat lovelace card it shows as 'inactive'.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

  - platform: plugwise
    name: Anna Thermostaat
    password: !secret anna_password
    host: 192.168.100.22
    legacy_anna: true

Additional information: Also noticing some overall HA stability issues since this release with my raspberry 4 but don't think it has anything to do with this integration. Already switched to a new sd card. Probably unrelated but better to mention this...

probot-home-assistant[bot] commented 4 years ago

Hey there @laetificat, @CoMPaTech, @bouwew, mind taking a look at this issue as its been labeled with a integration (plugwise) you are listed as a codeowner for? Thanks!

bouwew commented 4 years ago

@sanderdw Please know that there is a delay between what is shown on the Anna and what is shown in/on Home Assistant. This depends on the scan_interval parameter (default 30 seconds). That could explain why you see the flame icon on the Anna and inactive on HA. If you've waited long enough the correct status should be shown. When not, there's a bug.

There are still some issues related to the legacy Anna code, see for instance here: https://github.com/laetificat/haanna/issues/14

At the moment I do not have the means to do anything about this and other issues, I've just moved and still need to connect/set-up my PC, put a wired network in the home then connect my server. When all this is in order I will get back to trying to fix the reported issues.

sanderdw commented 4 years ago

Hi @bouwew I thought i did check it once in a while and i have never seen this 'heating/verwarming' message with this last version. Unfortunately i had to go back to an earlier version of HA (0.100.3 there it displays properly though) because of some other issue, so i can't really check to be sure.

But sure, get your things set-up first, appreciate the support.

sanderdw commented 4 years ago

image

So i updated ha to the last version and it's indeed not reporting 'heating'. As you can see in the screenshot, the temperature is set to 20.5 and current room temperature is 18.6. The status is unknown.

bouwew commented 4 years ago

@sanderdw Are you willing to use the development-version (add as custom_component) for testing? If yes, please go here: https://github.com/bouwew/anna-ha

sanderdw commented 4 years ago

Sure, just copy plugwise_dev folder into the custom_components folder right? Need to change the config file aswell?

bouwew commented 4 years ago

Yes, exactly. And then in the config file change to: - platform: plugwise_dev. Make sure to copy all 3 files, the manifest.json file is very important as it links to the correct version of the haanna-library which is also in my github.

bouwew commented 4 years ago

When you have this up and running, I hope it all works. Plz let me know.

sanderdw commented 4 years ago

image

image

Unfortunately it does not work, its still reporting inactive (altough it changed from unknown to off?). You can see the Anna is reporting heating in it’s own web page.

image

bouwew commented 4 years ago

That is very strange. To what kind of heating system is your Anna connected?

sanderdw commented 4 years ago

It's a Vaillant but that's not related right? and i'm using the legacy_anna

bouwew commented 4 years ago

What type of connection between the smile and the Vaillant? On-off or OpenTherm?

On Wed, 8 Jan 2020, 15:20 Sander de Wildt, notifications@github.com wrote:

It's a Vaillant and i'm using the legacy_anna

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/28947?email_source=notifications&email_token=ACWESMW2MXM2MPOYF2SGC5DQ4XOJVA5CNFSM4JQOV7SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIMS4DQ#issuecomment-572075534, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWESMQWJQPNJIFE25TSFBDQ4XOJVANCNFSM4JQOV7SA .

sanderdw commented 4 years ago

OpenTherm

bouwew commented 4 years ago

Can you please post the raw contents of http://[you smile ip]/core/domain_objects on pastebin.com? This will help me find out what is wrong / different in your system compared to other, working systems.

bouwew commented 4 years ago

Preferably with the heating being on/active :)

sanderdw commented 4 years ago

Here you go: https://pastebin.com/HYBNLb9G, it's currently heating.

Also the one with the direct_objects: https://pastebin.com/yRWscJH5

Edit: the value is located in direct_objects: image

payload.direct_objects.appliance[1].logs[0].pointlog[0].period[0].measurement[0].

bouwew commented 4 years ago

Nice find! How did you find this path? @CoMPaTech also FYI.

Indeed, in your /core/direct_objects XML there are the types boiler_state and central_heating_state. boiler_state is on and central_heating_state is off. In my system there is no type boiler_state, only central_heating_state which is on when the system is heating. This must be the difference between an OpenTherm connection and an on-off connection.

Hopefully with this new input we'll be able to squash this bug :)

sanderdw commented 4 years ago

Not sure anymore how I found it a while ago. Before you guys created this nice component I used it a while in a node-red flow to create an custom mqtt climate component. It always reported properly when it was heating.

If you need me to test, just let me know!

bouwew commented 4 years ago

@sanderdw

Please try my latest code at https://github.com/bouwew/anna-ha Replace the climate.py and manifest.json files.

Hopefully now the heating is properly shown in your system. Let me know when it's working, or not.

sanderdw commented 4 years ago

@bouwew great job it's working now! image

bouwew commented 4 years ago

Great, that's good news!

I will wait for the feedback from some other users, when all is OK I will roll out the changes into HA official.

When you are satisfied with the result, please close this issue.

sanderdw commented 4 years ago

@bouwew Unfortunately the component is not working for me on 0.105.3 (not tested on 0.105.0-2). I get the following error:

plugwise: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/plugwise/climate.py", line 276, in update self._domain_objects File "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 164, in get_last_active_schema_name rule_id = self.get_rule_id_by_template_tag(root, locator) File "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 187, in get_rule_id_by_template_tag if rule.find("template").attrib["tag"] == rule_name: KeyError: 'tag'

When i switch back to the plugwise_dev it works again.

bouwew commented 4 years ago

@sanderdw Can you please change in the plugwise manifest.json file the line:"requirements": [...], the contents between [ and ] to:

"https://github.com/bouwew/haanna-1/archive/master.zip#haanna==0.14.2"

Then save the file and restart HA. Let me know the result.

sanderdw commented 4 years ago

That works, including the heat indication:

{ "domain": "plugwise_dev", "name": "Plugwise Development Anna", "documentation": "https://github.com/laetificat/anna-ha", "dependencies": [], "codeowners": ["@laetificat","@CoMPaTech","@bouwew"], "requirements": ["https://github.com/bouwew/haanna-1/archive/master.zip#haanna==0.14.2"] }

bouwew commented 4 years ago

Great, thanks!

I will create another pull request to HAC for this fix.

bouwew commented 4 years ago

@sanderdw We are looking for testers for our new plugwise-beta component. This one will support the Anna's, the Adam and the Smile P1's. And the new Plugs via Adam too. Would you be willing to help us test?

sanderdw commented 4 years ago

Ofcourse! Let me know what to do.

bouwew commented 4 years ago

Ok, great! First, disable the present component by removing the entry in your configuration.yaml, and restart HA. Next, go here: https://github.com/plugwise/plugwise-beta and read the README. It tells you what you need to know. Any questions, let me know!

bouwew commented 4 years ago

Your system was/is different than what we are "used" to, I hope we have made the correct implementation for your system. We'll know soon I hope.