flora icon indicating copy to clipboard operation
flora copied to clipboard

Sketch works but no data to MQTT

Open mbarnes106 opened this issue 4 years ago • 0 comments

Hello. First time using esp32 but think I got it working.

Downloaded your folder, opened config.h.example and added my mac address, ip address of MQTT (synology nas package) and wifi id and password.

Saved this file in the folder as config.h loaded this and flora.ino into arduino, checked and uploaded it to esp32.

Pressing the reload button and watching the serial monitor I see it connecting to flora mac address, force device in data mode, access characteristic from device, read them and display them It then says: wifi disconnected mqtt disconnected going to sleep now

Seems successful but I am subscriped to topic flora on mqtt and get no updated information?

I notice your code has username and password fields, I have no username or password for my MQTT (not even seen a way to set one in synology) so wondering if this is the problem.

I get no errors, but I get no data arriving at MQTT. Not really sure what to do now. Running an mqtt client on mac and iphone I can publish topics and see them so the mqtt broker is working.

Only other thing to note, quite often (almost every time) the first time I run the code on the esp32 if "works" but all the data is blank, the next time I press reload on the esp32 I get data.

Sorry for the long thread, wondering if you can help.

ps, I am using a Vegtrug sensor which is made by Xaiomi and works on Xaiomi app but thought I would mention this.

mbarnes106 avatar Nov 29 '19 14:11 mbarnes106