Very cool that you guys figured this out, amazing.
I am trying to wrap my head around this, but still a bit puzzled:
How do you guys know what values to enter for:
service_uuid and characteristic_uuid are hardcoded values LEGO uses in the train to identify data. These will not change. Same for bytes to write - this is the protocol we should follow.
MAC address and ID can be detected using ESP32 Bluetooth Low Energy Scanner ā ESPHome
Thank you very much for your response.
Makes things a lot clearer.
Do you know any esphome yaml files to use to get that data?
Do I need to push any buttons on the Lego hub to activate communication?
Can the values to send be found in the official Lego api docks?
Sorry for all the questions
Trying to fully understand.
I have never used BLE with HA or esphome.
Best regards,
Thanks upfront,
Raymond
Thanks I got that part
I was talking about the āLego-sideā
You still need a hub as linked above in the Lego train, or am i misunderstanding things?
Br
Hi, I am trying to figure out a way to use this to turn an esp32 in a remote controller for that lego train⦠how do you generate the payload bits? is there a tutorial, because I simply donāt get it⦠how do you determine which value to use? I read the Lego Wireless Protocol docs on git but I think I am missing something⦠e.g to get that motor running⦠i figured out I need the section 3.27 Output Command 0x81 - Motor Sub Commands. I also figured out that I have to convert the PWM duty cycle to hex⦠but what is with the rest of the command values, where do I get them from?
Hi, @JWL98,
Congrats, the project is awesome!!
How do you learn the bluetooth codes of the buttons that you replicate later to send to the train?
Thanks,
Miguel