Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.30.3: AssertionError for 3EF0 #58

Open
pbootsma opened this issue Oct 26, 2022 · 6 comments
Open

0.30.3: AssertionError for 3EF0 #58

pbootsma opened this issue Oct 26, 2022 · 6 comments
Assignees

Comments

@pbootsma
Copy link

pbootsma commented Oct 26, 2022

HomeAssistant
Loads of Itho devices: Spider, Autotemp, HRU

Logger: ramses_rf.protocol.parsers
Source: runner.py:119 
First occurred: 13:25:03 (32 occurrences) 
Last logged: 14:52:58

I --- 21:034615 --:------ 21:034615 3EF0 006 020000100200 < Support the development of ramses_rf by reporting this packet ([0, 0, 0, 1, 0, 0, 0, 0]), with a description of your system
I --- 21:060034 --:------ 21:060034 3EF0 006 0200001C0200 < Support the development of ramses_rf by reporting this packet ([0, 0, 0, 1, 1, 1, 0, 0]), with a description of your system
I --- 21:041873 --:------ 21:041873 3EF0 006 020000100200 < Support the development of ramses_rf by reporting this packet ([0, 0, 0, 1, 0, 0, 0, 0]), with a description of your system
I --- 21:060034 --:------ 21:060034 3EF0 006 020000100200 < Support the development of ramses_rf by reporting this packet ([0, 0, 0, 1, 0, 0, 0, 0]), with a description of your system
I --- 02:247253 --:------ 02:247253 3120 007 0000B2000000FF < Support the development of ramses_rf by reporting this packet (byte 2: B2)
@zxdavb zxdavb changed the title Packet report AssertionError for 3EF0 Oct 26, 2022
@zxdavb zxdavb self-assigned this Oct 26, 2022
@pbootsma
Copy link
Author

pbootsma commented Nov 2, 2022

02: is a Itho Autotemp unit
21: is a Itho Spider thermostat

@zxdavb
Copy link
Owner

zxdavb commented Nov 4, 2022

@pbootsma Can you provide a packet log please?

@nl0pvm
Copy link

nl0pvm commented Nov 4, 2022

If this is of any help to you:

18:03:44.965  I --- SpiderLivingroom --:------ SpiderLivingroom 3EF0 006 020000000200 < AssertionError(Invalid payload context: 02)
Traceback (most recent call last):
  File "/home/user/ramsesnewest/ramses_rf/protocol/message.py", line 331, in _validate
    result = PAYLOAD_PARSERS.get(self.code, parser_unknown)(
  File "/home/user/ramsesnewest/ramses_rf/protocol/parsers.py", line 141, in wrapper
    result = fnc(payload, msg, **kwargs)
  File "/home/user/ramsesnewest/ramses_rf/protocol/parsers.py", line 2442, in parser_3ef0
    assert payload[:2] == "00", f"Invalid payload context: {payload[:2]}"
AssertionError: Invalid payload context: 02

packetlog:
2022-11-04T18:03:44.965165 067 I --- 21:04XXXX --:------ 21:04XXXX 3EF0 006 020000000200

@pbootsma
Copy link
Author

pbootsma commented Nov 4, 2022

Complete packetlog of yesterday. Loads of opportunities to improve parsing :).
packet.log.2022-11-03.zip

@zxdavb
Copy link
Owner

zxdavb commented Dec 3, 2023

OK, looking at this packet log now - lots in ther with HVAC, but...

For 3EF0, we still have:

08:56:27.107 RP --- 10:104564 34:209036 --:------ 3EF0 006 00C8110000FF < Coding error: ValueError(Invalid result: 2.0 (0xC8) is > 1)
Traceback (most recent call last):
  File "/home/dbonnes/clients/ramses_rf/src/ramses_tx/message.py", line 259, in _validate
    result = parse_payload(self)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/dbonnes/clients/ramses_rf/src/ramses_tx/parsers.py", line 2848, in parse_payload
    result = _PAYLOAD_PARSERS.get(msg.code, parser_unknown)(msg._pkt.payload, msg)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dbonnes/clients/ramses_rf/src/ramses_tx/parsers.py", line 2432, in parser_3ef0
    mod_level = hex_to_percent(payload[2:4], high_res=False)  # 00-64 (or FF)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dbonnes/clients/ramses_rf/src/ramses_tx/helpers.py", line 320, in hex_to_percent
    raise ValueError(f"Invalid result: {result} (0x{value}) is > 1")
ValueError: Invalid result: 2.0 (0xC8) is > 1

This is a Schema change: I had previously thought was 0-100, but is clear the above is 0.200.

@zxdavb
Copy link
Owner

zxdavb commented Dec 3, 2023

The Itho packet now decodes OK:

2022-11-03T23:58:48.871733 ...  I --- 21:035113 --:------ 21:035113 3EF0 006 0200000A0200  # {'modulation_level': 0.0, '_flags_2': '00', '_flags_3': [0, 0, 0, 0, 1, 0, 1, 0], 'ch_active': True, 'dhw_active': False, 'cool_active': False, 'flame_on': True, '_unknown_4': '02', '_unknown_5': '00'}

@zxdavb zxdavb changed the title AssertionError for 3EF0 0.30.3: AssertionError for 3EF0 Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants