Temperature Web Monitor

Posted on
  • Hello,

    I'd like to start monitoring my house temperature using several espruino (one in each room for ex) so that the data is sent to a webserver (Raspberry Pi maybe?) and then I can monitor the reading on a browser.

    The data would be used to adjust my pellet stove so that I can set the running programs better.

    My questions are:

    1. Is it something someone has done already? If yes, where can I find it?
    2. If it is not something some has done, how can I set up the various espruino satellites to measure the temperature and send it via the wifi module to the webserver?
    3. Is the RaspberryPI a good choice as a webserver?
    4. What else do I need? I'm new at this so your help will be appreciated.

    Thank you.

  • ...may be you just use another Espruino instead of a RaspberryPI. Espruino can be a web server as well and then directoy control your pellet stove.

    Your satellites could come out of deep sleep every once in a while - like 1..3 minutes (or on a button press after you flushed the room with cold air) - power the wifi, initialize it, connect, and do a get or ajax request with the room id and temp as a parms (or data).

    Your central Espruino would be constantly on, wifi connected, and run a Web server. The incoming request url is parsed and action taken accordingly and also hold on to the information. With any wifi device you can then go for the cenral expruino server as well with a different URI and pull and display the held data...

    Since the server - for example ES 8266 - can run only a very limited number of connections at one time, therefore using a ajax request with timeout on the satellites could manage a retry.

  • Thank you allObjects.

    I have further questions now:

    1. For each satellite, I need a sensor DS18B20, a CC3000 module, a power supply and a pico Espruino. For the base, I need the CC3000, a power supply and the Espruino. Is that right?
    2. Do you recommend using the Wifi Module ES8266 instead of the CC3000?
    3. If yes to the question above, is there not a wired solution (USB cable) to avoid the high cost per satellite ? In France, 2 Espruino, CC3000 modules and the sensor costs over 120€, without the power supply for each Espruino.
  • An ESP8266 alone is all you need to manage a temperature sensor. The ESP12 flavor is much better to connect peripherals. This board is less than 5$.
    It can manage a one wire, I²C or SPI temperature sensor and send the information to a base station. You can even add a small OLED screen if you want to display the temperature locally.
    You only need the pico at the base station.

  • I'm doing a similar project. I prefer to have the sensors report to the cloud and collect the data there. More straightforward for sensors outside my home wifi environment and no need to worry about backing up the server. If necessary you could always have the server pull the data back again. I'm currently using IFTTT Maker but expect to use something more flexible in time.

    If you do go for a central server, it depends what you need to do with the data server-side. personally I would prefer the extra oomph of having the pi. For passing sensor data to server, consider MQTT library instead of building your own transport.

    The most annoying thing so far on the networking side with the cloud approach has been lack of SSL but totally understandable in a micro-controller.

    I'm going to try the ESP8266-only approach too.

  • I would not go the CC3000 route - even though it was the only real option at the time I was connecting Espruino to wifi. ESP8266 is for sure the prevailing option today... Since you have only a simple task of measuring the temp and transmit the data, you may even stay ESP8266 'native'/LUA. On the other hand, ESPRUINO's JS is available on ESP8266 as well, you can stick with JS. How you finally move forward depends on your expecations and how much you want to invest - not just in € | $, but also in number of 'moving' parts and 'variety' of parts: 'involving' MQTT, the cloud, various platforms...

  • Yes, I'd go for ESP8266 over CC3000 if you were using WiFi. Cheaper, smaller, and more reliable.

    However you could also consider using non-WiFi if you wanted. For instance you could use RFM69 modules, NRF24, or even raw 433Mhz.

    433Mhz or 868Mhz like the RFM69 will work over a longer distance than WiFi, and use much less power.

    If you did use something like a Pico it has a temperature sensor built in. It's not super-accurate, but it might be good enough to measure temperature fluctuations?

    I'd also be tempted to use a Raspberry Pi for a base station - just because you can use it for other things as well, and could do the webpages with something the PHP if that's what you were happier with. As it does HTTPS it could securely push any non-secure data you have online too.

    While running absolutely everything on the ESP8266 is definitely an option, you'd definitely be one of the first people to try it and as such might encounter some issues. For one, I don't think Espruino on the ESP8266 is currently able to enter any low power modes, so it wouldn't last long on a battery if that's what you had planned.

    I'm actually looking at doing something very similar which I'm hoping to get done in the next few weeks - I'm going to try with basic 433Mhz transmitter modules for now (after all, you only need to transmit, and they're nice and cheap :).

  • Are you planning to operate on battery, and if so which type, and how long do you expect them to last, i.e. how often are you willing to go around changing/charging batteries? That will really determine your options...

  • I will report back on the battery part. By using deep sleep on the Pico and switching off every other device using one or more transistors, I am hopeful - based on a reporting interval of every hour - of getting to about 5 days per 1000mAh of battery - maybe more. However that's purely based on theoretical calculations.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Temperature Web Monitor

Posted by Avatar for JeremieLitzler @JeremieLitzler

Actions