ATAG One thermostat

ATAG make a great product and I’d love to be able to use it in Home Assistant.

You can access the thermostat on a local network or through the cloud. Somebody has documented the API and written a Java app. I think this could be called by the command line but it would be even better as a native component.

http://atagheating.co.uk/atag-one/


In case it helps anyone with this thermostat, I have managed to figure out how to access it as a REST sensor.
First, you need to authorise your HA device as described in links above. I did this by SSHing to my raspi and using a curl command to send the JSON payload.

Then add these lines to your config:

sensor:
- platform: rest
  resource: http://THERMOSTAT_IP:10000/retrieve
  method: POST
  payload: '{"retrieve_message": {"seqnr": 1,"account_auth": {"user_account": "YOUR_ACCOUNT","mac_address": "RASPI_MAC"},"info": 8}}'
  name: Temperature
  value_template: '{{ value_json.retrieve_reply.report.room_temp }}'
  unit_of_measurement: "°C"
1 Like

For anyone that needs to access the Atag ONE thermostat, I’ve made a custom component. Please see: https://github.com/herikw/home-assistant-custom-components
This allows you to also set the room temperature and select modes

1 Like

Many thanks! I will try this when I get home.

Hee,

Im currently trying out your component but im not able to get it to work. I have the IP address of my Atag One configured but the entity doesn’t show up, also im getting errors in my dev-info panel after adding it to my configuration.yaml file.

I have added the file from your git repo to the custom_components/climate folder.
Running hassio on a raspberrypi.

Any idea or can i provide more info on how to debug?
Thansk!

I just fixed the issue by not only restarting home-assistant but restarting the raspberry pi. Thanks for this awesome component!

Hi,

Thanks for the component! I’ve personally added a ‘flame strength’ sensor ([details][rel_mod_level]) and changed the boiler status. It can indicate heating for water, heating for CV, heating for both, etc if you take binary operator &14.

One thing I can’t seem to solve is the frequent timeouts when polling the One for updates. Are you experiencing the same in your logfile? Any idea how that could be improved?

Cheers

@herikw made a great custom component to integrate the Atag One into Home Assistant.
Unfortunately the component can’t be fully used when linked to Google Assistant.

Hi MatsNi,

It seems that in some cases the 10 second scan interval is too short. If increased to for example 20 seconds will improve things and you will no longer see these timeout log entries.

Cheers,
Wim

I created an async custom component, which works good for me now:

Will hold off on further developing it much since climate 1.0 is going to change the way operation mode works… I’ve now set it to heat only, just to make sure it works with google assistant.

Hi, I’ve just tried adding this to my home assistant but it stops it from loading and there doesn’t appear to be any related debug output so I’ve had to remove it for now. Any ideas how I could debug/test this to help improve it?

Hi!

That’s strange, I’ve been using the component without issues for quite some time now. Could you share your config, and perhaps manually add the “host: ip” to it? Also restarting HA once may help installing the dependency.

Hi,

I can’t share my whole configuration.yaml as there are a number of passwords etc in there that I need to move and it would take a while to sanitise. Without atag my HA works fine.

Downloaded your files to /custom_components/atag and added the following to my config:

‘’’
atag:
host: 192.168.1.100

logger:
default: info
logs:
homeassistant.components.atag: debug
‘’’
(correctly indented, not like above)

I’ve then grep’d the log file and there’s no output with ‘atag’ in it so I can’t go any further with this. I’ve also raised an issue on github, is that a better place for this conversation?

Can you update your code to include debugging output?

Thanks

Let’s see whats going on here… :slight_smile:
To enable debug logging you need to put:

custom_components.atag: debug

Let me know what you get!

I have tried both custom_components.atag: debug and homeassistant.custom_components.atag: debug and neither produce any output that’s tagged with ‘atag’.

In fact with atag: added to my config file, the homeassistant startup silently fails pretty early and nothing is loaded and I can’t access the web interface.

This is as far as homeassistant gets on restart with atag: enabled:

2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds.
2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setting up http
2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setting up system_log
2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2019-07-03 07:37:24 INFO (MainThread) [homeassistant.setup] Setting up recorder
2019-07-03 07:37:25 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=49 from 2019-07-03 06:35:58.439648)
2019-07-03 07:37:25 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.6 seconds.

I have turned on full debug logging for everything and this is as far as it gets:

2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=logger, service=set_default_level>
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=logger, service=set_level>
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds.
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=logger>
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setting up http
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=http>
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setting up system_log
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=system_log, service=clear>
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=system_log, service=write>
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=system_log>
2019-07-03 07:44:21 INFO (MainThread) [homeassistant.setup] Setting up recorder
2019-07-03 07:44:21 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=recorder, service=purge>
2019-07-03 07:44:22 DEBUG (Recorder) [homeassistant.components.recorder] Connected to recorder database
2019-07-03 07:44:22 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.5 seconds.
2019-07-03 07:44:22 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=recorder>

Ah this happened to me occasionally too, where loading stopped after unfinished recorder session. One thing I did to fix this is remove atag from config, restart container, add back atag again, and then restart container via the config (to make sure the recorder session is properly finished.

Reason for that problem - I have no clue to be honest…

I’ve done this a few times recently as I’m also in the process of adding in other integrations and getting ready for some new z wave devices arriving later this week so for now I’m going to remove your atag integration, I may come back to it in a few weeks/months and try again, thanks

Hello,
I have the Atag one and have the problem that the time goes wrong after a short time. Does anyone have the same problem?

Im using the custom component till the start and thats the only thing that drives me crazy.

Greetings

Daranto

Is there anyone already using Atag One Zone?

2 Likes