May I use Theengs to send data from MQTT broker to BLE devices?

Hi.
I’m learned on how to use Theengs OpenMQTT gateway to collect data from BLE sensors and send it to MQTT broker.
This works fine.
Anyway I need to send data from MQTT broker to BLE sensors (in the reverse path)
Is OpenMQTT useful for this purpose?
Any idea?
Thanks in advance

Hello,

You can write data to a device that accept it:

Hi.
Thanks for your reply.
Anyway, how must I confgure my BLE device (i.e. ESP32 device) so that it can accept write command from gateway ?
Could you provide me an example?

Hello,

You could try this example to have a BLE server:

1 Like

Hi.
The real problem is that I’d like to integrate all in Home Assistant and I don’t know how to connect a command like:

mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT -m '{
  "ble_write_address":"AA:BB:CC:DD:EE:FF",
  "ble_write_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b",
  "ble_write_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b",
  "ble_write_value":"TEST",
  "value_type":"STRING",
  "ttl":4,
  "immediate":true }'

to an HA switch.

In other words, I know how to issue the command from the command line but how may I link this command to an HA entity?
Any idea?