Advice how to load sensor info from Plugwise Anna thermostat web interface XML

Hi @Kumalix ,

The Plugwise Anna is now apart of Home Assistant Core. And yes it should work.
But you will need to disable the custom_component by changing:

climate:
  - platform: plugwise-dev

to:

climate:
  - platform: plugwise

And you can delete your plugwise-dev custom_component files.
Don’t forget to restart HA after the above change.

If that does not work, please look in Developer Tools --> Logs. If there is any error related to Plugwise, let us know.

Hi Bouwe,

tnx for your reply.
I have deleted “anna” folder from “custom_components” folder. So the folder “custom_components” folder is now empty.
This is my configuration.yaml plugwise part:

climate:
  - platform: plugwise
    name: Anna Thermostat
    password: ***********
    host: 192.168.2.6
    port: 80
    legacy_anna: true

This is the error from log, i hope you can help:

Logboekdetails ( ERROR )

Logger: homeassistant.components.climate
Source: components/plugwise/climate.py:274
Integration: Klimaat (documentation, issues)
First occurred: 17:35:10 (1 occurrences)
Last logged: 17:35:10

plugwise: Error on device update!

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 312, in _async_add_entity await entity.async_device_update(warning=False) File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 476, 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 274, in update self._selected_schema = self._api.get_active_schema_name(self._domain_objects) File “/usr/local/lib/python3.7/site-packages/haanna/haanna.py”, line 156, in get_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 188, in get_rule_id_by_template_tag if rule.find(“template”).attrib[“tag”] == rule_name: KeyError: ‘tag’

@Kumalix I looked at the error, it is actually very strange, the error occurs in non-legacy_anna code. So somehow the status of the legacy_anna-key in your config is not detected.
Or, it could be that the version of haanna on your system got mixed up because you were using the custom_component before.

Can you try this: change the “true” in the legacy_anna line to “True” and restart HA.

If that doesn’t work, I would prefer that you switch to the new Plugwise-beta custom_component that we will be pre-releasing in this topic during the coming days.

Hi Bouwe,

It didn’t help. Still the same error.
So i’ll be waiting for “Plugwise-beta custom_component”!

Tnx

We’re in progress of making sure everyone can start using the beta component. Just some final touch-ups. Beware that it is beta and @bouwew and my time might not fit your ‘it doesnt work need urgent fix now’-statement :slight_smile: So as a headsup, when available, read the documentation on the link that we will share shortly and start preparing:

  • You are not using Anna or Adam yet in HA: make yourself familiair with HACS if you have that installed you’ll be able to add the component in mere seconds
  • You are using the HA component: prepare HACS as per above, note that you’ll have to remove your current plugwise config by removing those lines from you configuration.yaml
  • You are using the downloaded version of the old Anna-HA or bouwes repositories, you’ll have to remove that custom component and remove the plugwise config from your configuration.yaml. You can decide to either download the component yourself or go the HACS-way indicated above.

The new custom_component is configured through the web-interface as shown a couple of posts up. We can’t urge you enough to read the README file that is included in the repository and obviously help eachother to get things up and running. Current things we - based on input of fellow owners testing - support are (v as in firmare major version): Adam v2/v3, Anna v1/v3/v4 and P1 v2/v3.

The link to the component will be made in another topic and crossposted here to get attention of everyone. And as we want to push through to get the current (Anna-only) main Home-Assistant updated we’ll not be including our repo in HACS, that will remain a manual action.

So here goes: https://github.com/plugwise/plugwise-beta version 0.1.0. Make sure your README it :slight_smile:

:champagne: :crossed_fingers:

If you have plugwise circle or stealth plugs, see [this topic](This is about Plugwise Smile and plugs - if you are looking for the Plugwise circle/stealth see this topic)

On behalf of @bouwew and myself big thanks to @riemers and @Tane for their support and all our testers over the last week who dealt our typos and challenges.

2 Likes

to get temp
{{value_json.waardes.temperatuur }}

or change you script to remove the waardes leaving only … then extract temp as you primary variable and the other as json_attributes
{"temperatuur":19.36,"buiten_temperatuur":7.0,"thermostaat":19.0,"water_temperatuur":26.69,"verwarming":"off","warmtepomp":"off"}

Announcement made through new topic, please leave any questions on the custom_component there and file issues at https://github.com/plugwise/plugwise-beta

And another set of nice updates is ready for you, check the new topic for our 0.2.0 announcement.

using the core setup on Ha 109.6, I suddenly receive this:

2020-05-12 13:48:53 ERROR (MainThread) [homeassistant.components.climate] plugwise: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, 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 279, in update
    self._presets = self._api.get_presets(self._domain_objects)
  File "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 89, in get_presets
    presets = self.get_preset_dictionary(root, rule_id)
  File "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 498, in get_preset_dictionary
    directive.find("then").attrib["setpoint"]
KeyError: 'setpoint'

Has anyone seen this yet? Not aware of any change in my setup, nor the Anna for that matter which is on 4.0.15 and in Lan, where it is getting a proper IP address.

needless to say all my sensors in HA fail now, and worse all logic based in these sensors.

I am able to connect to the Anna/Smile via the App or web interface, and even via local ip-address…
thanks for having a look.

This error is a result of the firmware-update to 4.0.15. As you’ve already found, this is fixed in the plugwise-beta development component. Which will hopefully be added to HA Core during the coming weeks.

meaning the core integration for Plugwise is and will stay broken until then?

Or will a quick fix be merged before that?

I ask because the high number if commits on the beta dint seem to indicate a stable integration just yet, making it doubtful the current beta will be in 110 anytime soon…

shouldnt this be issued as a bug meanwhile in ha /core?

Yes, it will stay broken until then.

Agree, someone creating an issue for this would be a good idea.

was already done I now see, and I have added a bit to keep it alive:

https://github.com/home-assistant/core/issues/34303

The error should be solved in haanna version 0.15.0.
Is there a way you can test this updated haanna version?
Either by accessing the supervisor-docker and editing the file …/plugwise/manifest.json,
or by installing anna-ha as custom_component with the name plugwise?

sure, I can install it as a custom component, (doing so with the beta version too…)

I take it I should again use:

climate:
  - platform: plugwise_dev
    password: 'password'
    host: 192.168.1.130
    name: Kantoor

for that to work (and probably uninstall the current integration?) If you let me know what/where to download, ill be glad to

Yes, that can work. Download the files from https://github.com/laetificat/anna-ha

done. should I use 0.15.0, or simply 0.15 (not even sure that matters, just to be sure)

Sorry, I don’t know what you mean? Anna-ha has no version, is not in HACS?

the change in the manifest.json

{
  "domain": "plugwise_dev",
  "name": "Plugwise Anna",
  "documentation": "https://www.home-assistant.io/integrations/plugwise",
  "dependencies": [],
  "codeowners": ["@laetificat", "@CoMPaTech", "@bouwew"],
  "requirements": ["haanna==0.15"]

meanwhile:

so bingo! this is on HA 0.109.6 with the legacy (as in core software, not legacy Anna Hardware… sorry for the confusion) Anna and above posted manifest.json

in Lovelace: