Page 1 of 1

Esp8266 and MQTT question

Posted: Sat Oct 15, 2016 7:52 pm
by acestu
Hi,

If I had a variable with say temperature data in it, how would I connect to a local Mosquitto MQTT server and publish a topic with the temperature data, would it be a case of using the send string command with all of the required data in the preferred protocol ?

EDIT: Also is there a way of accesing the GPIO pins on the Esp8266 ?

Thanks
Stuart

Re: Esp8266 and MQTT question

Posted: Mon Oct 17, 2016 12:57 pm
by Benj
Hi Stuart,

I must admit I am currently a bit hazy with this subject at the moment. It's still in it's infancy and probably will change.

I've seen a lot of people using JSON commands similar to this which could simply be sent out as a string.

Code: Select all

"{\"id\" : 2, \"title\" : \"updated post\", \"body\" : \"This is the new.\"}"
JSON seems very popular at the minute, my hobby Pick and Place communicates with the PC entirely using JSON, I don't really see the appeal over say XML but to be fair I haven't used it much. I suppose it basically is XML in a slightly better structured format for more reliable sending and parsing.

Kersing is probably your man as he has been working a lot with IoT type applications via LoRA.

I'm not sure if there is a way to access the GPIO pins from the external interface. To access these you might have to get hold of the master firmware and make some changes to expose the pins. It's open source so you would think someone would have already done this and posted the updated firmware. Or as I say it might already be in there :D

Re: Esp8266 and MQTT question

Posted: Mon Oct 17, 2016 9:27 pm
by acestu
Hi Ben,

I have working examples on the Arduino IDE software but as you know it uses libraries so it doesn't give much away, most people have abandoned the programming the esp8266-01 in Lua, node MCU in favor of using C++ in Eclipse because of the lack of memory on the board, maybe things will improve when the new Esp32 board is widely available, do you have any plans to make that a Flowcode component ?

Thanks
Stuart

Re: Esp8266 and MQTT question

Posted: Tue Oct 18, 2016 12:38 pm
by Benj
Hi Stuart,

Yes we can certainly make a component for the ESP32 assuming it can still work in slave mode using a serial interface. The ESP32 has been coming soon for a long time now. Do you know what the current status is?

Re: Esp8266 and MQTT question

Posted: Sun Oct 23, 2016 12:46 pm
by acestu
Hi Ben,

It seems as if it is a guessing game as to when these boards will be on sale, I think it is a case of they will be openly available when it happens, so hopefully soon. I am currently using the Wemos D1 mini pro which has an Arial socket to send temperature data via mqtt, it would be nice to do something as easily in Flowcode.

Thanks
Stuart

Re: Esp8266 and MQTT question

Posted: Sun Oct 23, 2016 1:03 pm
by kersing
ESP-32 Modules and adapters available now.

Re: Esp8266 and MQTT question

Posted: Mon Oct 24, 2016 11:02 am
by Benj
Thanks Jac,

I've ordered a few to have a play with.

Re: Esp8266 and MQTT question

Posted: Mon Oct 24, 2016 6:57 pm
by acestu
Hi,

Maybe a component for Christmas Ben :wink:

Thanks
Stuart

Re: Esp8266 and MQTT question

Posted: Mon Nov 28, 2016 10:40 pm
by acestu
Hi,

The price of these seems to of gone crazy, the ones in Kersings link are no longer available and others are trending around £8.00 each and they have no aerial connector on them, I think there are other options available now, and maybe in time the price will come down.

Thanks
Stuart