RadioThermostat CT80 component setup problems

I installed my RadioThermostat CT80 and got it connected to my wifi and was able to connect to it by browser, so I decided to add the component to my Home Assistant (Hassio).

The component does not appear in the web interface after a restart. I can load the thermostat’s /tstat page in my browser, and I get the following JSON data:

{“temp”:69.00,“tmode”:1,“fmode”:1,“override”:0,“hold”:0,“t_heat”:62.00,“program_mode”:0,“tstate”:0,“fstate”:0,“time”:{“day”:4,“hour”:14,“minute”:39},“t_type_post”:0}

I got the following error in the home-assistant.log:

2018-04-20 14:22:50 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-04-20 14:22:55 ERROR (MainThread) [homeassistant.components.climate] radiotherm: Error on device update!
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 188, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/climate/radiotherm.py”, line 237, in update
self._name = self.device.name[‘raw’]
AttributeError: ‘NoneType’ object has no attribute ‘name’
2018-04-20 14:23:29 WARNING (SyncWorker_5) [netdisco.ssdp] Error fetching description at http://[fe80::d4e2:6588:1d90:ba8a]:6544/getDeviceDesc

I noticed on the component page that it’s compatible with CT80 Rev B2 V1.03. My package says it’s CT80 Rev.B1 V1.00. Is my version too old to work? I didn’t think to check the version when I bought the NOS unit on eBay. If I’d known to check and that the info was in tiny, tiny print on the side of the box I woulda asked for a closeup pic . . .

Oops, I should have noted I tried configuration entry:

climate:

  • platform: radiotherm

first, then I tried specifying the address of the thermostat:

climate:
platform: radiotherm
host:

  • 192.168.2.155

but got the same problem either way.

