STUPID QUESTION WARNING
I realise that MQTT is a publish/subscribe system and so essentially for any work to be done between devices, the initiating device must publish a message which is received by a broker and sent out to any subscribers.
Subscribers (such as home assistant) can process those messages and publish itās own message which is then received by those devices subscribed to the returning channel.
My thinking was that a device publishes something, MQTT sends it to HA (because itās subscribed), HA doesnāt itās magic and publishes back to the devices own subscribe channel. (basically I just repeated the last paragraph again slightly differently in order to emphasise how I understand it).
But can you orchestrate it such that one device can subscribe to another devices published material?
Iām trying to ratify this in my mind and Iām thinking it just doesnāt work like that, but I canāt satisfy myself either way. I certainly feel like it canāt be done.
P = Publish / S = Subscribe
Device 1 (sw) >> P >> broker
broker >> S >> subscriber (HA)
HA does magic
broker << P << subscriber (HA)
Device 2 (light) << S << broker
I suppose my question is:
do devices ONLY subscribe and publish to a broker?
or
is it possible for one device to publish to another device that is subscribed to the first device?
ie device two subscribe to device one and device one publish to device two?
Iām not asking if MQTT can do MESH at all, I realise thatās a totaly different concept, Iām more questioning a setup where the broker is optional (in the case of a light switch and relay may be concerned)
LIke I say, I donāt think itās possible, Iād just like to confirm
and pretty much as soon as I drew this, I kind of got the feeling it really is a stupid question, but I suppose this is what Iām asking (which would be akin to throwing your letter out on the street and hoping the receiver picks it up. Well, not really, because device 1 and 2 know each otherās IP address, but what would be the mechanism between the two? Oh, I know⦠MQTT! LOL
Device 1 (sw) >> P >>
>> S >> Device 2 (light)
I hope I made someoneās day (that there really are stupid people out there⦠ME!)