OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Tutorial: Install OpenSprinkler (unified) on a fresh Raspbian image for a Pi 2+

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

    Claudio
    Participant

    As I discovered OpenSprinkler Pi I immediately liked it and purchased the board. I have a few Raspberry Pi 2+ floating around and I decided to  install and try the different available software. First thing I found out is the downloadable preconfigured image firmware doesn’t work for the Pi2 as it does not have the proper kernel and probably doesn’t have the unified firmware.

    I tried both Rich Zimmerman Ospi interval program and the unified firmware. Whereas Ospi seems more capable with its plugin system, I liked the cleaner web interface of the unified firmware which I decided to use.

    It took a few hours to familiarize and put together the needed information which is dispersed in different places: manual, forum posts and github. For this reason I decided to quickly put together this short tutorial to help people approaching this project for the first time.

    NOTE: This is best done using an ssh shell so you can cut and paste. Putty works well from Windows or just ssh from linux or Mac. Also once you are logged in do a sudo su so you don’t have to sudo every entry.

    Here we go:

    1) Download and write the latest raspbian image to a microSD card. There are many tutorial on how to do this.

    2) Once you have a working raspbian and you are logged in, you need to install git by running
    apt-get install git

    3) Change directory to /usr/local
    cd /usr/local

    4) Clone the unified firmware repository. This will create a directory into /usr/local called OpenSprinkler
    git clone https://github.com/OpenSprinkler/OpenSprinklerGen2 OpenSprinkler

    5) Go into the OpenSprinkler directory and build the firmware
    cd OpenSprinkler
    ./build.sh

    The build script will ask if you want to run the software on startup, answer yes unless you want to start OpenSprinkler manually on every reboot.

    Now if everything compiles ok you should have the executable OpenSprinkler ready to go. Go ahead and test it. Press control-C to exit

    6) If you answered no to the build script question to start automatically on startup and you would like to do so the easiest way is to re run build.sh

    7) Reboot your Pi and OpenSprinkler should be started automatically. You can test with
    pgrep OpenSprinkler
    if it returns the process id number you are set to go if returns nothing then something went wrong. Check you did the previous steps correctly.

    8) Open a browser to http://your Ospi IP:8080 and enjoy

    Attachments:
    #36480

    Sean
    Participant

    Nice!

    I’m new to RPi so may have missed something obvious. My install already had git. I verified this by doing your step 2 and it said it was already the current version.

    I used the receipe below to make mine. I also did “apt-get update” and “apt-get upgrade” before the git command.

    https://opensprinkler.com/forums/topic/ospi2-img-zip-in-the-ospi14-manual/#post-36146

    #36504

    Ray
    Keymaster

    Thanks for the tutorial. I haven’t got my own RPi 2 yet, but I am curious if you encountered any issue running the unified firmware with RPi 2?

    #36510

    Claudio
    Participant

    None so far, however I have not received my OSPi yet, so it is just a plain install on the PI2. Pretty much just it is the unified firmware web server serving pages for now. As I receive the OSPi I expect to be needing to enable I2C on the device tree. If I need to do anything different than what is posted, I will edit the tutorial to reflect that.

    #36928

    GregT
    Participant

    Great article Claudio! Had my system installed and running in less than two hours. Everything works great.

    #36937

    Claudio
    Participant

    Glad it was useful. Make sure the real time clock of your OSPI is talking to the raspberry PI. That is something I had to fix once I received my OSPI that maybe I should add to this tutorial.

    #36940

    Samer
    Keymaster

    I also want to thank you for providing these instructions and also the startup script. We actually have merged your script into our repository for all users here: https://github.com/OpenSprinkler/OpenSprinklerGen2/blob/master/OpenSprinkler.launch. The script is installed if OpenSprinkler is not detected in the init.d folder when running the build.sh command. This means steps 6 through 9 of your steps will no longer be needed moving forward.

    I also changed the build_ospi.sh into just one build script (to reduce the amount of build scripts in the long run). So now, for step 5, it is best to run: ./build.sh ospi. The available options are: ospi, osbo, and demo with ospi being the default option.

    Thank you!

    #36946

    Claudio
    Participant

    @Samer, you welcome. It seems the install process is still changing and in the process of getting finalized. I am going to let you guys do your things, then I will be glad to do a full install from scratch and update this little tutorial accordingly to reflect the changes from beginning to end.

    #36947

    Samer
    Keymaster

    @Claudio, I will let you know once things have stabilized. The OSPi release of the Unified firmware is very new and had a rocky start with some bugs and installation issues however thanks to everyone for reporting issues and also submitting guides like this one really helped. We are trying to integrate all this into a more robust firmware package and apperciate your understanding.

    Thanks again!

    #36948

    Claudio
    Participant

    Happy to be lending a helping hand. You guys are doing a great job.

    #37152

    Richard
    Participant

    RPi-2, installed (from git download) “sudo ./build.sh ospi” per protocol in my “home/OpenSprinklerGen2” directory.  Running “sudo ./OpenSprinkler” from terminal from the OpenSprinkler directory.  OpenSprinkler is running under root on the RPi-2.  Unable to connect using http://’RPi-2 IP address’:8080.  I can see the running “Apache server” by using “http://’RPi-2 IP address'”  and the “mobile web app for OSPI” using “http://RPi-2 IP address/OpenSprinkler/” through the intranet (using my windows machine).  Any suggestions?

    #37153

    navy2x
    Participant

    Try:

    /etc/init.d/OpenSprinkler.sh start

    Other arguments such as status, stop, restart also work.

    #37154

    Richard
    Participant

    Thanx…although I have tried etc/init.d/OpenSprinkler.sh start…I haven’t looked at the others.

    Unfortunately I do not have an internet connection at home due to remote location.  So testing and downloading updates, etc is difficult.  I would find a “beta” version of SD card download to be helpful…even with flaws…just to see the program functioning!

    #37174

    Ray
    Keymaster

    Can you bring your RPi to somewhere that has Internet connection, so that at least you can download and get the software working? Keep in mind that without Internet connection, features like weather-based adjustment will not work.

    #37183

    Richard
    Participant

    Yes I can connect to the net when I bring my equipment into work.

    I downloaded the github files into “home/OpenSprinklerGen2” folder.  I think the folder name should have been just “OpenSprinkler” instead since the path set in the “ect/init.d/OpenSprinkler.launch” file is set for the “OpenSprinkler” and not “OpenSprinklerGen2”.  When I do run “OpenSprinkler.launch” I do not see that “OpenSprinkler” is running in root.  Even so, starting “OpenSprinkler” from the “home/OpenSprinklerGen2” folder should have worked…and it does, I can see it running as root, but I am unable to access via “http://RPi-2 IP.8080”.

    I will jiggle things around abit to see if I can get things working.  Still would like to see a beta image for SD download for the RPi-2 to tinker with…even if it has flaws.

    Thanx for your input.

    #37184

    Samer
    Keymaster

    If you use the build.sh to build and install OpenSprinkler, it will ask if you want to install the launch script. If you say yes, then it will modify the path to match your current OpenSprinkler directory.

    #37186

    Richard
    Participant

    That is interesting.  When I used build.sh to build and install OpenSprinkler I don’t recall being asked about installing a launch script.  I have re installed but have not been asked regarding a launch script.  Wondering if I have to uninstall everything and start over?

     

    #37187

    Samer
    Keymaster

    The project is constantly receiving changes as the OSPi support is very new. In fact, it is considered beta for firmware 2.1.3. With that said, If you would like to try the updated code, you are welcome to do a git pull and try again.

    The updated version, 2.1.4, will be released soon which resolves a lot of the issues with OSPi.

    #47623

    wifi75
    Participant

    Hello I’m trying opensprinkler to my spaberry Pi3 with relè module on GPIO.
    with which command is possible update software version?

    #47764

    Ray
    Keymaster
    #47789

    Tim
    Participant

    Hi Ray, I’m just running up new OSPi (This is the 7th one I’ve done) but I’m having some issues. After deploying the “OSPi SD Card Image 2” I was able to access OpenSprinkler via port 8080. Version 2.1.4 I believe. I then followed the upgrade instruction (https://openthings.freshdesk.com/support/solutions/articles/5000631599-installing-and-updating-the-unified-firmware#install) to download the latest version, ran the build and restart the OSPi, but now I’m unable to access the web interface on 8080.

    I’ve checked on the Pi and its not listening on Port 8080, only 80 and 22 after the upgrade process.. The OpenSprinkler service is running.

    I’ve done this twice from scratch, thinking I stuffed up part of the process, but for the life of me, cant work it out..

    Any help would be much appreciated.

    #47795

    Claudio
    Participant

    @Ray, @Participant, I tried to update as well and had the same problem. Had to revert to my backup install. The current GitHub code does not seem to work. I didn’t check further to see why the web server is not working. As fat as I can tell the pi gets the correct ip (I can ssh to it) but there are no responses to http on 80 and 8080. Tried an update and a fresh install

    #47858

    wifi75
    Participant

    Work very good!

    But is possbile change icons ?

    #47969

    Ray
    Keymaster

    The latest firmware includes support for dual IPv4 and IPv6. If you started from the OSPi pre-configured SD card image (which by the way was created a few years ago on an older version of Raspbian), it has problem with the latest firmware due to lack of support for dual IPv4 and IPv6. Just install the latest Raspbian and then follow the firmware installation instructions, that should make it work.

    #47975

    wifi75
    Participant

    how is possibile update to 3.0?

    Inviato dal mio MI 5s Plus utilizzando Tapatalk

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

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Tutorial: Install OpenSprinkler (unified) on a fresh Raspbian image for a Pi 2+