It may be necessary to raise an issue on the Home Assistant Github then - there may be a technical reason why it doesn’t support multiple instances out of the box.
For what it’s worth (for other people who might stumble across this), because I don’t have my RFXComm in the same location as my Home Assistant server, I actually use NodeRed on a Pi.
[{"id":"111625d3.9a936a","type":"mqtt out","z":"14d24653.cce13a","name":"","topic":"","qos":"","retain":"true","broker":"e2d4663.ba31a98","x":640,"y":160,"wires":[]},{"id":"472ea41a.8a277c","type":"function","z":"14d24653.cce13a","name":"","func":"var topic = \"dhjm/rfxgateway/\" + msg.topic;\nmsg.new_topic = topic;\nvar out = {};\n//out.data = msg.payload;\n//msg.payload = out;\nmsg.topic = topic;\nif (typeof msg.raw !== 'undefined') {\n out.data = msg.payload;\n out.raw = msg.raw;\n msg.payload = out;\n}\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":80,"wires":[["4e9846d5.9e7b68","111625d3.9a936a","3ca4d25e.29941e"]]},{"id":"c033a41c.8a82c8","type":"rfx-lights-in","z":"14d24653.cce13a","name":"RFX Lights","port":"32c78c31.961204","topicSource":"all","topic":"","x":100,"y":60,"wires":[["472ea41a.8a277c"]]},{"id":"5904b83b.af5e18","type":"rfx-doorbell-in","z":"14d24653.cce13a","name":"RFX Doorbell","port":"32c78c31.961204","topicSource":"all","topic":"","x":110,"y":120,"wires":[["472ea41a.8a277c","4e9846d5.9e7b68"]]},{"id":"374d3427.be949c","type":"rfx-meter","z":"14d24653.cce13a","name":"RFX Meter","port":"32c78c31.961204","topicSource":"all","topic":"","x":100,"y":200,"wires":[["472ea41a.8a277c"]]},{"id":"edc661f3.48312","type":"rfx-sensor","z":"14d24653.cce13a","name":"RFX Sensor","port":"32c78c31.961204","topicSource":"all","topic":"","x":110,"y":280,"wires":[["472ea41a.8a277c"]]},{"id":"f2bf95f1.f21088","type":"rfx-detector-in","z":"14d24653.cce13a","name":"RFX Alarm","port":"32c78c31.961204","topicSource":"all","topic":"","outputHeartbeats":false,"x":100,"y":360,"wires":[["472ea41a.8a277c"]]},{"id":"16bcbc7c.2e0414","type":"rfx-PT2262-in","z":"14d24653.cce13a","name":"PT2262 Devices","port":"32c78c31.961204","deviceList":"4774fc7c.21e7e4","topicSource":"all","topic":"","x":180,"y":440,"wires":[["472ea41a.8a277c","86459039.cc30f"]]},{"id":"e2d4663.ba31a98","type":"mqtt-broker","z":"","broker":"192.168.2.9","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"32c78c31.961204","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0","enableDebug":false,"rfyVenetianMode":"EU"},{"id":"4774fc7c.21e7e4","type":"PT2262-device-list","z":"","name":"Found Devices","devices":[]}]
That’s my RFX Input flow
and this is my RFX Output flow:
[{"id":"caf0c94d.3b5e68","type":"tab","label":"RFX Out","disabled":false,"info":""},{"id":"c548bdf4.b0a78","type":"mqtt in","z":"caf0c94d.3b5e68","name":"","topic":"dhjm/rfxgateway/command","qos":"2","datatype":"json","broker":"e2d4663.ba31a98","x":150,"y":40,"wires":[["d35d04ca.cc7b68"]]},{"id":"90b2d12d.64a24","type":"function","z":"caf0c94d.3b5e68","name":"","func":"if (typeof msg.payload.address == 'undefined') {\n return null;\n}\nif (typeof msg.payload.data == 'undefined') {\n return null;\n}\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":40,"wires":[["227e7717.9ec9c8"]]},{"id":"d35d04ca.cc7b68","type":"switch","z":"caf0c94d.3b5e68","name":"","property":"payload.device","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":40,"wires":[["90b2d12d.64a24"]]},{"id":"227e7717.9ec9c8","type":"switch","z":"caf0c94d.3b5e68","name":"","property":"payload.device","propertyType":"msg","rules":[{"t":"eq","v":"light","vt":"str"},{"t":"eq","v":"doorbell","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":280,"y":120,"wires":[["2fde47bb.cdf9d8"],["a40d56bb.1ad6e8"]]},{"id":"2fde47bb.cdf9d8","type":"function","z":"caf0c94d.3b5e68","name":"","func":"msg.topic = msg.payload.address;\nvar o = msg.payload;\nmsg.payload = {};\nmsg.payload = o.data;\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":120,"wires":[["ff47f4be.821368","4e165f83.159e2","fadbdb64.5f4648"]]},{"id":"ff47f4be.821368","type":"rfx-lights-out","z":"caf0c94d.3b5e68","name":"AC/ARC Control","port":"32c78c31.961204","topicSource":"msg","retransmit":"once","retransmitInterval":"10","topic":"","x":640,"y":120,"wires":[]},{"id":"a40d56bb.1ad6e8","type":"function","z":"caf0c94d.3b5e68","name":"","func":"msg.topic = msg.payload.address;\nvar o = msg.payload;\nmsg.payload = {};\nmsg.payload = o.data;\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":160,"wires":[["f340fd6c.a6998","4e165f83.159e2"]]},{"id":"f340fd6c.a6998","type":"rfx-doorbell-out","z":"caf0c94d.3b5e68","name":"Doorbell Control","port":"32c78c31.961204","topicSource":"msg","topic":"","x":630,"y":180,"wires":[]},{"id":"4e165f83.159e2","type":"debug","z":"caf0c94d.3b5e68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":540,"y":280,"wires":[]},{"id":"fadbdb64.5f4648","type":"function","z":"caf0c94d.3b5e68","name":"","func":"var t = msg.topic;\nmsg.topic = \"dhjm/rfxgateway/\" + t;\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":260,"wires":[["32ac634f.f5816c"]]},{"id":"32ac634f.f5816c","type":"mqtt out","z":"caf0c94d.3b5e68","name":"","topic":"","qos":"","retain":"true","broker":"e2d4663.ba31a98","x":300,"y":320,"wires":[]},{"id":"e2d4663.ba31a98","type":"mqtt-broker","z":"","broker":"192.168.2.9","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"32c78c31.961204","type":"rfxtrx-port","z":"","port":"/dev/ttyUSB0","enableDebug":false,"rfyVenetianMode":"EU"}]
Then in Home Assistant my sensors are like this:
- platform: mqtt
name: "House Electric"
state_topic: "dhjm/rfxgateway/CM119_160/0xC872"
device_class: power
unit_of_measurement: 'W'
value_template: "{{ value_json.power.value | int }}"
and switches like this:
- platform: mqtt
command_topic: dhjm/rfxgateway/command
name: "Event Lights"
optimistic: true
payload_off: >
{"device":"light","address":"AC/0x0002A95/1","data":"Off"}
payload_on: >
{"device":"light","address":"AC/0x0002A95/1","data":"On"}
state_off: "Off"
state_on: "On"
state_topic: dhjm/rfxgateway/AC/0x0002A95/1
This way I can just stick a USB stick in the Pi and deploy the NodeRed flows. I can deploy this on multiple Pis if I need to.