openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601, BL602 and LN882H
https://openbekeniot.github.io/webapp/devicesList.html
1.46k stars 273 forks source link

mqtt broker running in openbeken #903

Open analystcmyk opened 1 year ago

analystcmyk commented 1 year ago

Situation :

I have 2 openbeken devices.

I would like to publish an MQTT message from device 1, to be picked up by device 2.

For that I need an MQTT broker.

Question :

Would it be possible to run a minimal broker on one of the two? Or would you just use the http api ?

I was looking at https://github.com/martin-ger/uMQTTBroker/tree/master

Examples :

openshwprojects commented 1 year ago

Interesting idea, but why not try the SendGet approach?

analystcmyk commented 1 year ago

well, yes, but :

Would it even be possible regarding memory ?

Maybe out of scope but fun to think about how you could do load balancing with just 2 or 3 OBK devices, without any additional equipment required.

Which reminds me to bump #711

openshwprojects commented 1 year ago

Fair point.

Ok, then, what about Tasmota Device Groups? We have a tutorial for that: https://www.youtube.com/watch?v=e1xcq3OUR5M&ab_channel=Elektrodacom

analystcmyk commented 1 year ago

Hmm mDNS vs SSDP : mdns would allow to use the .local as hostname for the MQTT broker, but SSDP doesnt. I think mDNS is better supported if you have Mac clients (bonjour) right, compared to SSDP

I will study device groups first, thank you for the hint.