Hi all,
I was asking help in the Theengs community to see it was possible to deal with this use case using OMG:
I have two sites (home/garage) that are not reachable by wifi or BT but are reachable via LORA 868.
At home, I would like to have one OMG that receives LORA and pushes the things via WIFI & MQTT to HA.
At garage I would like to have one OMG that reads BLE and send it home via LORA, and another OMG that has some supported sensors connected and send it home via LORA.
Unfortunately, 1technophile told me that this use case is not yet supported, so I ended up in a rabbit hole trying to achieve that result differently:
I achieved so far this setup:
I have:
–GARAGE–
- one ESP32 with OMG_ESP32_BLE connected with WIFI to a TP-LINK router and configured to send MQTT to an MQTT server in the router
- one ESP32 lilygo Lora with OMG_ESP32_LORA connected with WIFI to a TP-LINK router configured to send MQTT to an MQTT server in the router
- one TP-LINK router flashed with OpenWRT acting as Access point and some packages (mosquitto-client-nossl, mosquitto-nossl, luci-app-mosquitto, jq) to configure, receive and send data via MQTT
- one shell script that runs in the router and that subscribes to one MQTT topic from the OMG_ESP32_BLE, makes some tweaks and publishes one MQTT topic for the OMG_ESP32_LORA to transmit
–HOME–-
- -one ESP32 lilygo Lora with OMG_ESP32_LORA connected with WIFI to my house and configured to my house MQTT server and Home assistant
So far, when a new item gets published by the OMG_ESP32_BLE in the openmqttgateway/OMG_ESP32_BLE_REMOTE/BTtoMQTT/# the script reads it and publishes it in the openmqttgateway/OMG_ESP32_LORA_REMOTE/commands/MQTTtoLORA -m “$json” so that the LORA transmit it and
the OMG_ESP32_LORA receive it. That’s an amazing result!!
I’m still tweaking things to understand the best way to format data but so far I receiving at home
N: [ OMG->MQTT ] topic: openmqttgateway/OMG_ESP32_LORA/LORAtoMQTT msg: {“hex”:“69643D33303A41453A41343A43463A44463A46322C206272616E643D47454E455249432C0A6D6F64656C3D69426561636F6E2C206D6F64656C5F69643D49424541434F4E2C20747970653D42434F4E2C206D6669643D346330302C20757569643D37323764636664613735643234613966626130343432663361306139313832322C74696D657374616D703D323032352D30332D32375431353A34323A30305A”,“rssi”:-81,“snr”:10,“pferror”:1317,“packetSize”:160}
that contains:
id=30:AE:A4:CF:DF:F2, brand=GENERIC, model=iBeacon, model_id=IBEACON, type=BCON, mfid=4c00, uuid=727dcfda75d24a9fba0442f3a0a91822,timestamp=2025-03-27T15:42:0
I still need to figure out how to define multiple template (?) sensors that can convert the hex and parse the proper values
If anyone is willing to help or is interested, I’ll share the shell script
Let me know what you think