1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.57k stars 787 forks source link

Support for hooks / intended side effects #1206

Closed mpiccolino-tealblue closed 2 years ago

mpiccolino-tealblue commented 2 years ago

I am working on a "soil moisture over LoRa" project where MQTT connectivity with a broker should be optional, not required. The idea is to have a low-cost solution for small veg garden projects, which can then be expanded if a local Controller and/or an internet connection are available.

Hence, I would like the gateway (a Heltec ESP32 v2) to perform a REST call directly to a wifi-enabled sprinkler every time a LoRa message is received, while sending it also to the MQTT broker.

Is this already supported by OpenMQTTGateway without messing too much with the core code?

I'm looking into other low-code solutions, like homie-esp8266, which have hooks of this type, but are tied to the ESP architecture.

Thanks for any feedback!

1technophile commented 2 years ago

Is this already supported by OpenMQTTGateway without messing too much with the core code?

Not supported out of the box. Mqtt connection is required for OMG to run. You would have to modify the code to do what you want.

mpiccolino-tealblue commented 2 years ago

Thanks for the feedback!