When I installed a heatpump/compressor I switched from a Nest thermostat to the Anna thermostat. I have not found any supported platform for Home Assistant to directly access and control this thermostat but I really wanted to
I started to fiddle with the webinterface and was able to connect and extract all the sensor information from the XML that the webinterface uses through a python script. It includes everything that I need:
Temperature of the room
Thermostat temperature setting
Outdoor temperature (below 4 C the heatpump is inefficient)
Boiler water temperature
Heating state on/off
Heatpump state on/off
From there I wanted to use the command_line platform to get the values from the script to Home Assistant.
This is what I created
2018-12-29 23:28:09 ERROR (SyncWorker_13) [homeassistant.components.sensor.command_line] Command failed: python3 /usr/share/hassio/homeassistant/scripts/anna.py
2018-12-29 23:28:09 WARNING (SyncWorker_13) [homeassistant.components.sensor.command_line] Empty reply found when expecting JSON data
Now Iām a bit stumped what to do. After reading a lot of documentation and forum posts Iām not sure how to proceed. Do I need to make custom / virtual sensors (how?) and fill those by letting the python script set them through the state machine? Or is there another way? Maybe involving MQTT?
I would like the sensors to be persistant and in the future expand functionality by also setting thermostat temperature through Home Asisstant.
Any help would be greatly apreciated!
My setup is Hass.io running in docker on Ubuntu 18.04.
I see now that using Hassio in combination with the Command Line Sensor is not as easy as I hoped. Hassio - Run local scripts
Never the less I made it work
On my host I run the script which puts the values I need into specific files inside the homeassistant config subfolder and update/overwrites them every minute. Command Line Sensor works in Hassio, you just donāt have many programs to use (for example xml parser), but you do have things like cat so I can read the files. Therefore sensors like thisā¦
I know the best way would have been to setup a custom component or add-on but my Python skills are just not (yet) up for that. Als I havenāt had use for a MQTT broker and Iām still a bit unsure about how I would have fixed this throug MQTT messages. I think the benefit would be that the sensors wouldnāt have to be polled but would be directly available after sensor update.
If anyone has any tips on how to improve this setup or wants to work on custom component for the Anna thermostat just let me know.
Hey guys. Iām looking to buy a thermostat to use in conjunction with Homassistant. Anna is the front runner IF I can at least command if from Hass to shut off the heat. Ideally I would like to set the heat as well.
Does that work? As for your description it looks like you can only read it as a sensor.
Using the haanna library mentioned above, I am able to set the target temperature and current preset. I couldnāt find a way to load it into home assistant directly, so I created a small component to forward a few service calls to this library. Iām hoping to find an easier way to set this upā¦ but itāll do for now.
Hi guys, I am running home assistant on an UNRAID server so I was hoping someone would take the time to explain to me in a couple simple steps how to get anna working within home assistant.
Right now I am using domoticz to drive anna. Domoticz is synced with Home assistant over MQTT.
Now I have the following stats:
current thermostat setting in degrees
illuminance in lux of the front facing sensor
boiler temperature in degres
actual in room temperature measured by anna in degrees
I can send an MQTT message from home assistant adjusting the temperature, like this one:
Loving the work of https://github.com/laetificat - Just installed Anna over here but didnāt get it quiet working on 0.91.2. Made some adjustments in https://github.com/laetificat/anna-ha/pull/1 to get met going, as included in the PR not sure if heater detection works, but at least youāll get displayed in which mode Anna resides (i.e. preset āhome/away/asleepā ā¦)
As an update, Iāve created to PRs for both haanna and anna-ha (both in laetificatās repo) to support showing (not yet setting) the operation_mode (i.e. schedule on/off) - it will display (state:on/off) if the heating is active - and switching presets (hold_mode) is working as well.
I like the components so far, i did some changes to it and managed to get it to work on an adam too. i think the component might be named more global if it can support both anna and adam. With adam i know you can have multiple lisaās. Does multiple work for that update too?
Hi, just bought an Anna. Now trying to integrate it in my HA system (hassio).
How do I install the haanna dependency exactly?
I keep getting:
Unable to install package haanna==0.6.2: Could not find a version that satisfies the requirement haanna==0.6.2 (from versions: 0.4.3, 0.5.0, 0.5.1, 0.6.1)
No matching distribution found for haanna==0.6.2
Iāve put the haanna-files (the most recent onces, from the pull-request) and -dirs into the config/custom_components directory, no go.
Also I tried putting them in config/custom_components/anna directory, also no go.
I prepped my PR for it to be ready (both haanna and anna-ha need updating) but the author hasnāt prepped them yet on pypi. What you can do is downgrade it to 0.6.1 (adjust the file manifest.json in your custom_components/anna directory) so it will install. Then apply my patches and you should be fine up to when the author has time to merge it.
(Sorry about the dependency but I didnāt see a way around it, as it (haanna) was only additions I hoped for a quick resolve)
@CoMPaTech, heater detection works for me, Iāve seen the state to show āonā when the heating is running.
Furthermore, in HA the following is shown:
climate.anna_thermostat off current_temperature: 21
min_temp: 4
max_temp: 30
temperature: 20
hold_mode: home
friendly_name: Anna Thermostat
icon: mdi:thermometer
supported_features: 257
I also have made a weekly schedule and enabled that.
Would it be possible to show this as well in the status?
I already have reading and setting the presets sort-of-ready, but the domoticz part makes it a tiny bit easier. The bigger thing is waiting (or not?) for the original author, but we still could abuse the PR further, do you want commit permissions on my fork so we can work on it together?
Biggest āsearchā for me was to figure out how to handle presets (as in the schedules), also see my comments in the PR.
There is a limitation, this only works when being connected to the home network.
There might be ways around this but I havenāt had time to investigateā¦
Hi all, first of all, thanks for the great work on implementing this!
Im trying to add the thermostat myself using the latest PR and setting manifest.json to 0.6.1.
However, I get stuck with this error and I canāt seem to get around it:
Error while setting up platform anna
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/anna/climate.py", line 106, in setup_platform
config.get(CONF_MAX_TEMP)
File "/config/custom_components/anna/climate.py", line 132, in __init__
self._api = haanna.Haanna(self._username, self._password, self._host, self._port)
TypeError: __init__() takes 4 positional arguments but 5 were given
I downgraded from 0.93.0 to 0.92.2, but this also does not seem to solve it. Any suggestions?
I encountered the same error. I ended up needing to edit the haanna.py file on my system, replacing the content by the updated content from the pull-request. Doing this can be a little complex when you are not familiar with how things āwork under the hoodāā¦