Hi! I have an Alliance BT lighting system, which has a terrible interface and uses BTLE for the transformer as well as each individual lights. I want to create my own controls for the system that I would like to integrate into Home Assistant through MQTT.
I have figured out the basics for on-off control of the transformer through sniffing (the first and most important step) and set up my ESP32 with OpenMQTT. I am seeing the devices and seem stuck in being able to use the ESP32 to write commands to the device.
I am very new to this, so maybe just formatting and basic direction, her is what I have:
Know the service UUID.
Know the characteristic UUID (which is a custom one).
The write values in binary are 0x01 for “ON” and 0x00 for “OFF”
My home base computer is mac, and I am using MQTT Explorer which seems to be sending the publish command, but this is where I am not sure how to set this up or format the commands as there is no response.
I am able to use nRF Connect to send command with no issues
Ultimately want to send these commands through MQTT via home assistant.
Thank you for helping me and walking me through the necessary steps.
Thanks I’ll try to 16-bit versions. Also seems that using nRF, is issuing a WRITE request and not a WRITE command (which doesn’t work). Is there a specification in the MQTT topic that can specify write request?
However still not triggering effect “Turn ON/OFF”. I suspect there is a difference for this device between write REQUEST and write COMMAND, still works fine with nRF with write REQUEST…just haven’t been able to figure out how to differentiate with mosquitto_pub or MQTT topic command.
Apparently, while hunting this down, some manufacturers will only program for write request to be accepted, not write command. Even though for BLE, these are only differentiated by a return message (with request). I guess will need to figure out how to parse this difference into OMG and define the applicable MQTT command…?