zxdavb / ramses_cc

HA integration for CH/DHW and HVAC systems that use the RAMSES II RF protocol
GNU General Public License v3.0
71 stars 16 forks source link

Temperature Entity not being created #37

Closed lloyda closed 2 years ago

lloyda commented 2 years ago

I have a strange situation where it looks like the temperature entity for a TRV is not being created, but the demand, window status and battery entities are. This is only happening for one TRV, all others are OK. From the log, I'm seeing this:

2021-11-02 10:20:28 INFO (MainThread) [custom_components.evohome_cc.binary_sensor] Found a Binary Sensor (battery_low), id=04:026298
2021-11-02 10:20:28 INFO (MainThread) [custom_components.evohome_cc.binary_sensor] Found a Binary Sensor (window_open), id=04:026298
2021-11-02 10:20:28 INFO (MainThread) [custom_components.evohome_cc.sensor] Found a Sensor (heat_demand), id=04:026298
2021-11-02 10:20:28 INFO (MainThread) [custom_components.evohome_cc.sensor] Found a Sensor (temperature), id=04:026298

but all searches for that entity are failing.

This is an extract from the packet.log, searching on that id.

2021-11-02T08:19:05.774571 059  I --- 04:026298 --:------ 01:185426 3150 002 063A
2021-11-02T08:19:15.540739 059  I --- 04:026298 --:------ 04:026298 30C9 003 0005BF
2021-11-02T08:20:08.411651 ...  I --- 04:026298 --:------ 01:185426 1060 003 06C801 # 1060| I|04:026298|06 (06)
2021-11-02T08:20:08.416771 ...  I --- 04:026298 --:------ 04:026298 1060 003 00C801 # 1060| I|04:026298
2021-11-02T08:20:08.558479 ...  I --- 04:026298 --:------ 01:185426 12B0 003 060000 # 12B0| I|04:026298|06 (06)
2021-11-02T08:20:08.922698 ...  I --- 04:026298 --:------ 01:185426 3150 002 06A6 # 3150| I|04:026298|06 (06)
2021-11-02T08:20:08.925061 ...  I --- 04:026298 --:------ 04:026298 30C9 003 00056B # 30C9| I|04:026298
2021-11-02T08:21:17.466113 063  I --- 04:026298 --:------ 04:026298 30C9 003 0005DB
2021-11-02T08:22:08.047815 064  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T08:23:17.974858 064  I --- 04:026298 --:------ 04:026298 30C9 003 0005F3
2021-11-02T08:25:16.450908 065  I --- 04:026298 --:------ 04:026298 30C9 003 000607
2021-11-02T08:28:18.278433 065  I --- 04:026298 --:------ 04:026298 30C9 003 000621
2021-11-02T08:31:17.564646 060  I --- 04:026298 --:------ 04:026298 30C9 003 000634
2021-11-02T08:34:15.735271 060  I --- 04:026298 --:------ 04:026298 30C9 003 000647
2021-11-02T08:35:15.467072 059  I --- 04:026298 --:------ 01:185426 2309 003 0605DC
2021-11-02T08:35:15.481652 059  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T08:35:17.894218 060  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T08:38:18.675305 060  I --- 04:026298 --:------ 04:026298 30C9 003 00065A
2021-11-02T08:42:08.143821 060  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T08:42:17.660345 060  I --- 04:026298 --:------ 04:026298 30C9 003 00066E
2021-11-02T08:49:17.348809 052  I --- 04:026298 --:------ 04:026298 30C9 003 000682
2021-11-02T08:52:23.192846 ...  I --- 04:026298 --:------ 01:185426 1060 003 06C801 # 1060| I|04:026298|06 (06)
2021-11-02T08:52:23.205490 ...  I --- 04:026298 --:------ 04:026298 1060 003 00C801 # 1060| I|04:026298
2021-11-02T08:52:23.409089 ...  I --- 04:026298 --:------ 01:185426 2309 003 0605DC # 2309| I|04:026298|06 (06)
2021-11-02T08:52:23.416607 ...  I --- 04:026298 --:------ 01:185426 12B0 003 060000 # 12B0| I|04:026298|06 (06)
2021-11-02T08:52:23.487101 ...  I --- 04:026298 --:------ 01:185426 3150 002 0600 # 3150| I|04:026298|06 (06)
2021-11-02T08:52:23.719065 ...  I --- 04:026298 --:------ 04:026298 30C9 003 000682 # 30C9| I|04:026298
2021-11-02T08:58:15.210531 061  I --- 04:026298 --:------ 04:026298 30C9 003 000694
2021-11-02T09:02:06.909361 057  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T09:22:08.624545 053  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T09:27:16.005859 058  I --- 04:026298 --:------ 04:026298 30C9 003 000681
2021-11-02T09:33:17.221380 056  I --- 04:026298 --:------ 04:026298 30C9 003 00066E
2021-11-02T09:35:12.688809 057  I --- 04:026298 --:------ 01:185426 2309 003 0605DC
2021-11-02T09:35:12.704170 057  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T09:35:13.288467 057  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T09:42:09.426030 056  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T09:42:16.606795 056  I --- 04:026298 --:------ 04:026298 30C9 003 00065B
2021-11-02T09:51:15.074033 052  I --- 04:026298 --:------ 04:026298 30C9 003 000648
2021-11-02T10:02:09.820152 071  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T10:11:16.689118 060  I --- 04:026298 --:------ 04:026298 30C9 003 000633
2021-11-02T10:20:27.098694 ...  I --- 04:026298 --:------ 01:185426 1060 003 06C801 # 1060| I|04:026298|06 (06)
2021-11-02T10:20:27.113696 ...  I --- 04:026298 --:------ 04:026298 1060 003 00C801 # 1060| I|04:026298
2021-11-02T10:20:27.311082 ...  I --- 04:026298 --:------ 01:185426 12B0 003 060000 # 12B0| I|04:026298|06 (06)
2021-11-02T10:20:27.581447 ...  I --- 04:026298 --:------ 01:185426 3150 002 0600 # 3150| I|04:026298|06 (06)
2021-11-02T10:20:27.755137 ...  I --- 04:026298 --:------ 04:026298 30C9 003 000633 # 30C9| I|04:026298
2021-11-02T10:22:06.554402 065  I --- 04:026298 --:------ 01:185426 3150 002 0600
2021-11-02T10:35:13.766704 060  I --- 04:026298 --:------ 01:185426 2309 003 0605DC
2021-11-02T10:35:13.781870 060  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T10:35:14.163014 060  I --- 04:026298 --:------ 01:185426 12B0 003 060000
2021-11-02T10:42:09.282850 054  I --- 04:026298 --:------ 01:185426 3150 002 0600

