OpenSprinkler Forums Hardware Questions OpenSprinkler Rain sensor at OpenSprinkler v3

Viewing 25 posts - 1 through 25 (of 25 total)
  • Author
    Posts
  • #65591

    Stefan83
    Participant

    Hi,
    I have a OpenSprinkler3 – best rain computer ever!
    Now I want to connect this to my OpenSprinkler.
    Is this possible?
    And: Is it possible to get the information (raining or not raining) remotely to another Raspberry?
    My plan is that the GPIO-information will be provided to my homebridge-service, to use for smarthome-automations.

    Thanks in advance.

    Stay safe!
    Stefan

    #65595

    Ray
    Keymaster

    You can make use of OpenSprinkler’s HTTP API to get information:
    https://openthings.freshdesk.com/support/solutions/articles/5000716363-os-api-documents
    In particular, the /jc command returns sensor status.

    #65606

    Stefan83
    Participant

    Thanks Ray, that sounds great, I‘ll try that.
    After that, I want to connect a second sensor, a rain gauge: https://pi.gate.ac.uk/posts/2014/01/25/raingauge/
    This shouldn’t be a problem, when I use sn2
    Correct?

    #65608

    Ray
    Keymaster

    Rain gauge is currently not supported: at least not supported if you want to use it to stop watering when a certain amount of rain is received. Technically rain gauge works like a flow sensor — the reed switch internally turns on and off repeatedly to indicate the rate at which rain is accumulated. You can use rain gauge in the sense that you treat it like a flow sensor and you can check its reading. But you can’t use it to automatically trigger the stop of watering because such functionality is not implemented.

    #65614

    Stefan83
    Participant

    Yes, this function with flow sensor is good for me. I just want to read the data and track the „Rain history“ 🙂

    One question about the reading out (maybe more a HTTP-question): when using http://192.168.178.98/jc?pw=XXX it throws out many data.
    How can a get sn1 only as return?

    #65618

    Ray
    Keymaster

    The return is in JSON format. What programming language do you use? Most modern programming languages support parsing JSON data, like Python, Javascript etc. Once parsed, you can access sn1 as a variable of the parsed object (like object.sn1).

    #65643

    Stefan83
    Participant

    That’s it – thanks again.
    One question about the polling: Is it ok, when my homebridge-service is polling every 15 seconds the status via http://192.168.178.98/jc?pw=XXX ?

    Another question about the flow sensor: The sn1 will show the value of pulses*”Flow Pulse Rate” (which I can configure in OpenSprinkler-Options), correct?
    This value is permanently increasing?
    And with the value be resetted, e.g. when restarting OpenSprinkler?

    Thanks,
    Stefan

    #65702

    Ray
    Keymaster

    Do you really need to poll every 15 seconds? Rain sensor status doesn’t change that frequently — I think polling once every 5 minutes is sufficient.

    Pulse rate is a constant — this depends on the spec of your flow sensor. The flow count is a number that’s increasing, not pulse rate. It’s like saying the speed of water is constant, but the volume of water flowing through the pipe is increasing.

    Sure, values are resetted when rebooting.

    #65714

    Stefan83
    Participant

    regarding the polling: yes, with this rain sensorrain sensor, I want an immediate alarm when it starts to rain. e.g. to close some windows automatically. That’s why the short term polling. Sorry for mixing it up in this thread.
    (this sensor will be sn2)

    Regarding the second sensor (rain gauge), i would also say: 5 minutes is sufficient.
    (this sensor will be sn1)

    Would it be possible to reset the value of sn1 manually? (e.g. everyday at 12am)
    When tracking the amount of rain water with the rain gauge, it would be easier to display that in graphs.

    Thanks again for your great support – I really appreciate that 🙂

    #66034

    Stefan83
    Participant

    Hi Ray,

    regarding “ Would it be possible to reset the value of sn1 manually? (e.g. everyday at 12am)”: is this possible? or should I reboot opensprinkler every day to reset the value?
    if so, is there a recommendation for that?

    thanks,
    stefan

    #66042

    Ray
    Keymaster

    ‘sn1’ is determined by the sensor, it cannot be set manually. By setting it manually, did you mean to just temporarily reset its value? Otherwise how long do you want the ‘manually set’ value to last?

    #66046

    Stefan83
    Participant

    Correct. I want to reset its value to zero, every night at 12am.

    #66062

    Ray
    Keymaster

    This will require modifying the firmware. A work-around is, as you said, reboot the controller every day. If you are ok with writing some script, you can certainly write an external script that automatically triggers a reboot of the controller each day. This can be done by making use of OpenSprinkler’s HTTP API.

    #66069

    Stefan83
    Participant

    Perfect, I’ll go with scripting using the HTTP API.
    Are there any known side effects, when rebooting every 24 hours?

    #66100

    Ray
    Keymaster

    I don’t think there is any side effects. Maybe one thing to be aware of is to avoid triggering reboot when a program is running. If you are sure no program will be running at some specific time, you can trigger a reboot at that time. Otherwise you can also poll the controller status to see if any program is current running, and avoid triggering the reboot if that’s the case.

    #66216

    Paul
    Participant

    I also have a 3.0 unit I just set up and I was wondering if anyone has had any experience with a Netatmo Rain gauge. I am currently using the built in weather data which for the most part works great.. Just wanted to see if I can integrate a physical rain gauge so that IF a certain amount of rain fall in a day it can stop the sprinkler from running?

    Thanks in advance and LOVE the product!

    #66231

    franzstein
    Participant

    I’m using a Netatmo Weather Station consisting of an indoor and outdoor module, a rain gauge and an aenometer in conjunction with OpenSprinkler DC 3.1. The rain gauge can’t be used as a standalone product. The Netatmo Weather Station sends encrypted weather data peridiocally to netatmo servers. The encryption blocks end-users from accessing the data. You have to use the netatmo API to obtain the data from the netatmo servers.

    The corresponding setup of how to connect a Personal Weather Station to a Local Weather Service is described here: OpenSprinkler Weather Service.

    #66282

    Paul
    Participant

    Thanks for the info! I will look into that as a solution!

    #67051

    Stefan83
    Participant

    Hi Ray,

    when using the HTTP-API:
    In which parameter, I’ll find the “flow sensor data” ?
    My “flow sensor” (rain gauge) is connected to sn1.

    In the API-documentation I’ve found
    "flcrt": real-time flow count (i.e. number of flow sensor clicks during the last flwrt seconds).

    If I understand that correctly, this value will raises during sensor clicks, but will go to 0, when the sensor is finished with clicks (after 30 seconds time frame)
    Is this correct?

    Thanks,
    Stefan

    #67059

    Ray
    Keymaster

    Right, ‘flcrt’ is the number of clicks during the last ‘flwrt’ seconds (by default, flwrt is 30 seconds). So if within the past 30 seconds window it didn’t detect any click then flcrt will be 0. It’s NOT accumulative.

    #67062

    Stefan83
    Participant

    Ok, so I get this right 🙂
    Is it possible to get an accumulative value?

    #67068

    Ray
    Keymaster

    The cumulative flow count variable ‘flow_count’ already exists in the firmware, it’s just not exposed through HTTP API. We can certainly add this to the next firmware release.

    #67072

    Stefan83
    Participant

    That would be great, if you can add this to the wishlist for the next firmware release 🙂

    Is there any other possible way to read out the flow_count value?

    Thanks

    #67078

    Ray
    Keymaster

    The firmware is open-source, you can modify it to output flow_count in the same way as how flcrt is output. It’s just one line of change.

    #67519

    Hunter Hazel
    Participant

    Hi Stefan! You start good discussion.

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Rain sensor at OpenSprinkler v3