#Bridge to external MQTT broker?

1 messages · Page 1 of 1 (latest)

sweet tapir
#

I am running the mosquitto MQTT add-on. I have an IoT device that has on-board MQTT I want to pull in to Home Assistant. WIth the MQTT integration, I can only configure one MQTT broker (the local on from the add-on).

Is there a way to configure the external (on my home network) MQTT broker with Home Assistant? Bridge it in to Mosquitto? Can I configure the bridge from the GUI or do I have to ssh into the mosquitto docker container and drop it in a config file (and what happens if the add-on is ever updated?). Thanks

unborn yoke
#

You’d normally just configure the device with the mosquito broker details; IP, username and password. Why can’t you do that?

sweet tapir
#

My device is its own MQTT server not a client.

unborn yoke
#

Make that HAs MQTT broker then. It can be any broker not just the one from the addon. Otherwise you’d have to cluster or replicate. No idea if that’s possible. What is this device?

sweet tapir
#

I only have read only access to it for MQTT. It is a system to control blast gates and dust extractor for my woodshop. Www.gritautomation.com. It also has a swagger API but I have no idea how to get that into HA. Wanted to start with MQTT to at least get sensor and switch status for reporting and stuff.

unborn yoke
#

Old school non SSL website. Don’t see that much anymore.

#

Make sure you don’t make a forwarding loop. 🙂

hot dagger
#

I've used that to bridge to another broker. Works fine. Create another login and password for the new broker in the Add-on configuration though.

sweet tapir
#

ok I now have the MQTT topicing coming in to HA. Of course I have to create a manual device.

I go through the UI screens to create the device and state is always "unknown."

The payload for off is:
{"s":0}

I've tried a value template and I've tried setting that string in the "OFF" field but neither works. I've also tried escaping the quotes.

Debug for the device shows:
1 most recently received message
Received 9:58:39 PM
QoS: 0, Retained
Payload: s: 0