-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I actually want to start a discussion about this...what are your thoughts @silverailscolo ?
I'm doing some research before starting this new project to allow more than 1 HGI's to be used. I fixed my second Ramses ESP (lets call it HGI2) and wanted to check it with this integration, so I added it to the known list. I also removed the other one (HGI1) from the list and enforced only known devices only.
But...only the old HGI1 is set as the HGI to work with. HGI2 is ignored.
Why:
A. Transport Layer vs Application Layer
The issue occurs because there are two separate layers of HGI selection:
- Transport Layer (ramses_tx/transport.py): This is the low-level serial communication layer that automatically discovers and selects the first available HGI device during initialization
- Application Layer (ramses_rf/gateway.py): This is where the known_list filtering should be applied
B. Initialization Order Problem
The problem is in this sequence:
- The transport layer initializes and automatically selects HGI1 it finds (18:149488)
- The transport layer sets this as the "active HGI" in its internal state
- The application layer (Gateway.hgi property) then returns this transport-selected HGI
- The known_list filtering happens too late in the process
So, what is the desired approach here. Do we want to fix this ? And how do you think about allowing more than 1 HGI in ramses anyways ?