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

Adding 1FC9 binding messages to ramses_cc_message HA events #151

Closed
Onl1ne1373 opened this issue Feb 3, 2024 · 7 comments
Closed

Adding 1FC9 binding messages to ramses_cc_message HA events #151

Onl1ne1373 opened this issue Feb 3, 2024 · 7 comments

Comments

@Onl1ne1373
Copy link

Onl1ne1373 commented Feb 3, 2024

I created a Home Assistant Blueprint for handling Spider messages. It would be better if Spider Thermostat was fully supported in ramses_rf, but for now it works for me.

Blueprint: https://raw.githubusercontent.com/Onl1ne1373/home-assistant-blueprints/main/spider.yaml

What this blueprint does is that it listens to 01FF and 1FC9 messages and handles auto binding and RP messages.
It also listens to a HA Generic Thermostat for the setpoint.

Setpoint messages work if I change the parser like in ramses_rf issue: zxdavb/ramses_rf#101
The 1FC9 message do not work because I do not receive these messages via ramses_cc_message event.
It would be very handy if I could receive them. I don't think it is a parser issue, but more a handling one.

I use message_events: "RQ.* (01FF|1FC9)"

I will look further into it, but it would be very nice if you could add 1FC9 binding messages also to ramses_cc_message events.

@zxdavb
Copy link
Owner

zxdavb commented Feb 4, 2024

I woudl use:

ramses_cc:
  advanced_features:
    message_events: "RQ.* (01FF|1FC9) "

Note the space after 1FC9)

@zxdavb
Copy link
Owner

zxdavb commented Feb 4, 2024

>>> regex
re.compile('I.* (000A|0418|1F09|1FC9) ')

>>> regex.match(" I --- 03:183434 --:------ 63:262142 1FC9 018 0023090ECC8A0030C90ECC8A0000080ECC8A")

>>> regex.match("I 1FC9 ")
<re.Match object; span=(0, 7), match='I 1FC9 '>

>>> regex.match(" I 1FC9 ")

>>> regex.search(" I 1FC9 ")
<re.Match object; span=(1, 8), match='I 1FC9 '>

The code has this:

        ) and regex.match(f"{msg!r}"):

... and it should be:

        ) and regex.search(f"{msg!r}"):

@zxdavb
Copy link
Owner

zxdavb commented Feb 4, 2024

@Onl1ne1373

An RQ|1FC9 is unusual. Did you intend to listen for I|1FC9 (or W|1FC9), or 1F09?

Or can you provide more information?

Perhaps you meant: "(RQ.* 01FF |I.* 1FC9)"

zxdavb added a commit that referenced this issue Feb 4, 2024
@Onl1ne1373
Copy link
Author

Onl1ne1373 commented Feb 4, 2024

Sorry I changed it, it was "(I|RP).* (01FF|1FC9)".
The extra space is nice after the message type, that way the start of payload does not match.

But indeed, RQ of 01FF and I for the 1FC9. So "(RQ.* 01FF |I.* 1FC9 )" would be much better!

@Onl1ne1373
Copy link
Author

Onl1ne1373 commented Feb 4, 2024

Changed it to "(RQ.* 01FF |I.* 1FC9 )", but I do not get I|1FC9 events in Home Assistant. I do get the RQ|01FF.
Using the development tools.

2024-02-04T16:53:50.019116 076  I --- 21:033394 --:------ 21:033394 1FC9 030 0022C95482720022F154827200000E5482720110E0548272001FC9548272

@Onl1ne1373
Copy link
Author

Onl1ne1373 commented Feb 4, 2024

Changed regex.match to regex.search in init.py and it works, I get the events! Thank you!

I debugged my HA blueprint and automatic binding for Spiders is working!

@zxdavb
Copy link
Owner

zxdavb commented Feb 4, 2024

Simply use this for now: "(RQ.* 01FF | I.* 1FC9 )"

@zxdavb zxdavb closed this as completed Feb 4, 2024
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

2 participants