Any suggestions on how I can debug this one?

zxdavb commented 2 years ago
2021-11-02 10:20:28 INFO (MainThread) [custom_components.evohome_cc.sensor] Found a Sensor (temperature), id=04:026298

The above looks fine - send me the HA log with this logging setup in configuration.yaml):

logger:
  default: warn  # prefer warn over info, avoid debug
  logs:
    asyncio: error
    homeassistant.core: debug  # to see: Event state_changed, or not
    ramses_rf.message: info   # MSGs rcvd (excl. RQ/18:), is the one you usually want
lloyda commented 2 years ago

Just want to make sure you received the my log file?

zxdavb commented 2 years ago

TBH, I hadn't looked at it - try release 0.16.1 (or later), and we'll go from there.

zxdavb commented 2 years ago

Try 0.16.4 ?

lloyda commented 2 years ago

Upgraded this morning, and initial view is that it has not helped. But I will spend sometime double checking everything just to confirm.

lloyda commented 2 years ago

Looks like that has made things a lot worse, as my schema is failing to populate completely. It's missing lots of data which was there before. This is after about 12 hours

  system:
    heating_control: null
  orphans: []
  stored_hotwater:
    hotwater_sensor: '07:046786'
    hotwater_valve: '13:164839'
    heating_valve: null
  underfloor_heating: {}
  zones:
    '00':
      _name: Living Room
      heating_type: radiator_valve
      sensor: '12:008820'
      devices:
        - '12:008820'
        - '04:003278'
        - '04:003222'
        - '04:003192'
    '01':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003224'
    '02':
      _name: Kitchen
      heating_type: radiator_valve
      sensor: '04:003154'
      devices:
        - '04:003154'
    '03':
      _name: Dining Room
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003286'
    '04':
      _name: Bedroom
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003202'
    '05':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices: []
    '06':
      _name: Small Bedroom
      heating_type: radiator_valve
      sensor: null
      devices: []
    '07':
      _name: G Bedroom
      heating_type: radiator_valve
      sensor: null
      devices: []
friendly_name: 01:185426 (schema)
lloyda commented 2 years ago

And this morning it is looking even worse. I must be doing something wrong.


  system:
    heating_control: null
  orphans: []
  stored_hotwater:
    hotwater_sensor: '07:046786'
    hotwater_valve: '13:164839'
    heating_valve: null
  underfloor_heating: {}
  zones:
    '00':
      _name: null
      heating_type: radiator_valve
      sensor: '12:008820'
      devices:
        - '12:008820'
        - '04:003278'
        - '04:003222'
        - '04:003192'
    '01':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003224'
    '02':
      _name: null
      heating_type: radiator_valve
      sensor: '04:003154'
      devices:
        - '04:003154'
    '03':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003286'
    '04':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices:
        - '04:003202'
    '05':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices: []
    '06':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices: []
    '07':
      _name: null
      heating_type: radiator_valve
      sensor: null
      devices: []
friendly_name: 01:185426 (schema)
lloyda commented 2 years ago

Just noticed there is new version 0.16.6 Will upgrade to that and let you know how I get on.

lloyda commented 2 years ago

Still not getting much joy. In fact schema now had only 2 zones in it. I've found the following in the logs


Source: /usr/local/lib/python3.9/site-packages/ramses_rf/message.py:200
First occurred: 16:40:14 (2 occurrences)
Last logged: 16:40:14

RP --- 01:185426 18:136212 --:------ 0005 004 0008FF00 << TypeError(unsupported operand type(s) for &: 'NoneType' and 'int')
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/message.py", line 173, in process_msg
    msg.src._handle_msg(msg)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/devices.py", line 955, in _handle_msg
    self._evo._handle_msg(msg)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/systems.py", line 1085, in _handle_msg
    super()._handle_msg(msg)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/systems.py", line 651, in _handle_msg
    super()._handle_msg(msg)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/systems.py", line 430, in _handle_msg
    [
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/systems.py", line 431, in <listcomp>
    self._get_zone(f"{idx:02X}", **msg.payload)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/systems.py", line 605, in _get_zone
    zone._set_zone_type(ZONE_TYPE_SLUGS.get(kwargs["zone_type"]))
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/zones.py", line 647, in _set_zone_type
    self._discover()  # TODO: needs tidyup (ref #67)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/entities.py", line 29, in wrapper
    return func(self, discover_flag=discover_flag)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/zones.py", line 860, in _discover
    super()._discover(discover_flag=discover_flag)
  File "/usr/local/lib/python3.9/site-packages/ramses_rf/zones.py", line 508, in _discover
    if discover_flag & Discover.SCHEMA:
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
zxdavb commented 2 years ago

I have identified this but - a fix is coming.

lloyda commented 2 years ago

HACS informed me of a new version, and that has given me a full schema back. Thanks.

Still have a lot of sensors that are invalid or missing, so will try and find more details of those.

zxdavb commented 2 years ago

i understand is fixed