android - how to communicate mobile app though Visual Studio with NODEMCU(ESP8266) wifi module? -
i have built mobile application in visual studio. purpose of app connect wifi module (nodemcu esp8266) control home appliances. there differents buttons options in app turn on , turn off appliances , control speed of fans. problem that, don't know how read data in nodemcu (wifi module) when send command through mobile app. consider case : when send comend through app fan speed 50%, , command deliver nodemcu. dont know how read command , how control .
when users clicks [set fan 50%] on mobile device, have mobile device send http post server.
when server receives http post, have store fan speed 50% (or ever value button dictated).
now, on esp8266, have send http server every few seconds asking fan speed should be. have server reply based on value stored. when esp8266 receives response, have set fan speed based on value in response.
--
a few things note:
both mobile device , esp8266 need able reach server. if server on home network, both mobile device , esp8266 must on home network (unless you're doing fancy routing).
there's no easy way (that know of) encrypt wifi password on esp8266. means if picks device , walks off it, can wifi password. it's still great device, aware of this.
a more secure approach put esp8266 in access point mode. have another, more secure device on network connect esp8266 , send fan speed. (that way esp8266 doesn't have store wifi password , data can intercepted data send directly device.)
Comments
Post a Comment