OpenSprinkler Forums OpenSprinkler Unified Firmware aditional info at OSpi Website

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #51090

    Anonymous
    Inactive

    Hi everyone,

    I’m Norbert from Germany.
    I’m using OpenSprinkler on a RaspberryPi with attached relay modules for switching magnetic valves.
    Everything works fine 🙂
    Now I implemented a dry-running protection for the pump if something goes wrong.
    It works by using a temperature sensor.

    Now it would be nice if I could see this temperature at OpenSprinkler website.
    Can someone tell me where I can find this web pages on my Raspi?

    Thanks in advance!

    Regards,
    Norbert

    #51170

    Anonymous
    Inactive

    Is there no way to implement additional info into the website?

    #51186

    Ray
    Keymaster

    You can, but it requires modifying the firmware and also the UI. Not sure how familiar you are with programming, but all source code is given to you so you can feel free to make any changes you want.

    #51505

    Anonymous
    Inactive

    Hi Ray,
    I’m not so familar with programming, a bit python, a bit html, but I’m not a programmer.
    I’m looking for some html files but I cannot find any.
    Can you tell me how can I start?

    Thanks in advance,
    Norbert

    #51515

    Ray
    Keymaster

    Generally the way to start is to follow some existing variable as an example. There are many variables that you can use as example, such as the device time, the rain sensor status, or whatever is changing dynamically. You can take a look at the API document:
    https://openthings.freshdesk.com/solution/articles/5000716363-os-api-documents
    to find some relevant variables, and search in the source code to find where they appear, then start adding your additional variables close to these existing variables.

    The UI changes are more tricky, since the UI code is fairly large. The easiest way is to bypass the app, and just add another url, such as /get_temperature or something like that, that is only used to display your additional information. This way it really only requires changing the firmware code and you don’t have to touch the UI code. The downside is that it won’t show up in the main app interface, instead you will have to type http://x.x.x.x/get_temperature to go to the page that displays your additional information.

    I really think that this is a good motivation for you to learn programming — one of the main reasons I made all our projects open-source is to serve an educational purpose — no matter how full-featured a product is, it’s not going to fulfill everyone’s need. Learning to program and customize the product is really the best way to make it work for you.

    #51558

    Anonymous
    Inactive

    Hello Ray,

    Thank you for your detailed explanations.
    I’m on vacation for the next 3 weeks.
    After this I will go on.

    One Question before, how can I add anothe URL?
    What kind of webserver is running on OSPi?

    #51579

    Anonymous
    Inactive

    For me I’ve found a solution.
    I installed apache on a diffrent port.
    So I can see my additional information without touching OSPi Firmware.

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

OpenSprinkler Forums OpenSprinkler Unified Firmware aditional info at OSpi Website