I have two HA. One in my house and one in my shed. The one in the shed is for getting bluetooth sensors from my greenhouse. I want those sensors to appear on my main HA but can’t figure out how to configure that. I found a remote home assistant plugin that used to work great but it doesn’t anymore. Can somebody explain to me how to configure what I want? Pretty sure MQTT is the way to do it but I don’t understand how to configure my component for that.
Is the Home Assistant system in the shed used for anything other than simply receiving sensor data via Bluetooth? If not, it seems like an excessive amount of software infrastructure to simply collect sensor data … that you ultimately want to send to the house’s Home Assistant system.
The ironic part is that you’ll be using MQTT to ‘glue’ the two Home Assistant systems together. That’s the very same technology often used to read data directly from sensors or via Bluetooth-to-MQTT gateways like OpenMQTTGateway.
Yes, the fact is, I have no power in the greenhouse and some Mi Flora sensors as well as a multisensor aeotec. Since I’m too far for bluetooth and z-wave, I have a Rpi3 in my shed (which has electricity) and I want to send the status of those sensors to my main HA in my home.
Bluetooth and zwave sensors in the greenhouse (no AC power available).
The transmitted sensor data is received by Home Assistant (on an RPi) in a nearby shed (AC power available).
Another Home Assistant system is in the house and the goal is to have it receive the sensor data collected by the system in the shed.
Virtually all solutions involve using MQTT as a means of sharing data between the two instances of Home Assistant. In light of that, my original idea was to replace the shed’s instance of HA with something simpler, something designed to receive Bluetooth-based data and relay it via MQTT. It involves far less configuration (and maintenance) that running a full-blown HA system in the shed.
HOWEVER, that idea is now rendered worthless by the fact you are also using zwave-based sensors in the greenhouse. The simple ‘gateway’ device I had in mind cannot handle zwave. So we’re back to the status quo of two HA systems needing to share data.
The commonly-used solution for connecting Home Assistant systems is MQTT Statestream. It would be used to make your shed-based HA system send all its sensor data via MQTT.
That’s one-half of the equation. The other half is to make the house-based HA system receive the MQTT data. In brief, you must create one MQTT sensor (on the house-based system) for each sensor you wish to monitor (on the shed-based system).
If you only have 2-3 sensors then it’s not much of hardship to manually define them on the house-based system. If you have ten or more then it can become a tedious task. The author of this post devised a fairly clever way of automatically adding the sensors using MQTT Discovery:
I think that could still work. It uses websockets with api_password and, as far as I know, api_password is currently deprecated but not eliminated. But I may be wrong about that.
The advantage of Lukas Hetsenecker’s solution is it does not require the use of an MQTT broker (because it uses websockets).
The advantage of using MQTT Statestream is you don’t have to share all the entity data, you can specify a subset if you wish. That might not be relevant for you if your shed-based HA system is only monitoring the sensors you wish to share (and nothing else).