This post is a kind of feature request and a question at the same time.
I've just recently started to play with the MSR, thanks to friend of mine @tunnus
who recommended to try it out. So bear with me if I'm asking trivial or stupid questions.
Some background information of my setup
I have a KNX bus as a hardware backbone which I'm accessing through my own KNXNet/IP protocol stack implementation. On top of that I have NodeJS based dockerized microservices which are communicating using the MQTT. Since I'm still lacking a good rule engine, I've decided to try the MSR, and so far everything is looking pretty promising.
MSR version: latest-22274-24dfd72c (tested on Ubuntu but will eventually run on RPi 4)
MQTTController version: 22260
So what is the problem then?
Having well over 100 entities (62 relays alone) definitely means that I have to go with the entity template configuration. I've already succesfully POCed some simple binary and value sensors, e.g. entities that provide only state changes and are so to speak read-only. These are working just fine, but the problem lies within the switches and generally speaking
entities that have actions.
But let me first explain how I do the MQTT topic mapping for the KNX group addresses, which are basically unique identifiers for the attributes and functions of the KNX devices.
For example a motion sensor has a single group address, let's say 0/6/0,
for which we the following MQTT topics:
For status updates: /knx/0-6-0/status
And for the read operation: /knx/0-6-0/read
The group address 0/6/0 is formatted as 0-6-0 since it would clash with the MQTT topic.
The problem arises with swiches and gets even worse with dimmable lights.
In the KNX world we have separate group addresses for the statuses and for the write operations.
For example a simple switch would have a setup like this:
0/0/55 write (toggle on/off)
0/0/56 status (current status, can be also used to read the status)
And for the dimmable light we may have:
0/0/3 write (toggle on/off)
0/0/4 write (absolute dimming value)
0/0/5 write (relative dimming value)
0/0/6 status (current status, can be also used to read the status)
Now these would map to MQTT topics like this:
And there lies the problem. Since the MQTTController configration is only interpolating the %topic% variable, it's not possible to pass those additional 'write' topics into the template.
I've tried to get my head around this and didn't find any easy solution. One that crossed mind was the possibility to interpolate all the entity's config keys into the template.
I'm open to all suggestions since I would love get on writing the rules and logic with the MSR. Anyway, keep up the good work @toggledbits !