Heroic - Thank You - Going to try this out over the weekend
David and all who have helped before on this thankyou! have managed to get my lights talking to HA and can finally ditch the extra BR-mesh app. They re RGBW downlights Have managed to get them working with the RGB side of things well but cant get the 2700K white channel to turn back on if i change the colour on the RGB wheel or colour temp slider. i have to reattach them the BR-mesh to reset to white colour and then home assistant can toggle the white channel on and off. tried to dig into the RGBW code in your code David but was above my skill level to get it working
Cheers for all the help
Hi David, I have been playing with your code a bunch but still struggling to get the RGBW to work properly sorry to hassle you but any ideas on what i could try am very much a newb to all this but keen to learn. Also, any ideas on how to adjust the code so the ESP retains a connection to the lights after a power cycle without having to put the lights back in paring mode would be most helpful
Thanks in advance
Hello,
I know this is old but when i upload this code to my esp32, it crashes with a bad heap head.
From what i understand, after the line
pAdvertising->start();
I think its here that the heap is going.
Thanks
Hey,
I fixed this by downgrading my ESP32 Firmware to 2.0.1 from Espressif.
Hello and thank you all for this excellent addon to HA!
I have some Melpo flood lights and am trying to get your code (specifically dsclee1 - Davidās) flashed to an ESP32, but did notice in your code that there was nowhere to enter the MQTT broker user and pass. Since yours is based off of millskyleās work where he has these variables added I was wondering if you had any advice on this. I am looking forward to getting this working
Thank you again for your work!
Hello again!
I opted to try Millskyleās code and obtained my key using ADB, altered the number of lights and passwords etc. got all the dependencies and went to compile but am getting this for line 395:
Compilation error: cannot convert āstd::stringā {aka āstd::__cxx11::basic_stringā} to āStringā
Any advice would be much appreciated!
Sorry for the noob question but this is all new to me
Thank you in advance!
Same error for me when using Millskyleās code.
I am a PlatformIO noob so Davidās instructions are greek to me. Any help for someone who hasnāt done any of this for several years? lol
I have the mqtt broker and all that configured. created a user in HA and (I think) configured the broker correctlyā¦ maybe Iām doing all of this out of order, I donāt know. Iāve gotten a bluetooth proxy working but that wonāt control any BRMesh stuff, just my ember mug. Would be great to do both from one chip.
Anherrera! Thank you for replying as it at least confirms I am not the only one getting the same error and/or I am not hallucinating LOL
In the meantime, I have discovered the lights have memory of their last setting when the power is cut, so I simply have a SONOFF switch now on the wire run to turn them on and off with the sun and still use the app to change the colours when needed.
Hopefully someone with some experience in compiling this type of code has an answer
I switched back to trying to use Davidās BRmesh-esp32-mqtt - and I got it to work finally by adding back the MQTT username and password constants as in Millskyleās code then going down to the very bottom and changing
mqtt->begin(MQTT_BROKER_ADDR, 1883);
to
mqtt->begin(MQTT_BROKER_ADDR, 1883, MQTT_BROKER_USER, MQTT_BROKER_PASS);
this is after I had created the āuserā in HA itself with the username/password I want. mqtt addon will automatically let that user in. just call the user whatever as long as itās not admin or homeassistant or addon. I called it mosquito.
in platformIO, basically, build and then upload. then have the light nearby where you or someone else can unplug and plug back in. once youāve finished uploading and have serial console open go ahead and unplug the board and the light. then plug board back in and while the light is blue plug the light back in.
you can see whether the client connected successfully in the add-on logs. itāll say something like this:
2024-09-29 16:15:49: New client connected from 10.0.0.197:63601 as <random_stuff> (p2, c1, k15, u'<USERNAME>').
and then Iāve found that using GitHub - thomasnordquist/MQTT-Explorer: An all-round MQTT client that provides a structured topic overview is incredibly helpful.
Good luck!!! I didnāt have to do anything special in PlatformIO (VSCode add on, anyway) to get the project to upload.