karloygard / hassio-addons

My Hass.io addons
6 stars 2 forks source link

Multiple MQTT clients. #15

Open dreeas opened 3 years ago

dreeas commented 3 years ago

Hi,

This is not an issue with the addon but rather a support question. Is it possible to connect to other MQTT brokers while using this addon?

Scenario is that I have Xcomfort addon installed two places, at my home and at my cabin. Since I can't have multiple homes in HA I want to be able to send states for the devices I have in my cabin over to my home. I want to use MQTT statestream for this, but I guess I cant change the broker in my MQTT setup since then the xcomfort addon wont work anymore. And I don't believe it's possible to have more than one MQTT broker setup? Is this true, and does anyone have an idea how to solve this?

Br Andreas

dreeas commented 3 years ago

Just read about bridging Mosquito brokers, will this work or could that interfere with the xcomfort addons?

karloygard commented 3 years ago

Somewhat unclear what your configuration is, but it should be fully possible to achieve this if you run xcomfortd-go on it's own on a Raspberry Pi or similar and have it connect to your main MQTT broker in HA. You would have to set up an ssh tunnel in order to have encryption, however, I haven't added support for MQTT over websockets yet.

Specify --eprom --hadiscovery to the daemon, and the devices will be auto discovered by HA, just as with the add-on.

dreeas commented 3 years ago

In my cabin I have the install on a Raspberry and at home it's running a VM on a Synology NAS. I guess if I change the cabin mqtt client from the local mosquitto broker to the broker running on the HA install at home, then I lose all xcomfort entities..? Thats why I should run the Xcomfort on its own Raspberry Pi?