Forum Replies Created

Viewing 21 posts - 26 through 46 (of 46 total)
  • Author
    Posts
  • in reply to: Resets to default settings everytime I reboot and timezone #40725

    sakos
    Participant

    Let me comment your issue. I have never seen the time zone tab other than grey however the timezone was automatically set according to selected location on the map.
    The timezone settings in Linux has no effect on the GUI. They are independent.

    in reply to: On board relay for independent use (other than as master) #40708

    sakos
    Participant

    It is odd that the on-board relay is not more supported by the firmware. I have already registered a feature request in this topic: https://opensprinkler.com/forums/topic/request-relay-control
    Anyway I modified my OSPI firmware and now I can control the relay output as a standalone station output.

    in reply to: New release – when #40672

    sakos
    Participant

    That’s great.

    Meanwhile I am still adding minor changes, so if it does not need huge effort then please merge again before you release.

    in reply to: New release – when #40660

    sakos
    Participant

    What is the planned release date?

    in reply to: ospi2.img seems outdated #40659

    sakos
    Participant

    These are the changes. I also added the clearing of all stations in case of managed shutdown of OSPI. I think it is necessary to prevent unwanted water leak due to a valve left open accidentally. I would like to mention here that RF stations are not closed by forced clearing of stations.

    OpenSprinkler.h

    @@ -38,6 +38,8 @@
       #include <string.h>
       #include <unistd.h>
       #include "etherport.h"
    +  #include "linux/watchdog.h"
    +  #include "sys/ioctl.h" 
    
    @@ -195,5 +197,6 @@ private:
     #endif
     #endif // LCD functions
     };
    +  static int deviceHandle = -1;	// Watchdog device handler 
    

    defines.h

    @@ -378,6 +378,7 @@ typedef enum {
       typedef short           int16_t;
       typedef unsigned short  uint16_t;
       typedef bool boolean;
    +  #define WATCHDOG_TIMEOUT   15 
    

    main.cpp

    @@ -249,6 +249,17 @@ ISR(WDT_vect)
     #else
     
     void do_setup() {
    +
    +#if defined(OSPI)
    +	// Try to inicialize Watchdog device
    +	// deviceHandle >=0 indicates success
    +	if ((deviceHandle = open("/dev/watchdog", O_WRONLY)) < 0) {
    +	   DEBUG_PRINTLN("Error: Couldn't open watchdog device!");
    +	} else {
    +	   ioctl(deviceHandle, WDIOC_SETTIMEOUT, WATCHDOG_TIMEOUT);
    +           DEBUG_PRINTLN("Watchdog device opened.");
    +	}
    +#endif 
    
    @@ -647,6 +659,11 @@ void do_loop()
         // check weather
         check_weather();
     
    +    // kick Watchdog
    +    // deviceHandle can have valid value only in case of OSPI
    +    if (deviceHandle  >= 0) {
    +       ioctl(deviceHandle, WDIOC_KEEPALIVE, 0);
    +    }
       } 
    

    OpenSprinkler.cpp

    @@ -419,13 +419,31 @@ void OpenSprinkler::reboot_dev() {
     #if defined(DEMO)
       // do nothing
     #else
    +  // Reset all stations before quit
    +  clear_all_station_bits();
    +  apply_all_station_bits();
    +
       sync(); // add sync to prevent file corruption
    -	reboot(RB_AUTOBOOT);
    +  // Stop Watchdog by sending magic character
    +  // deviceHandle can have valid value only in case of OSPI
    +  if (deviceHandle  >= 0) {
    +     write(deviceHandle, "V", 1);
    +  };
    +  reboot(RB_AUTOBOOT);
     #endif
     }
     
     /** Launch update script */
     void OpenSprinkler::update_dev() {
    +  // Reset all stations before quit
    +  clear_all_station_bits();
    +  apply_all_station_bits();
    +
    +  // Stop Watchdog by sending magic character
    +  // deviceHandle can have valid value only in case of OSPI
    +  if (deviceHandle  >= 0) {
    +     write(deviceHandle, "V", 1);
    +  };
       char cmd[1024];
       sprintf(cmd, "cd %s & ./updater.sh", get_runtime_path());
       system(cmd); 
    

    Apply these changes and build OSPI with sudo ./build.sh ospi command.

    To make watchdog work you have to edit /etc/modules file (sudo nano /etc/modules) and add this line to the end:
    bcm2708_wdog

    After restart the watchdog is operating. To test it stop the software with sudo /etc/init.d/OpenSprinkler.sh stop command. You will observe that the connection to the OSPI system is lost but will be automatically available again within 30-40 seconds.

    I would appreciate if these changes were added to the official release.

    in reply to: Version 2.1.6 #40635

    sakos
    Participant

    Hi,

    I would do like this.
    Configure two independet masters. One for the tank pump, one for the borehole pump. Assign both masters to normal stations.
    Add a virtual (not equipped) station at the end of your irrigation programs. Assing only the borehole pump as master to this virtual station. The lenght of virtual station timing will act as a delayed run of your borehole pump. You can program any delay whatever you want within seconds to several hours range. Even this delay can be tuned according to the water consumptions of individual programs. I mean that shorter programs need less extra run of borehole pump.

    in reply to: ospi2.img seems outdated #40620

    sakos
    Participant

    I managed to add watchdog handling in OSPI. It was pretty easy. Are you interested?

    in reply to: Programming question. #40612

    sakos
    Participant

    Thanks for your response Ray,

    I have OSPi. Debug is enabled by default. I could not see debug info in console, neither was able to forward it into a file. However if I start the program directly and not using the init script the debug lines appear. It is good enough so far.

    in reply to: Programming question. #40598

    sakos
    Participant

    I would like to play with the Opensprinkler code. I modified some minor things successfully however I got stuck. I need some debug info but printf command will not work. A printf (“echo” \n) has been put into main loop, however no output on linux console neither redirecting to a file works. Any hint?

    in reply to: Change request – Water duration with one sec resolution #40574

    sakos
    Participant

    I see. Actually it is a rear but a valid use case when such granularity is needed. e.g. for seed germination program (1:30 watering, 10 times a day) Since the EEPROM is not a limitation for RPi this compression could be removed from those verison.
    I modified the firmware and it works fine. Even the GUI allows the setting of such durations with typing in the values directly instead of clicking on +/- signs.

    in reply to: ospi2.img seems outdated #40550

    sakos
    Participant

    I mean adding the Pi watchdog handling into the firmware. If the firmware got stuck for any reason the watchdog would restart the Pi and hopefully shut down the running stations.

    in reply to: Trouble with Zimmerman Method #40549

    sakos
    Participant

    Thanks for your response. This was my expectation as well hence I clicked on the preferred station of course, however it does not work as intended. First of all the stored GPS coordinates a slightly differs the GPS coordinates found on the station page on wunderground site. Furthermore the GPS coordinates more precise on the site they cannot be stored in the same format.

    The GPS coordinates of my preferred station according to wunderground (IBUDAPES63): 47.407, 18.997
    Applying the http://autocomplete.wunderground.com/aq?h=0&query=ibudapes63 query: 47.407398, 18.997299
    The firmware stores this coordinates when I select exactly this station on the map: 47.40745,18.99731
    Fine tuning of the stored GPS coordinates by manually editing the config file did not help.

    Not a big difference but the result is that I got weather data from a completely different station which does not have precipitation sensor. I assume that this station is which is allocated to Budapest, Hungary name and located several km-s far away. I do not know how wundergorund works but it seems it does not resolve the nearest station.

    I found a workaround. I edited manually the saved configuration backup file and replaced the location info like this: “loc”:”pws:ibudapes63″. This works fine. It would be good to edit directly this location info in the GUI.

    in reply to: Change request – Water duration with one sec resolution #40539

    sakos
    Participant

    It seems that even the API has been changed and the below coding is obsolete.
    0 – 59 seconds, in steps of seconds
    1 to 179 minutes, in steps of minutes
    3 to 16 hours, in steps of hours

    in reply to: ospi2.img seems outdated #40538

    sakos
    Participant

    I would also highly appreciate a supervisor solution including watchdog. It would be so bad if the system halted when a station is open. e.g during a one week holiday.

    in reply to: Trouble with Zimmerman Method #40532

    sakos
    Participant

    Why does Opensprinkler firmware use an external script to resolve weather information? For me it looks like as an additional potential point of failure.

    in reply to: Trouble with Zimmerman Method #40529

    sakos
    Participant

    You are all talking about selecting specific station by referring its name. How do you do that?
    When I click on location setting a map opens where I can click on anywhere to select a place. I can see the weather stations on the map. I can click on any of them however when I am back on the configuration page I can see the city and district and not the station name.

    I assume that my weather information comes from a different station because I get zero precipitation despite it has been raining for two days. There are other weather stations nearby which do not have precipitation sensor. When I check my preferred station on wunderground site it shows the correct precipitation data.

    I am fully confused now. Why could not I get valid weather info?

    in reply to: Version 2.1.6 #40518

    sakos
    Participant

    Hi,

    It seems that the Master Off Delay does not work. Despite it is set to 5 or 10 seconds it switches of exactly at the stop of last valve. It works if it was set to 0.

    in reply to: ospi2.img seems outdated #40511

    sakos
    Participant

    After installing the latest OSPi SD Card Image 2 I found that it handles the Real Time Clock out of the box. I tried to compare the actual configuration with the description of this RTC settings wiki page. There are some differences e.g.
    – the ntp settings to use RTC as source of time if no internet connection is available
    – cron script to calibrate the RTC from the system clock once a week
    – cron script to adjust the RTC for drift each day
    Despite of this differences the RTC was synchronized automatically and Pi gets the RTC time if there is no internet access. Can I consider that everything is fully configured in this image and RTC will work as expected including daily and weekly adjustments?

    in reply to: Part lists #39926

    sakos
    Participant

    Hi,

    Some clarifications:
    – I expect the PCBs arrive in 3 weeks. 🙁
    – Since I ordered most of the components also, I can send the PCBs bundled with components.
    – my email address is my username plus @gmx.net

    in reply to: Part lists #39880

    sakos
    Participant

    Thanks Ray,

    One more question. What is the optimal lenght of the RPi support pillar (spacer)?

    I have ordered the PCB from China. They produce 10 pieces on the same price as one. Is anyone interested in empty or populated 1.4+ PCB?
    (I hope I do not violate any rule by asking this question here.)

    in reply to: Part lists #39871

    sakos
    Participant

    Hi,

    I would like to build the hardware on my own. I looked through the design files but some things need clarification.
    – What is the exact type of TVS supressor diodes? I mean the nominal reverse voltage.
    – If I do not need analog I/O can I leave out the PCF8591 A/D D/A converter chip? I am afraid if the lack of the chip causes any problem in software run.

    Could you plase answer the questions above?

Viewing 21 posts - 26 through 46 (of 46 total)