Heatmiser configuration - what am I getting wrong?

Hi,
Am trying out HA - really like the look of it, but I’m struggling to get some heatmiser thermostats working on it. They are the PRT-N models (RS485 connection) connected to a serial to IP adaptor. After editing the configuration.yaml file to include heatmiser I get this error message in the log:

16-07-08 11:49:33 homeassistant.components.thermostat: Error while setting up platform heatmiser
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform
    discovery_info)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/thermostat/heatmiser.py", line 51, in setup_platform
    tstat.get("id"),
AttributeError: 'int' object has no attribute 'get'

My configuration is as follows:

thermostat:
  platform: heatmiser
  ipaddress: 192.168.0.71
  port: 1024
  tstats:
    1:
    id: 1
    name: test

Many thanks for any help you can provide!
Jon
PS Running Ubuntu server 16.04 LTS on a virtualbox VM

The docs are not accurate. tstats should hold a list.

thermostat:
  platform: heatmiser
  ipaddress: 192.168.0.71
  port: 1024
  tstats:
    - 1:
      id: 1
      name: test

Disclaimer: Check my indentation, currently on mobile.

That’s great, thanks very much!

1 Like

PR for correction of docs:
https://github.com/home-assistant/home-assistant.github.io/pull/858

Hi having issues setting this up, the current configuration in the docs throws an error?

the config:

climate:
  - platform: heatmiser
    ipaddress: YOUR_IPADDRESS
    port: YOUR_PORT
    tstats:
      - 1:
        id: THERMOSTAT_ID
        name: THERMOSTAT_NAME

the error:

Testing configuration at /config
ERROR:homeassistant.config:Invalid config for [climate.heatmiser]: expected a dictionary for dictionary value @ data['tstats']. Got [OrderedDict([(1, OrderedDict([('id', 1), ('name', 'STATTEST')]))])]. (See ?, line ?). Please check the docs at https://home-assistant.io/components/climate.heatmiser/
Failed config
  climate.heatmiser: 
    platform: heatmiser
    ipaddress: 192.168.1.87
    port: 23
    tstats: [source /config/configuration.yaml:79]
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 376, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/homeassistant/__main__.py", line 355, in main
    return scripts.run(args.script)
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/__init__.py", line 53, in run
    return script.run(args[1:])  # type: ignore
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 121, in run
    dump_dict(config, reset='red')
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 310, in dump_dict
    dump_dict(value, indent_count + 2)
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 317, in dump_dict
    dump_dict(i, indent_count + 2, True)
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 307, in dump_dict
    for key, value in sorted(layer.items(), key=sort_dict_key):
  File "/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py", line 300, in sort_dict_key
    key = str.lower(val[0])
TypeError: descriptor 'lower' requires a 'str' object but received a 'int'

Ive tried making the tstats items not a list then it passes the config check but then fails later on

the config:

climate:
  - platform: heatmiser
    ipaddress: YOUR_IPADDRESS
    port: YOUR_PORT
    tstats:
      1:
      id: THERMOSTAT_ID
      name: THERMOSTAT_NAME

the error:

Error while setting up platform heatmiser
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  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/heatmiser.py", line 52, in setup_platform
    heatmiser, tstat.get(CONF_ID), tstat.get(CONF_NAME), serport)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/heatmiser.py", line 69, in __init__
    self.update()
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/heatmiser.py", line 119, in update
    self.dcb = self.heatmiser.hmReadAddress(self._id, 'prt', self.serport)
  File "/usr/lib/python3.6/site-packages/heatmiserV3/heatmiser.py", line 221, in hmReadAddress
    datal = hmSendAddress(destination,0,0,0,serport)
  File "/usr/lib/python3.6/site-packages/heatmiserV3/heatmiser.py", line 203, in hmSendAddress
    msg = hmFormMsgCRC(destination, protocol, constants.MY_MASTER_ADDR, rw, address, payload)
  File "/usr/lib/python3.6/site-packages/heatmiserV3/heatmiser.py", line 87, in hmFormMsgCRC
    data = data + crc.run(data)
  File "/usr/lib/python3.6/site-packages/heatmiserV3/heatmiser.py", line 58, in run
    self.CRC16_Update(c)
  File "/usr/lib/python3.6/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'

Hello

I am new to Hassio and am trying to set up Heatmiser using a RS485 converter but am getting config errors.

My config is:-
climate:

  • platform: heatmiser
    ipaddress: 192.168.1.201
    port: 20101
    tstats:
    - 1:
    id: 01
    name: Office
    - 2:
    id: 02
    name: Sitting Room
    - 3:
    id: 03
    name: Kitchen
    - 4:
    id: 04
    name: Utility
    - 5:
    id: 05
    name: Dining Room
    - 6:
    id: 11
    name: Landing
    - 7:
    id: 12
    name: West Bedroom
    - 8:
    id: 14
    name: Ext Bedroom

But I am getting the following errors:

Error while setting up platform heatmiser
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/serial/urlhandler/protocol_socket.py”, line 60, in open
self._socket = socket.create_connection(self.from_url(self.portstr), timeout=POLL_TIMEOUT)
File “/usr/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 82, in async_setup
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
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/heatmiser.py”, line 46, in setup_platform
serport = connection.connection(ipaddress, port)
File “/usr/lib/python3.6/site-packages/heatmiserV3/connection.py”, line 4, in connection
serport = serial.serial_for_url(“socket://”+ipaddress+":"+port+"/logging=debug")
File “/usr/lib/python3.6/site-packages/serial/init.py”, line 88, in serial_for_url
instance.open()
File “/usr/lib/python3.6/site-packages/serial/urlhandler/protocol_socket.py”, line 63, in open
raise SerialException(“Could not open port {}: {}”.format(self.portstr, msg))
serial.serialutil.SerialException: Could not open port socket://192.168.1.201:20101/logging=debug: timed out

Please can anyone suggest what the error is? I am assuming the config list should be formatted as -1, -2, -3 etc?

Thanks

Richard

Anyone?

Thanks

@Fulltopuk do you mind me asking how you’re connecting your sensors to an RS485 converter. I’ve a dozen of them connected to a Heatmiser UH8 but I don’t know how to get an RS485 feed of them? Any help much appreciated :slight_smile:

Hi Ross

I have a RS485 to ethernet converter from USR. They have to be the 12v network type thermostats

See link

I use Hercules to monitor its activity so I know it is looking the Heatmiser network.

However, I bought a Heatmiser Netmonitor which supports the App. I guess I should try and link to that but not had the time.

Hope this helps.

Fulltopuk

1 Like