Having problems adding Heatmiser thermostat to configuration.yaml

OK, so I have a number of older Heatmiser thermostats around the house, together with a multilink which manages them all. I am trying to add to my HA, but having trouble. Not sure I understand the required info:

Going by the components page i’m using the following:

  - platform: heatmiser
    port: 80
      - 1:
        id: 1
        name: test

This is for one of the PRT-TS (Touchscreen) wireless thermostats.

Firstly, the notes state that ID is a required field, and should be the same as configured on the thermostat. Only I have no idea what that is, or whether the ones I have are even configurable with such. Going from another example on these forums, I’ve gone with an arbitrary ‘1’ but on checking config I am getting the following errors:

Failed config

platform: heatmiser
port: 80
tstats: [source /config/configuration.yaml:135]
Traceback (most recent call last):
File “/usr/local/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/local/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/usr/src/app/homeassistant/main.py”, line 374, in
File “/usr/src/app/homeassistant/main.py”, line 353, in main
return scripts.run(args.script)
File “/usr/src/app/homeassistant/scripts/init.py”, line 57, in run
return script.run(args[1:]) # type: ignore
File “/usr/src/app/homeassistant/scripts/check_config.py”, line 115, in run
dump_dict(config, reset=‘red’)
File “/usr/src/app/homeassistant/scripts/check_config.py”, line 293, in dump_dict
dump_dict(value, indent_count + 2)
File “/usr/src/app/homeassistant/scripts/check_config.py”, line 300, in dump_dict
dump_dict(i, indent_count + 2, True)
File “/usr/src/app/homeassistant/scripts/check_config.py”, line 290, in dump_dict
for key, value in sorted(layer.items(), key=sort_dict_key):
File “/usr/src/app/homeassistant/scripts/check_config.py”, line 283, in sort_dict_key
key = str.lower(val[0])
TypeError: descriptor ‘lower’ requires a ‘str’ object but received a ‘int’

The components file suggests that the PRT range of heatmisers are supported. Anyone have a clue?


Anybody have any suggestions, or pointers?

Hi. Am having the same problems. Under tstats replacing “- 1:” with " - ‘01’:" seems to get rid of that error, but now I am faced with other errors.

2018-02-23 00:23:48 ERROR (MainThread) [homeassistant.config] Invalid config for [climate.heatmiser]: expected a dictionary for dictionary value @ data[‘tstats’]. Got [OrderedDict([(‘01’, None), (‘id’, ‘New Room’), (‘name’, ‘Newroom’)]), OrderedDict([(‘02’, None), (‘id’, ‘Sitting Room’), (‘name’, ‘Sitting Room’)])]. (See ?, line ?). Please check the docs at https://home-assistant.io/components/climate.heatmiser/

Can’t get any further than this

I haven’t wired up the PRT I’ve just picked up off ebay yet so I don’t know if this works but it doesn’t produce any errors.

      - platform: heatmiser
        port: 80
            id: 1
            name: Thermostat

Hi both, sorry I didn’t post back on this thread myself earlier. I gave up on getting this to work. In short, I don’t believe the component supports the wifi PRT thermostats I have. I note the bit here from the component page:


The module itself is currently setup to work over a RS232 → RS485 converter, therefore it connects over IP.

Further work would be required to get this setup to connect over Wifi, but the HeatmiserV3 python module being used is a full implementation of the V3 protocol


I understand it should be possible to get this to work, but would require some work. I planned on having a look into that but unfortunately work has me very busy right now. Hope that helps!

This code works for me too, or at least doesn’t show any config error. But now the log shows errors and the heatmiser component is not loading properly.

Does anyone have any idea what is up here

2018-02-26 22:56:36 INFO (MainThread) [homeassistant.components.climate] Setting up climate.heatmiser
2018-02-26 22:56:37 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform heatmiser
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 84, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/heatmiser.py”, line 52, in setup_p$
heatmiser, tstat.get(CONF_ID), tstat.get(CONF_NAME), serport)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/heatmiser.py”, line 69, in init
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/heatmiser.py”, line 119, in update
self.dcb = self.heatmiser.hmReadAddress(self._id, ‘prt’, self.serport)
File “/srv/homeassistant/lib/python3.5/site-packages/heatmiserV3/heatmiser.py”, line 221, in hmReadAddress
datal = hmSendAddress(destination,0,0,0,serport)
File “/srv/homeassistant/lib/python3.5/site-packages/heatmiserV3/heatmiser.py”, line 203, in hmSendAddress
msg = hmFormMsgCRC(destination, protocol, constants.MY_MASTER_ADDR, rw, address, payload)
File “/srv/homeassistant/lib/python3.5/site-packages/heatmiserV3/heatmiser.py”, line 87, in hmFormMsgCRC
data = data + crc.run(data)
File “/srv/homeassistant/lib/python3.5/site-packages/heatmiserV3/heatmiser.py”, line 58, in run
File “/srv/homeassistant/lib/python3.5/site-packages/heatmiserV3/heatmiser.py”, line 52, in CRC16_Update
self.Update4Bits(val>>4) # High nibble first
TypeError: unsupported operand type(s) for >>: ‘str’ and ‘int’

Sorry for the slow response JCTucker1. I’m not totally sure what that means but I think the last line is saying it’s getting a string for something when it’s expecting an int.

