MQTT interface a singleton?

I'd like to open up two different connections for my rheem integration. Rheem has a "user" topic and a "device" topic - and different credentials for each. Any way of doing this without a second device driver?

If it does require a second drivers, would I have to coalesce their data into a single new virtual device?

1 Like

You should be able to call subscribe() twice to subscribe to two the different topics. (But if you did take the other approach, two child devices of the same parent app or device would work, and you could divide resulting events however you wanted, including all in a parent or other child device; just not sure you need that complication.)

The MQTT connections have different credentials.

The app already uses one child device, if I could add a second child device and make them report up to the same user-facing device, that would work.

Missed that part! I think you'd need two devices, then. If your parent is an app and not device, you could create a third child device and use that for all events, commands, etc., unless you think it makes equal sense to let each of the existing two device do its own thing. The parent can handle coordination between all. Or, maybe someone else will have better ideas...

You can only have one client with the same clientID connected at a time
You can have multiple identical login names using the same password should you wish.

Yeah, Iā€™m familiar with that MQTT restriction. I need 2 connections using different credentials.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.