The RFLink integration allows a direct TCP connection instead of a serial connection to read the RFLink messages and do automatic sensor discovery etc.
What is missing is to read this same information from an MQTT Topic, since many projects implement RFLink over TCP allow to write to an MQTT instance instead.
This would decouple Home Assistant and the RFLink device, removing the direct dependency on another IP address.
Well, if the “many projects” implement HA MQTT discovery protocol, there is nothing to be done.
If not, is there a common MQTT-RFLink protocol HA could adhere to?
RFLink has a specific text protocol (line-oriented) that is simple and provides data of different sensors. This is normally read line by line from the serial interface, or in the case of TCP communication, over a direct connection.
The existing solutions write these same lines one after the other to a configurable MQTT topic.
This means that by “simply” switching from reading the lines over TCP to reading the lines from MQTT the rest of the logic (auto discovery of sensors, configuration for RFLink etc.) could stay the same.
By exchanging the transport layer and keeping the rest the same we could leverage all the work that has been gone into the existing RFLink integration.
This would be the alternative if using MQTT for the RFLink integration is not feasible.
I’ve started to use this one:
and currently I use the TCP communication. But this means that I have to use the IP address of the device, even though writing to MQTT works perfectly well. And this has two effects:
If I change the IP address of the device, the communication is broken
With MQTT I could add more than one device writing to that topic