I’ve been messing about with this in odd spare moments and have just managed to bodge together enough that my thermostat now shows up in Home Assistant with the correct temperature. I have absolutely no idea what I’m doing but I think I should be able to get at least basic functionality working. I’m going away for the weekend now but when I get back I’ll upload my progress for anyone else that wants to tinker.

1 Like

Hi Dave, interested in seeing your code. Also, which model of the heatmiser are you all using? Is it the PRT-TS with WiFi, or the earlier none wifi PRT models?


I have the PRT-ETS WiFi.

It’s pretty much untested so use at your own risk but I think I might have it working. It only supports reading and setting the temperature on one thermostat right now. The files are at https://github.com/daveNewcastle/HassIO-config/tree/master/custom_components/climate
They’re a mash up of the built in heatmiser component and the wifi code I found at https://github.com/midstar/heatmiser_wifi so they get the real credit.

I’ve got them in config/custom_components/climate/ and in my config yaml I’ve got

  - platform: heatmiserWIFI
    port: 8068
    pin: !secret thermostat_pin

8068 is the default port and I think the default pin is 0000. If you try it let me know how you get on.

Hi Dave,

apologies for the slow reply, but just managed to get some time to look at this. Sounds great, but I’m getting a component not found error when I check config, after adding the config to my .yaml and saving the two .py files into custom_components\climate.

Exact error is " Platform not found: climate.heatmiserWIFI"

Any ideas?


Strange, I’m no expert but I think it should work. I’ve had it running since my last post and the only issue I’ve had is the label for the target temperature is “unknown”. Are the files named exactly the same I had them?

Hi Dave,

Yes exactly as per the instructions on the readme. Files are stored in the custom_components folder in a climate sub folder., and named exactly as per the source. Where are you storing them?

There isn’t really much that could be causing this I guess but clearly something is awry in my setup!

Any chance you could host the files you are using in case there’s some syntax issue?

Thank you!

Good idea. I’ve uploaded my files to https://drive.google.com/file/d/184UHmm0XCHoGrzSERFHbRnhTEzwFpEkl/view?usp=sharing

I put my entire configuration.yaml in just in case there’s something else in there that’s relevant (seems unlikely but you never know). The heatmiser entry is on line 319. Hope it works for you!

1 Like

Hi Dave,

That did the job. Using your files, and adding the configuration to my config.yaml did the job. I can now track the temperature of all three of my Heatmiser thermostats. I can view current temp, set a new temp, as well as track historic temp.

Couple of minor points, the component doesn’t seem to support the ‘name’ attribute, so I cannot label the three thermostats, they all appear as ‘Heatmiser WIFI’. Any simple way to change this? Also, one of the the heatmisers’ I have also supports the hot water function, which isn’t currently available. Not a big deal really. Any plans to add this?

Thank you so much.

That’s great news! I didn’t think it would work with multiple thermostats.

The name attribute should be easy enough to add. I’m happy to have a go at adding the hot water function but as mine doesn’t support it I won’t be able to test so it might take us a bit of back and forth to get it right. I’ll update it next chance I get and let you know.

1 Like

Hi Dave,

Thanks for the reply. So very kind of you to add the updates. So very appreciated. If there is anything I can do to help, please do let me know. I did start to look at the name piece over the weekend, but didn’t get too far, though I’m not particularly proficient with Python.

Also, not a problem with testing etc, I’ll dm you my email address if you want to email instead of using the forums for that.

One other question, if I may. I noticed in your configuration.yaml that you have a graph of Living room temperature. Is that using data from a dedicated temperature sensor, or are you somehow cleverly pulling that from the heatmiser? Here’s the excerpt I’m thinking off:

    name: Living Room Temperature
      - sensor.temperature_1
    hours_to_show: 240
    refresh: 480

Once again, thanks for all your help.

No problem at all. I’m happy stuff I’ve made is useful for other people too, though I’m a bit jealous of your three smart thermostats! I’ve added the name attribute and moved the component to a separate repo so hopefully it will work straight from there for you. https://github.com/daveNewcastle/Heatmiser-WIFI

Email sounds good. I haven’t looked into adding hot water support yet but it’s probably too much to ask for that it goes completely smoothly.

My living room graph is from a Xaiomi temperature sensor. I imagine you could create one from the thermostat data if you wanted though. You’d maybe have to create a virtual sensor in home assistant with https://www.home-assistant.io/components/sensor.template/ that pulled data from the thermostat and then graph that.

1 Like


Thank you for the updated files, just put this into place, and works a treat :slight_smile: I now have all three stats listed and named correctly. One point, which I didn’t mention before, you may want to update the readme to add a possible update that may be required. My stats don’t have external temperature sensors, I believe they’re built in. I had to change the value ‘floor_temp’ to ‘air_temp’ for the temperatures to be read correctly. Others may have to make that change.

Also, I wonder, do you have the status of the climate device showing as unknown on your thermostat? All three of mine show as ‘Unknown’ for the value which should be an indicator of whether the climate device is ‘heating’ ‘cooling’, ‘off’, etc, as I understand it. Is that related to the change I made to the thermostat temp sensor?


Thanks so much for all the help, I will drop you my email address separately, please do let me know if you need anything at all.

Many Thanks!

Hope you don’t mind me jumping into this thread. I am confused with the Heatmiser config for normal nonWIFI PRTs so am hoping you can help me. I have added the suggested code as per the Components page to configuration.yaml for heatmiser but get errors. I am running Hassio on a Pi 3 and am trying to work out if I have to add other files to the setup other than updating the configuration.yaml file?