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

@Bodi you actually have to either use the native implementation of the authors plugins, or use both my PRs (https://github.com/laetificat/haanna/pull/2 and https://github.com/laetificat/anna-ha/pull/1). The easiest way though is the ‘under the hood’ as @bouwew mentions it.

Basic steps:

I’ll do a ping on both PRs to the author

@Bodi, here you can find the updated code of the haanna.py file: https://raw.githubusercontent.com/laetificat/haanna/9a3fac303b6df81c9f0bb62f0258b2794dfc99d9/haanna/haanna.py
Using an editor, copy this code into the haanna.py file on you system, after deleting the existing code.

And here you can find the updated code for the anna-ha files: https://github.com/laetificat/anna-ha/tree/dd6e0aa5a30ae3e869694edc1557ecdc1d55eabd/custom_components/anna
click on each file, and then click on the “Raw”-button to get to the “clean” code which can then be copied over.

@CoMPaTech, you could always set up your own repository/fork, this happens quite regularly with other addons, is my impression :slight_smile:
No need to give me commit permissions, I need to pay more attention to my “real life” the coming months :neutral_face: I’m sorry to say…

I’m thinking about buying one of these, but it still seems like a hassle to set it up. @CoMPaTech, any plans to release it directly under HA as a component at some point?

I suggested it to the author, but maybe @bouwew is right and we should move it forward, but as he has already done the PyPI stuff it would be useful not to clash. Let’s give the author another week on GitHub to respond before getting into gear, it’s not that much of a hassle (unless you are in hassio territory indeed).

@CoMPaTech & @bouwew, thanks a lot for your help! Finally got it working by copying the file contents from the PR into the 0.6.1 files. Not the cleanest solution, but I’m glad it works for now. Unfortunately I’m not that familiar with python, but if you require some assistance (with testing or something), I’m happy to help.

@Bodi @takje @bouwew this isn’t by any means a clean way, but to ‘control’ Anna I had to make those changes to the python module as well. I’m sincerely hoping we can get this into the correct gear to make things happening faster.

Never mind, wrote too early…

FYI
I have an older version of Anna (firmware 1.8.20), which is not compatible with the current haanna implementation. Reading the temperatures works, but setting a new temperature fails, because the domain_objects tree differs.

I am working on a ‘downgraded’ version of haanna, which does support v1.8. Once that is done, I’ll look into creating an auto-detect version of haanna, which supports both models.

Edit: WIP repo at https://github.com/plamola/haanna/blob/annav1.8x/haanna/haanna.py

Edit 2: Everything fixed, except the set_mode, which I will finish next week. Auto-detection also working. Will create a PR when done.

I tried installing the latest version of anna-ha from github, but it won’t load properly in Home Assistant.
When I try to configure the component, Home Assistant gives the following error:

Platform not found: climate.anna

The following is logged on startup though:

You are using a custom integration for anna which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

What am I doing wrong?
I am running Home Assistant 0.93.2

@wburgers The current anna-ha on github has not been updated yet and is not compatible with Home Assistant 0.93

You will need the updated version from the pull request made by @CoMPaTech.
See the instructions by @CoMPaTech, about 7 comments above your comment.

@plamola The PRs by @CoMPaTech have been merged, so it has been updated :wink:
That is why I am confused it didn’t work.
Sorry if that was not clear.

@wburgers I had the same problem: Platform not found: climate.anna

After enabling debug logging, I found out the initialization of anna-ha failed.
The reason was, I have an older version of Anna (firmware v1.8.20) which is not supported by the haanna library. Once I fixed the library, I got it working.

So you might want to check the firmware version of your Anna.

And you might need to add

min_temp: 4
max_temp: 30

to your anna configuration, which is not mentioned in the readme.
Not sure if that breaks anything when missing, but might be worth to check out.

The Anna custom_component is now updated on github. So, follow the installation instructions and it should work, after a restart of HA.

Thanks @plamola and @bouwew for your suggestions.
I figured it out eventually.
I use this image to run HA.
It doesn’t do any fancy stuff, that is why the image is fairly small.
So there is also no automatic pip install step…
haanna.py was missing and therefore the component would not load correctly.

Hi all.

First of all: thanks for the awesome work!

Second: I can’t get it to run. One of my main problems is trying to piece together all the different steps. So here is what I have done:

  1. Installed hassio (version 0.93.2)
  2. Downloaded the latest versions of hanna and anna custome component and copied them to ./config/custom_component
  3. Added the customization to configuration.yaml
  4. Restart

In the log of HA i get the warning about the custom component but no other warnings. But I don’t see any sensor information and I don’t see any Anna related messages in the HA log either.

My configuration YAML:
climate:

  • platform: anna
    name: Anna Thermostat
    username: smile
    password: ******* (this is of course filled with the right password in my case)
    host: 192.168.178.** port: 80
    scan_interval: 10

Any ideas?

P.S. During my research I stumbled upon this Plugwise MQTT Server. No idea if that might be useful to you guys (https://github.com/SevenW/Plugwise-2-py),

@wburgers good to hear it worked out

@bnabled That config/setup OK, but plugwise MQTT would be a nice solution indeed. Can you verify (pip list) if haanna is also correctly installed? Otherwise try bumping the logging to debug for custom components (https://www.home-assistant.io/components/logger/) and see if that brings some idea.

@bnabled, you should only need to install the anna-ha custom addon. No need to install the haanna component/files as these will be automatically installed when you restart HA after adding the anna-ha custom component files.

Actually, I think your installation went fine. But, there is no anna-sensor, you should look for something like: climate.anna_thermostat

Content no longer correct, see the post below this one.

1 Like

Update 4: when updating to 0.94.3 it was still not working. The final fix is added to https://github.com/laetificat/anna-ha/pull/5


Update 3: I think I found the cause of the 0.94-problem, @CoMPaTech @plamola please test my pull-request: https://github.com/laetificat/anna-ha/pull/3


Update 2: I upgraded to 0.94.2 today. After the update the climate.anna_thermostat was gone, again.
After some trial and error I found out how to get it to work.
First, perform the update.
Then, change configuration.yaml to show this:

anna:
   username: smile
   password: your_pw
   host: your_ip
   port: 80
   scan_interval: 10

Then, restart.
Next, change configuration.yaml to what it was before:

climate:
  - platform: anna
    username: smile
    password: your_pw
    host: your_ip
    port: 80
    scan_interval: 10

Restart again, now everything should be back to normal.


Update: I upgraded to 0.94 today.
There was no error shown but the climate.anna_thermostat entity was not here.

I played around with the configuration-settings for the Anna custom_component in configuration.yaml, followed by several restarts.
When I was back at the original configuration-text, the entity suddenly showed up!

Scratching my head…
I did install hacs when I was on 0.93 (https://custom-components.github.io/hacs/ replacing custum_updater) and I added Anna into hacs. After the update I reinstalled the anna-component within hacs. I’m not sure if this had any effect.

Do not forget to add

ssdp: 

zeroconf:

to your configuration.yaml when updating to 0.94.