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.
with knowing the service uuid and characteristics uuid, did you have a look at the documentation section for using the READ and WRITE commands?
Possibly try it with the uudis in the full 128-bit, but also just with the 16-bit versions of them, as some of my devices seem to only respond to the 16-bit version.
Hope this gets you closer to controlling your lighting system with OMG
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?
and I would also keep HEX to test with the above, but just with "00"/"01"
Also be aware of the curly quotation marks when copy and pasting here, to be avoided by preformatting the relevant text (</> in the above formatting options )
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…?