OpenSprinkler Forums Comments, Suggestions, Requests WiFi rain or soil moisture sensor (ESP8266)

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #40097

    David
    Participant

    Hi, what about a rain or soil moisture sensor with WiFi.

    Like this project: http://iot-playground.com/2-uncategorised/18-esp8266-wifi-leak-rain-soil-moisture-sensor

    Add a small solar/battery supply and you have a cheap standalone wireless sensor.

    And the ESP8266 ESP-03 have a analoge input chanel. So we dont need any arduino IC between the Sensor and Wifi modul.

    Its possible to send the data direct to the OpenSprinkler API. For powersave, maybe every 10/30/60 minutes or event triggert (rain start/stop).

    other application would also be possible, like: dry-run sensor, wireless Flow sensor input, mini weather station (temp, humidity, rain, soil moisture), wireless On/Off switch (for my grandmother how understand no smartphones, Apps and so), wifi extention board,

    #40099

    David
    Participant

    for the solar, battery system we can use the MAX1551 IC. This is a battery charger IC with two inputs. Solarpanel and USB to load a 3.7V LiPo.

    #40100

    Mike
    Participant

    I’ve purchased the parts I need to build a soil moisture sensor module that uses an XBee instead of WiFi. My gardens aren’t all within range of my router. See this thread for more details and this link for where I got my inspiration. My plan is to assemble the parts and take a crack at incorporating it into the unified firmware code this winter. Just as you suggest, I’d have the XBee wake up at some configurable? interval, take a reading, transmit to the base station, and go back to sleep.

    #40102

    David
    Participant

    @Mike this is a nice project and you have build the basics for a wireless sensor. Good job! I think, the easiest and flexible way for all simular projects is to interact with the OS over the API. You just need to send from anywhere a command like this: “http://IPorURL:port/jw?pw=PASSWORDinMD5” + your data “ms=moisterSensor”

    for you project, you need a python script thats reads the xbee and send a string with the value to a adress. And all other project have a easy interface to.

    i post this idea here: https://opensprinkler.com/forums/topic/feature-request-api-interface-for-external-sensors/ (i know – the false forum)

    this would be a great solution for easy DIY weatherstation and sensor integration. what do you think about it?

    #40103

    David
    Participant

    haha, i paint something… what could be possible:

    #40106

    Mike
    Participant

    David I like your idea of interacting with it over the API. I’ll have to start by reading the API documentation.

    #40107

    David
    Participant

    @Mike thanks, but until now there is no API input for own weather-stations. we have to ask ray or prog this feature by our own and make a pull request to merge it to the main code in github.

    #40166

    Ray
    Keymaster

    Since OpenSprinkler uses WUnderground.com to obtain weather data, only weather stations that are registered with WUnderground may be used.

    However, since the firmware makes weather query through a script, it is possible to set up your own script that makes use of your local weather sensor data. Alternatively, if you have a server that queries your sensors and calculates a watering level, you can have the server call the existing OpenSprinkler API (i.e. setting the ‘wl’ variable) to feed the result to the firmware. This way, you can integrate data from your own sensors and not be restricted by what the default script provides.

    #40170

    David
    Participant

    Thanks Ray,

    i overlooked this API function.


    @Mike
    , you can set your own waterlevel, calculated by your weatherstation. Just send the API command: http://yourIPorAdress:Port/co?pw=PassMD5hash&o23=100
    To set the waterlevel to 100% Now, you dont need to change the firmware. Only a small script with a json request.

    #40172

    Mike
    Participant

    That’s a great idea! I could write my own script that accesses my soil moisture sensor and calculates a % watering level. I use an OSBo so I could then host the script on it. I can create a program that uses a weather adjustment and set the weather adjustment method to manual. My script will provide the % watering level.

    Two questions:
    1. I believe the OS firmware polls WU at some interval. How can I poll my custom script instead of WU?
    2. If I have multiple soil moisture sensors, how can I differentiate between them? For example, I might have a program and a soil moisture sensor for the potted plants on my deck and also have a program and sensor for my vegetable garden in the ground. The pots will require more frequent watering than my vegetable garden.

    #40177

    David
    Participant

    @Mike

    A solution for you second question could be this: You have a small weather server for your sensors. If one sensor says – hey, this plants need water. You can send a API command to start a run-once program. “Station 2 (petted plants) run 30 min” = http://yourIPorAdress:Port/cm?pw=PassMD5hash&sid=1&en=1&t=1800
    Look at the API docu “under manual station run” for details.

    #40208

    Ray
    Keymaster

    @Mike: the upcoming firmware 2.1.6 allows you to change the weather script location. Actually if you are going to change the firmware code it doesn’t really matter because you can directly change the default weather script location, which is specified in ‘defines.h’.

    If you have multiple soil sensors you have to give each one a unique ID.

    #40275

    Mike
    Participant

    Ray I’ve been pondering this for the past few days and reading the API documentation and I think I’m still missing something. I don’t understand how to set a %WL that is different for each program or station. I’d like to create programs using OpenSprinkler, set them to use weather adjustment and then either feed or request a different %WL for each one individually. The %WL would be calculated by my own script. Is that possible?

    #40292

    Ray
    Keymaster

    @Mike: the ‘wl’ variable is a global variable that gets applied to all. However, each program has a ‘Use Weather’ flag which allows you to select whether ‘wl’ will be applied to that program or not. If ‘Use Weather’ flag is off, that program is not affected by ‘wl’. Otherwise the station run times are all multiplied by ‘wl’. So it’s essentially a binary choice. Now, do you need each program to potentially use a different ‘wl’?

    I should mention that it’s certainly also possible to use a script to change the station water time within each program (i.e. modify the program directly). This way you get the maximum flexibility.

    #40979

    SofieShaw
    Participant

    How i can build my own firmware and and is it possible to use it with some modifications into the required conditions?
    What are the full specifications of the all parts?
    And what about its power supply and the battery consumption?

    pcb prototyping

    #40998

    Ray
    Keymaster

    @SofieShaw: I didn’t quite understand your questions: do you mean the full specifications of the parts of the sensor? Which sensor exactly?

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Comments, Suggestions, Requests WiFi rain or soil moisture sensor (ESP8266)