How to receive file or images using MQTT and ESP8266 - github

I am developing a ESP8266 based project that will be able to communicate with MQTT server (publish and subscribe) ,I'll also need to make files receives from MQTT server .
It is possible to do this with ESP8266 and MQTT ?.I had searched on Google and but I didn't get very clear answers. Can anyone suggest be better solution?

Related

How can I connect to WebSocket server in swift?

I heard Apple recently added web sockets which allows a server to push data but i did't get any single example or any documentation.
I want to make a app where i can have the data from a websocket server can anyone help me how can i do that.
May i have to download a third party library?

NodeMCU - Access Point mode or Station mode?

I'm new to Nodemcu and i need your recommendations.
I'm curently doing an IOT project that can be worked in the large area and I decide to use Nodemcu - ESP8266 to transfer the data. I plan to use 3 Nodemcu to demo. Two of them are used for collecting data from sensors and transfer them to the 3rd Nodemcu. The 3rd Nodemcu will act like a gateway and it will recongnize the data from each node and send it to the Web Server that I myself created. The Web has its own domain and hosting.
With the ideas above, i have some questions:
Do i really need the 3rd nodemcu to send data to Web Server? Or i just need to send the data directly from those 2 nodemcu to a Web Server?
If it's possible to use the 3rd nodemcu, so it should be worked in station or access point mode?
If 3rd nodemcu is not necessary, so how can i extend the working range of the project?
Thanks so much for your helps. I'm really appreciated. Sorry for my bad English too.
NODEMCU can be used to send data to the server directly if it connects with a router via WiFi(Router needs to be internet connected).
You don't need the third Nodemcu to transfer data. Both esp8266 is directly connected with a router to send data to the server. MQTT is the best protocol for sending data to the server from Sensor. NodeMCU works as an MQTT client to send data. You need to host MQTT broker on a cloud server. Server store data into the database.
If you want to use a third NodeMcu device. NodeMcu can support access point + station parallelly. An access point is used to get data from both devices. ESP8266 station is used to transfer data to the server.
All devices need to have into the same WiFi network to transfer data in between. In case of transferring data to the server, One solution is, To use WiFi range extender like Google WiFi.
You can use MQTTfx desktop application to send and receive data from NodeMcu(ESP8266).
MQTT library for ESP8266
https://github.com/Imroy/pubsubclient
Use the Following link to get more familiar with MQTT protocol
https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt
MQTT basic diagram

Google Cloud IoT : How to connect to MQTT bridge from iOS applications written in Swift?

I couldn't find any documents on how to connect to Google Cloud IoT MQTT bridge from Swift-based applications. Is it possible to connect? Any references or links or samples would be appreciated.
Edited answer responding to comment: To connect using the MQTT bridge to IoT Core, check out the code here.
We don't have an IOS/Swift code example there, but you should be able to see the various pieces you need from the Node or Python examples. The URL/endpoint for IoT Core is mqtt.googleapis.com:8883. The MQTT client's user/pass is going to be blank for the user (unused) and the encoded JWT for the password. The same code has what it looks like, and should be enough to get you started hopefully.
To communicate with IoT Core, the MQTT topics are devices/<device_id>/events/ for telemetry from device to Cloud, and if you want to report state of the device to be stored by IoT Core, it's devices/<device_id>/state/ and if you want to send messages from IoT Core back down to the device, it's either devices/<device_id>/config/ for persistent messages that will be delivered on connect if the device isn't actively connected, or devices/<device_id>/command/ if it's more of a fire and forget, lower latency type message.
Original answer: We don't have any documentation around this particular use case yet, but I found this:
https://github.com/emqtt/CocoaMQTT
Which enables MQTT client connections from IOS and is written in Swift, so that should work. In addition to this, you'll need a library to encode a JWT (Json Web Token) for the auth side of things.
Having said that, you could ditch MQTT entirely and just use the HTTP bridge in IoT Core, as that might be easier? You can see the docs for doing that here: https://cloud.google.com/iot/docs/how-tos/http-bridge. You'll still need the JWT piece for the auth, but it would keep you from having to implement MQTT in the app.

Arduino Client/Server

I want to send data from an arduino to a web page for remote monitoring as well as send data from the web page to arduino for remote control. Is it possible to create both a client and a server in the same Arduino? Also is there any method by which it is possible to control and monitor an Arduino at the same time?
Thanks
Yes, it is possible to have both a client and a server in the Arduino running at the same time. Your second question is not very clear.

How to receive data join multicast group on UDP using ionic?

I have a LAMP server that write data on local network using UDP in multicast on port 300.
I'm developing an application using ionic framework for ios and android that have to read this data on UDP in multicast.
Is possible to do it? I'm trying socket.io library without success..how i can do it?
You need a Cordova native plugin to achieve that.
There seem to be one, but I never tried it yet.