It should work fine but the current backend (https://github.com/mhrivnak/radiotherm) requires that it identify the exact model even the HA doesn’t really do anything with that. I tried to remove this requirement last year but that was rejected by the HA maintainers so you’ll have to go to that repo and try and get the author to update it by filing an issue.

You might try looking at the radiotherm code and see if it’s a simple version number hard coded somewhere or not.

1 Like

FYI - the radiotherm author as asked for help maintaining the project on github (and myself and another person have offered to help) so I think we should see some progress on the outstanding issues. Definitely file an issue ticket on github. I think the device creation is overly pedantic at this point - for HA, it doesn’t really matter which specific version of the thermostat you have so we can fix it to return a working thermostat by default.

I’ve been following this issue on github. Backend version 1.4.1 now released on github which should address issue above:

Several new models were added with thanks to the corresponding contributors!

CT80 Rev B1 V1.00 - Eamon Doyle CT80 Rev B2 V1.00 - Clayton Craft

Hello!
A new post on the version compatibility of the CT80 Radio Thermostat (deleted old post).

I’ve got a MODEL = ‘CT80 V2.34T’. (Not listed on the compatible version list)

Previous. I edited a custom component which didnt work (by adding my model version into the component file then adding the file to my custom components folder).

Since, I completely reinstalled a new version of hassio, wiping any custom components.

There have been home assistant updates since, so I tried adding radio thermostat again in climate on configuration.yaml

climate:
platform: radiotherm
host:
- 192.168.1.123

On the front end, the climate component loads! Shows settings, graph window etc.

The operation function (Heat cool etc), fan mode (on, circulate, auto) settings now work!
Sounds good.

However, the component says idle (by the graph), but has no temperature readings.
The away switch does nothing and I cant change any temperatures on the component.

In logs, I get only two errors (no python errors at all now).

Logs:

“Home (192.168.1.123) was busy (invalid value returned)”

“Update of climate.home is taking over 10 seconds”

This appears to be progress as last time nothing appeared front end and there were several component errors.

Any ideas?

So I have one of the same version devices.

I found that program_mode was returning -1 irrespective of whether it was in a program mode (A or B) or not. The wifi module, firmware and API versions are the same between this model and the two other Rev Bs I have.

So I had to change /usr/local/lib/python3.10/site-packages/radiotherm/validate.py to exclude the field program_mode from the check of content being -1:

if content[field] == -1 and field != 'program_mode':

That got me to have the device initialise in homeassistant (post a restart). But it only gave me one entity - the hold option. Rather than two entities the other CT80 Rev Bs have - to read and set the temperature.

I tried adding the model ‘CT80 V2.34T’ to /usr/local/lib/python3.10/site-packages/radiotherm/thermostat.py pointing back to CT80 RevB features as it has the same API features. But that didn’t work.

Then I attempted adding -1 as a valid value from program_mode in /usr/local/lib/python3.10/site-packages/radiotherm/thermostat.py for the CT80 class but that didn’t work either.

Not sure how to get it to register the temperature reading and setting entity like the Rev B models?

Wanted to post an update as have figured out how to get a CT80 V2.34T working with HA. It requires two manual changes - one to the radiotherm integration (I have raised an Issue there to get it applied) and a dependency on a change to the Python radiotherm library (also raised Issue 52 there - I can’t add more than two links so you will have to find it yourself - to get a change applied).

In the meantime, you will need to make the following changes to your HA setup everytime you apply an HA update.

Pre-requisites:

You must have setup SSH developent access to the HA OS to allow you to get a Docker shell to HA Core.

Steps to get working:

SSH into the HA OS:

ssh -l root -p 22222 <HA IP>

At the shell prompt, access the HA Core Docker by running:

docker exec -it homeassistant /bin/bash

At the HA Core Docker shell perform the following:

If the radiotherm integration hasn’t been updated in the HA codebase yet, within /usr/src/homeassistant/homeassistant/components/radiotherm make a backup copy of climate.py

cp climate.py climate.py.bak

Apply the following diff to climate.py:

--- climate.py.bak
+++ climate.py
@@ -32,9 +32,11 @@
 
 PRESET_ALTERNATE = "alternate"
 
+PRESET_DEFAULT = "default"
+
 STATE_CIRCULATE = "circulate"
 
-PRESET_MODES = [PRESET_HOME, PRESET_ALTERNATE, PRESET_AWAY, PRESET_HOLIDAY]
+PRESET_MODES = [PRESET_DEFAULT, PRESET_HOME, PRESET_ALTERNATE, PRESET_AWAY, PRESET_HOLIDAY]
 
 OPERATION_LIST = [HVACMode.AUTO, HVACMode.COOL, HVACMode.HEAT, HVACMode.OFF]
 CT30_FAN_OPERATION_LIST = [FAN_ON, FAN_AUTO]
@@ -67,6 +69,7 @@
 CODE_TO_FAN_STATE = {0: FAN_OFF, 1: FAN_ON}
 
 PRESET_MODE_TO_CODE = {
+    PRESET_DEFAULT: -1,
     PRESET_HOME: 0,
     PRESET_ALTERNATE: 1,
     PRESET_AWAY: 2,

If the Python radiotherm library hasn’t been updated to support CT80 V2.34T (check the issue linked above / the code), you need to make the following changes to the installed library in HA Core. Within /usr/local/lib/python3.13/site-packages/radiotherm make a backup copy of the following two files:

cp thermostat.py thermostat.py.bak
cp validate.py validate.py.bak

Apply the following diffs:

--- validate.py.bak
+++ validate.py
@@ -50,6 +50,6 @@
                   'program_mode', 'ttarget'):
         if field not in content.keys():
             continue
-        if content[field] == -1:
+        if content[field] == -1 and field != 'program_mode':
             raise RadiothermTstatError()
     return response, content


--- thermostat.py.bak
+++ thermostat.py
@@ -349,3 +349,15 @@
 
 class CT80RevB2v109(CT80RevB):
     MODEL = 'CT80 Rev B2 V1.09'
+                                                                                                    
+                                                                                            
+class CT80v234T(CT80RevB):                                                                  
+    MODEL = 'CT80 V2.34T'
+    program_mode = fields.Field('/tstat', 'program_mode',                                           
+        human_value_map={                                                                           
+           -1 : 'Default',                                                                          
+            0 : 'Program A',                                                                        
+            1 : 'Program B',                                                                
+            2 : 'Vacation',                                                                 
+            3 : 'Holiday'                                                                   
+        })

Restart HA Core within the UI (not just reload the YAML) - Developer Tools → Restart → Restart Home Assistant