The use of the ESP8266 in the world of IoT

User avatar
By kinglui29
#78665 Hello Community,
I'm new in this Forum because I have a lot of questions and i think or better said I hope that someone has a good idea on how to make it.

I have around 10 ESP 8266-01 boards connected to 2 channel relay boards for my garagedoors. They now can be opened with 433MHz controles but those nasty things are passing by with the time..
so wanted to built an app for my Android Smartphone with which i can Control the esps. I want something that can be visuialised easiely and connected to a webserver. I know These Websites like Blynk or Cayenne but as I think i know, they connect to their Servers and when they are down my doors wont open. also i want it local in my Network with an open port to which I can connect from the Internet.
I read about MQTT and Mosquitto but i have absolutely no idea of using this...

maybe someone has a good idea for me to solve my Problem.

i´m sorry for my bad english because i come from Germany ;)

Greetings

Lukas
User avatar
By vibhu18
#78792 So, you wanted to control relays from your smartphone and also you want it locally as well as globally available. There are two ways to do it.
* locally-
1.create a static IP for your esp8266.
2.connect it to WiFi_AP mode.
3.begin your Access point using this static IP.
4.create a DNS for this IP.
5. host a web server on this IP using ESP8266webServer.
6. Now post the value to the server as a JSON(most suitable and easy to create and parse)
7. Now on android part create a URL connection, connect to following IP parse the JSON and you are ready
to go.
you can refer it here
https://github.com/vbshightime/IoTemperature
https://github.com/ncdcommunity

*globally
1. There are many MQTT brokers and non MQTT brokers where you can put your sensor readings and can get data from anywhere
2. we have Things Speak and LOSANT a non MQTT server where we just have to access it's API and POST data there also on an android part you can GET data from the same API to you phone as JSON script later you can parse it to get the data
LOSANT
https://ncd.io/getting-started-with-losant-and-ncd-temperature-humidity-sensor/
THINGSPEAK
https://github.com/ncdcommunity/SHT31-temperature-and-humidity

3. we have mqtt brokers like NodeRed Hive MQ and many more where you can subscribe to the topic and publish your data to the particular topic
https://ncd.io/node-red-dashboard-enterprise-accelerometers/