• Hi all, I just got into this espruino yesterday and I am so excited and loving it. this is amazing. It completely open up my possibility on building cool stuffs that I never thought about. Thanks for building such a great community. Anyway, back to my project. so I am planning to build something like the Belkin Wemo. an advanced ver of the wemo.

    My Goal:
    I want to automate my fish tank on refilling water whenever the water level drops to certain level. I m using one water level sensor, one temperature sensor and two switch to turn on/off the water pump and a heater. and of course the esp8266 board itself.

    Main features:

    1. sends the water level/temperture to my webserver every 30min/hour
    2. monitor the realtime water level and temperature from my browser(phone or app).
    3. be able to turn on/off the water pump from my browser (send a request to my esp8266 from my browser)
    4. when connected to the espruino from broswer, the temperature/water level value update itself on webpage as soon as the actual value changes. Not via refreshing the page manually or doing a pull to the esp8266. I would like the esp8266 push to the browser whenever the value is changed.

    My Roadblocks - I got stuck at 3 main issues. I am not sure what to do here. Hope you have some suggestion for me.

    1. since I don't have a static IP with my home internet, how do I get the correct ip address whenever my ip is changed? because I need to send the new ip address to my server and store it to db so I can send request to back the esp8266 to turn on/off the water pump and monitor the realtime water level/temperature value.

    2. how do I get the realtime temp/water level update by itself without doing a pull from browser? I am guessing I need to use socket right? if so, please provide some reference on this. if not, what would you do to achieve this goal?

    3. How do I update the wifi login info without hard code it to the code using the IDE? I want to be able to update the wifi login info using my phone whenever the wifi password is change. I want to make this board as portable as possible.

    Thanks for reading and Hope you have some tips for me to solve my two issue.
    Thank you.

About

Avatar for coyu1314 @coyu1314 started