h2zero 7cfbd3d050 Ble read/write characteristics over MQTT. (#988)
* EXPERIMENTAL: Ble read/write characteristics over MQTT.

Uses #979

This allows reading and writing BLE characteristics from an MQTT message.

Example format:
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -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", "ttl":4 }'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"ble_read_address":"30:AE:A4:7C:3C:A6", "ble_read_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b", "ble_read_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b", "ttl": 2 }'
The ttl parameter is the number of calls to connect (defaults to 1), which occur after the BLE scan completes.

A response is provided over MQTT in the format:
write : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","write":"TEST","success":true}
read : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","read":"TEST","success":true}

* Add generic BLE connect class and read data as hex.

* Add value_type parameter and document usage

* Add note to docs
2021-06-21 20:27:06 -05:00
2021-06-08 16:51:06 -05:00
2019-07-18 22:45:45 +02:00
2020-06-09 16:09:23 -05:00
2020-06-09 16:09:23 -05:00
2020-12-13 12:49:13 -06:00
2018-04-29 21:41:37 +02:00
2017-07-01 22:17:29 +02:00
2020-04-28 14:12:07 -05:00
2017-06-02 22:11:14 +02:00
2020-12-13 12:49:13 -06:00
2021-02-11 17:04:09 -06:00
2021-02-11 17:12:05 -06:00

Community forum GitLicense Download count

Build Check Code Format Codacy Badge Percentage of issues still open

** For Questions or Support please don't open an issue, first go to the docs and if you don't find your answer there you could ask someone in the community forum**

Documentation

The documentation is here

The reference sheet, with the list of all functions, pinouts is here

Download

Download OpenMQTTGateway from the releases page

Compatible items

Contributors ✨

Thanks goes to these wonderful people who helped OpenMQTTGateway on Github and to the users contributions into the community.

Support/help

If you like the project and/or used it please consider supporting it! It can be done in different ways:

S
Description
No description provided
Readme GPL-3.0
72 MiB
0 Stars 1 Watchers 0 Forks
2026-10-29 20:50:05 +00:00
Languages
C++ 76.1%
C 13.6%
Shell 7.2%
JavaScript 2.3%
Python 0.8%