Forum Replies Created

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts

  • Axel
    Participant

    Problem solved with Unified Firmware 2.1.7:
    – Added an additional type of sensor: Program Switch. This allows the user to connect a switch / button to the sensor port and use it to trigger the first program (Program 1). An LCD icon (P1) will be displayed when this sensor is enabled.

    This means I do not need to patch the source code each time a new version is released.

    Thanks a lot!!

    in reply to: Android App Does not load #44228

    Axel
    Participant

    The issue could also have been caused by a Chrome bug in the dev branch which I use

    in reply to: Android App Does not load #44227

    Axel
    Participant

    I use Dev Chrome which updates very frequently so your explanation makes sense.

    in reply to: Android App Does not load #44225

    Axel
    Participant

    I’ve been on Android 7 since the first developer preview in May. I did not apply any OS version updates/patches between the middle of Sept and Oct 1st when this problem disappeared on my Nexus 6P.

    in reply to: Android App Does not load #44185

    Axel
    Participant

    It is working now after about 3 weeks.

    in reply to: Android App Does not load #44181

    Axel
    Participant

    Same thing here. Opensprinkler Android app does not load. It just stays there with the Opensprinkler logo and then it goes black and stays like that. I can control my OSPI fine via Chrome on my phone.

    Huawei Nexus 6P Android 7 stock.

    I tried this on my son’s Motola Nexus 6 Android 7 and it loads fine.

    I am a software developer so if you need logs send me a message.


    Axel
    Participant

    I would also like to know this. I have an OSPI running nginx doing HTTPS proxy. It works ok if I use a web browser to access OSPI from outside my network. However, it does not work with the Android native client version 1.4.11. Traffic is reaching OSPI (verified with tcpdump) but the mobile app can’t connect.

    EDIT: issue fixed, my certificate chain was incomplete, which made it work with Chrome but not with OpenSprinkler for Android 1.4.11. Now I have TLS working fine.

    I highly recommend this site:
    https://www.ssllabs.com/ssltest/index.html

    in reply to: Newbie question: Is remote access secure? #43471

    Axel
    Participant

    It is not secure. You need to use a TLS proxy like haproxy or nginx.


    Axel
    Participant

    Hi, I finished the installation and OSPI uses a GPIO pin wired to a Songle SRD-05DC-SL-C relay which toggles a 220VAC line wired to a contactor to turn the pump on/off. I would have done this differently if the installation were from scratch but I already had all the components in place, so I just had to add the 5 dollar relay.

    My issue now is that the pi’s Edimax EW-7811UN wifi range is horrible and it does not reach my access point. I am going to use a TP-Link AV500 Powerline kit to solve this problem. I can’t recommend these Powerline adapters enough. Three customers and two relatives are using them and they are fantastic. Just plug and play.

    I don’t feel comfortable opening my OSPI to the internet without SSL. Sniffing the OSPI admin password without SSL is trivial and it would give an attacker access to your sprinkler system and possibly to the RPI itself. OSPIi runs as root and my guess is that it would not be too difficult to used malformed HTTP requests to gain root access to the PI and then to my home network.


    Axel
    Participant

    @Ray, I currently have this contactor controlling my pump and would like to avoid having to buy a new device.

    http://uk.farnell.com/eaton-moeller/dilm12-10-110v50hz-120v60hz/relay-spst-no-690vac-12a/dp/1110422
    datasheet download http://www.farnell.com/datasheets/94707.pdf

    The product page says that the coil voltage is 24VAC. I guess this would work, right?


    Axel
    Participant

    Bump… can someone help? @ray maybe.


    Axel
    Participant

    Axel
    Participant

    Well, it’s been more than a year since I bought my OSPI 1.4 and now it’s time to finally put it in production 🙂

    The water pump is 1.5HP 220 VAC and it is currently manually controlled via a contactor that has a simple on-off switch. We use this pump only to fill the pool and the installation will be modified to share it with the sprinkler system.

    I understand that I have to feed power to the contactor control pins to signal it to close the 220V feed and turn on the pump.

    How would I do that with an OSPI? Can I use the onboard relay somehow or do I need to add an external relay circuit (cheap US$ 5) and use GPIO +5V to control the relay?

    Could someone help?

    Thanks in advance
    Axel


    Axel
    Participant

    I received my valves and 24 VAC power supply yesterday and started coding today.

    My workaround is to define a disabled program called “Rain Sensor” that is run when the rain sensor goes from clear to set. This program will run station 2 for 12 hours which is approximately how long it takes to go from totally empty to totally full in my 80,000 liter swimming pool. This program stops due to 12h timeout or due to a rain sensor transition from set to clear.

    This works ok in my “lab” but I am a bit worried about the side effects of playing with the os.status.rain_sensed flag and calling reset_all_stations() which seems to clear the queue. Will this affect the schedule for the rest of the day? I plan to have ospi querying wunderground for rain info. Do you have any tips?

    Here’s the relevant code:

        ProgramStruct rainprog;
        if (os.old_status.rain_sensed != os.status.rain_sensed) {
          if (os.status.rain_sensed) {
            // rain sensor on, record time
            os.rainsense_start_time = curr_time;
    
            for( int rainpid=1;rainpid<255;++rainpid){
              pd.read(rainpid-1, &rainprog);
              if(strstr(rainprog.name,"Rain Sensor")){
                manual_start_program(rainpid);
                break;
              }
            }
          }else{
            // rain sensor off, write log
            write_log(LOGDATA_RAINSENSE, curr_time);
            reset_all_stations();
          }
          os.old_status.rain_sensed = os.status.rain_sensed;
        }
    

    I also noticed that if I stop the service using /etc/init.d/OpenSprinker.sh stop, the valves are left open. This will flood my garden. How do I stop this from happening? We probably need to use the RPi watchdog.


    Axel
    Participant

    Hi Ray,

    I have some more questions:
    1) I’ve ordered a 1.5″ Hunter PGV151, two 1″ Hunter PVG101 and a 220VAC-24VAC power brick. It should be arriving in the mail at the end of next week. Meanwhile, can I use 220VAC-12VDC power brick and a multimeter to test my code just to see if the stations are getting selected correctly?

    2) Will manual_run_program() immediately stop all the other currently running programs and switch to the chosen program?

    Thanks


    Axel
    Participant

    Hi Ray,

    I’ve finally had time to play with OSPi. I am using it on an RPi2 since my old RPi1 doesn’t have a compatible GPIO socket. I’d really love to be able to use the RPi1 instead, but that’s something I’ll worry about later. Maybe I can use a custom ribbon cable to connect the GPIO pins.

    So anyways, I set it up on the latest official Raspbian from May 5th, got the wifi working and built the source from Git. It worked fine, the application is running and the web server is listening on 8080. Everything great, got it up and running in about half an hour. 🙂

    I copied the C++ source over to my Ubuntu laptop and installed Eclipse for C++. Looking at the code, it seems that all I need to do is to change main.cpp right after “if (os.old_status.rain_sensed != os.status.rain_sensed)” add something like (in pseudo-code):

    if( os.status.rain_sensed ){
    reset_all_stations();
    run_program(“fill_pool”);
    }else{
    stop_program(“fill_pool”);
    }

    I would define fill_pool as station 2 on, for 12 hours and connect my pool filling valve to station 2.

    Does this make sense?


    Axel
    Participant

    Could I use the rain sensor port instead of an RPi GPIO port? That would probably make it much easier for me.


    Axel
    Participant

    The pool boy does not have a smartphone.

    I want to connect an external on/off switch to a GPIO pin and sense the position of that switch.

    When detecting a “Switch transition to on” event, OSPI should stop all the active sprinkler cycles (shut down the water pump and close all valves) and start a “fill pool” cycle (open the pool valve and start the water pump).

    When detecting a “Switch transition to off” event, OSPI should end the “fill pool” cycle by turning the water pump off and close all the valves.

    When OSPI detects that a sprinkler cycle should start, it should check the current state of the switch and if it’s on, then the sprinkler cycle is not started.

    That makes sense to me, but I don’t know how hard it would be to code since I am a C/C++ programmer but I don’t know your framework.


    Axel
    Participant

    Hi, I’ve though about this and the switch should be sensed by OSPI, suspend the sprinkling cycle, close all the valves except the pool valve and turn on the water pump. Can this be configured? Is there any provision for inputs on the interface board or do I have to use the Pi’s GPIO ports?

    Thanks

Viewing 19 posts - 1 through 19 (of 19 total)