Will a MQTTenabled esp publish input data directly to a rpi

25 views
Skip to first unread message

Joseph E. McFarland

unread,
Apr 30, 2018, 9:09:35 PM4/30/18
to MQTT
Hello geniuses of the MQTT nebula! I am Looking at using a mqtt protocol for a single sensor input wirelessly connected to my rasberry pi running python. I have no router or wifi in the area, so I want to connect a mqtt device directly via the wireless built-in my pi. Is this a supported function or is it dependent upon a gateway?

Thomas

unread,
May 1, 2018, 7:04:20 AM5/1/18
to MQTT
Hi Joseph,

You can run an MQTT broker (mosquitto for instance) on the Raspberry Pi and also run a DHCP server on the Pi so that your sensor will get an IP address.

Hope that helps.

Thomas

Andy Stanford-Clark

unread,
May 2, 2018, 4:42:59 AM5/2/18
to mq...@googlegroups.com
You’ll also need to set up the WiFi on your Pi to act as an Access Point (I think that’s what Thomas meant, but didn’t mention ;))

Then your device can look for the Pi’s SSID, get a DHCP address from it, then connect to the Pi’s (fixed) IP address and make an MQTT connection to a mosquitto broker running there.


Andy

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Thomas

unread,
May 2, 2018, 5:46:05 AM5/2/18
to MQTT
Thank you for the clarification Andy, I did indeed miss that part. (having never done that myself actually)

Thomas
Reply all
Reply to author
Forward
0 new messages