PiicoDev BME280 with Pi Pico W - mqtt

Hey guys, now that the firmware issues is out of the way, thanks to @Trent5487676

Has anyone used the PiicoDev BME280 / Pi Pico W to publish to a mqtt server?

Cheers again and many thanks in advance.

Phil

4 Likes

Hi Phil,
As it happens I did this a few days ago… (See my previous post). That said I am having problems with what I think is the .keepalive part. The Pico W generally works fine using the umqtt.simple port of mqtt but if the device doesnt post for a while, Im having no luck getting it to reconnect without a reboot. Im sure this is my crappy code and not the u porting.

Jon

4 Likes

Hi @Jon13024 , can you give me the direct link for your previous post?

Cheers

2 Likes

Its here Phil, not a lot of mqtt detail as the original thread was around getting a Pico W to write back into a SQL dB.
https://forum.core-electronics.com.au/t/pico-w-writing-into-mysql-db/15087/4

3 Likes

thanks…

I’ve built an array of raspberry pi “servers”, one is a dedicated mqtt, docker server and others and hosted it at one of our DC’s.
Got things flowing through to RedNode. Works well

4 Likes

Hi Phil,

Here’s the code that I used alongside a Weather Station kit to get data onto my HA instance.

I’ve had it run for 3+ days without it freeze, had to make some mods and haven’t connected it for a good stress test yet.

3 Likes

Thanks Liam,

will check it out and let you know

Phil

3 Likes

Hi Liam, do you have the MQTTClient file(s) ?

Phil

2 Likes

Hi Phil,

Inside the repo on the first link, the dependencies are listed there🙂

4 Likes

Hi Liam, thanks for your code and adapting it to my requirements.
I have the basics publishing to my mqtt server.

Cheers!

2 Likes

(post deleted by author)

(post deleted by author)