Forum Replies Created

Viewing 25 posts - 151 through 175 (of 270 total)
  • Author
    Posts
  • in reply to: All valves engaged on boot #26625

    Dan in CA
    Participant

    That is a leftover print statement.
    There was another bug that prevented any station name changes from showing up in the log until after a restart.


    @scottsh
    , The point was that having a blank station name could cause the entire program to stop working under certain conditions. Even the most obscure bugs are worth fixing.

    Dan

    in reply to: All valves engaged on boot #26622

    Dan in CA
    Participant

    Still needed work. The zone names in the log were not correct. This is why the regex was there.
    changed “zones=re.findall(r”‘(.+?)'”,gv.snames)” to “zones=re.findall(r”‘(.*?)'”,gv.snames)” on line ~89

    Dan

    in reply to: All valves engaged on boot #26620

    Dan in CA
    Participant

    mstormo

    I just pushed an update that I think fixed the bug.

    There was a bad regex in log_run() on line ~90. This is some early code in the program and I am not even sure why the regex was there.
    I deleted lines 89 and 90 and changed the reference to ‘zones’ on line 97 to ‘gv.snames’ and it seems to be working as expected now.

    I appreciate your reporting this bug. If you find any more, don’t hesitate to let me know.

    Dan

    in reply to: Local weather-based watering system #26505

    Dan in CA
    Participant

    scottsh,

    Just wanted to say that I think it is really cool that you are working on a plugin for this even though I have not posted any real documentation of the plugin system.

    You may have discovered that if you start the program manually from the OSPi directory:

    sudo python ospi.py

    That you will get any error messages that are generated when your plugin is being loaded. This should help in debugging.

    If you have any questions, please post them here.

    Dan

    in reply to: All valves engaged on boot #26615

    Dan in CA
    Participant

    OK. I am able to reproduce the bug.

    Now to fix it…

    Dan

    in reply to: All valves engaged on boot #26612

    Dan in CA
    Participant

    mstormo

    With the system in ‘fail’ mode, could you post a cat of the file OSPi/data/snames.txt ?

    That may be where the problem is.
    I get when the first name is blank.

    Dan

    in reply to: All valves engaged on boot #26607

    Dan in CA
    Participant

    mstormo,

    I’ve been trying but have not been able to get the system to fail as you describe.

    On thing that is interesting is the fact that the log entries are stopping and not showing all data. SD cards have a limited number of write cycles. The recommendation is to use something else like a flash drive to store log data.

    How long have you been using the SD card in your system?

    I use a SanDisk Cruzer Fit 8GB USB Flash Drive in My system. it is small enough to fit inside the OSPi case. Instructions for the setup are on the wiki:
    http://rayshobby.net/mediawiki/index.php?title=Set_Up_RPi,_RTC,_WiFi,_Data_Log#Data_Logging_on_the_Raspberry_Pi

    I don’t know if it is a problem with your SC card but that is one possibility. I will keep testing but so far I can’t find the problem.

    Dan

    in reply to: All valves engaged on boot #26606

    Dan in CA
    Participant

    Argh!!

    I posted a development rev that seemed to be working properly.


    @scottsh
    ,
    The reason the plugins are not loading is that they now need to be set as executable. This will allow plugins to be enabled/disabled by simply setting permissions. for each plugin you need to issue the following command from the Pi home directory:

    sudo chmod +x ./OSPi/plugins/mobile_app.py

    replace the name of each plugin in the plugins folder in the command and they should load.


    @mstormo

    The error message you posted gives me something to go on. One of the other changes in this rev involves having the software automatically adjust for time changes like daylight time.

    I will post here as soon as I fix the problem.
    Sorry for the mess.

    Dan

    in reply to: All valves engaged on boot #26601

    Dan in CA
    Participant

    I just pushed an update to GitHub (master branch only) that should fix this problem.
    Try updating and let me know how it goes.

    Dan

    in reply to: Network stops responding #26548

    Dan in CA
    Participant

    Gal,

    I was having the same problem you describe with a newly configured OSPi. Then I remembered that an older setup that was more reliable was set to a static IP address.

    I set a static IP address on the Raspi itself as well as on the router and it has not dropped the connection since.

    You can set a static address on the Pi by editing the file /etc/network/interfaces to look like:


    #iface eth0 inet dhcp #this line commented out
    iface eth0 inet static
    address 192.168.x.x #where x = your chosen IP address
    netmask 255.255.255.0

    Hope this helps.

    Edit:
    Nope. That didn’t fix the problem. I did discover that the image on the SD card was damaged. I re-formatted and re-imaged the SD card. So far it seems to be OK. Time will tell if this actually fixed the problem.

    Dan

    in reply to: Password #26560

    Dan in CA
    Participant

    If you are running the Python Interval program there are a couple of ways to reset the password.

    1. You can edit the file /OSPi/data/sd.json which is just a text file. Find the part that says “pwd”: “abunchofrandomcharacters”, and replace the contents of the second quotes with “b3BlbmRvb3I=”. This will reset the password to the default of “opendoor”.

    or

    2. You can rename or delete the sd.json file and reboot the Pi. This will generate a new sd.json file with all default settings. You will need to re-set things like time zone, number of expansion boards, etc but your irrigation programs and station names will not be affected.

    Dan

    in reply to: Interval add-on #26534

    Dan in CA
    Participant

    You are right that only one program can control the GPIO pins. However I think your menu program might work just fine using the Interval Program’s new plugin architecture. This is only available with the latest rev of the program.

    I assume you are familiar with the information about Interval program on the wiki:
    http://rayshobby.net/mediawiki/index.php?title=Python_Interval_Program_for_OSPi

    The way it would work is to place your program into the plugins sub-directory under OSPi. You would import the GPIO_pins module into your menu program. This would provide shared access to the GPIO setup that the main program uses. You would also need to remove or comment out any GOIO set-up already in your program. When the main program starts it would load your program as a plugin and you would be able to use it to control the valves.

    I am still in the process of writing documentation for the new plugin system. I would like to help you get your menu system working as a plugin because it will help me see what information would be useful for the documentation.

    If you wouldn’t mind being a test case for the plugin system, here are some things to check:

    1. Have the latest rev of the Interval program installed.
    2. You should be using the alternative method for automatically starting the Interval program from a script in /etc/init.d (1.6.3 in the wiki instructions). That allows you to easily stop and start the program. It is necessary to stop the program and start it manually from the OSPi directory to test a plugin.

    Let me know if you would like further information.

    Dan

    in reply to: Error Installing Interval Program #26536

    Dan in CA
    Participant

    A socket error indicates that another program is already using internet access. Try starting the interval program by itself.

    Dan

    in reply to: Interval add-on #26532

    Dan in CA
    Participant

    If you are just starting out with Python you might want to look at Ray’s demo program:
    https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Pi/software/demos/manual_buttons

    Once you get that working with your Python menu it should be easier to integrate into the Interval Program.

    Dan

    in reply to: Local weather-based watering system #26501

    Dan in CA
    Participant

    If you are referring to the monthly adjustment plugin, that was mostly a demo, but hopefully a useful one, of the new plugin architecture for the Python Interval Program. I have some (untested) Python code for ET calculations you might be able to use as a starting point.
    You can download it from:
    http://1drv.ms/1f45m2F

    You might be able to start out by simply subtracting the measured rainfall from the amount scheduled to be applied and build from there.

    Some other folks here have been working on weather based stuff but i don’t know she status of their work at this point.

    I am interested to see what you come up with.

    Dan

    in reply to: Local weather-based watering system #26499

    Dan in CA
    Participant

    You are on the right track.

    Take a look at this thread:
    viewtopic.php?f=28&t=364

    You may find some helpful information.

    Dan

    in reply to: Improve hardware access with a simple case hack #26487

    Dan in CA
    Participant

    I could only attach 3 image files to the first post but I wanted to include this one:

    [attachment=0:1djf1nde]Wire part.jpg[/attachment:1djf1nde]

    Dan

    in reply to: Interval program with new plugin architecture #26410

    Dan in CA
    Participant

    The function set_output() in the Python program (~line 290) is equivalent to the svc.apply_all_station_bits() function in the micro controller version.

    It may be a good idea to explicitly clear everything on start up. Although when the related vars are first defined they are all in a cleared state anyway.
    Adding a stop_stations() line just before the timing loop stasrts (~line 973) might help. Actually maybe set_output() instead of stop_stations() would do the trick.

    Dan

    in reply to: Interval program with new plugin architecture #26406

    Dan in CA
    Participant

    Good point.
    In fact, by definition a “smart controller” is one that does not require human intervention. I’ll look at restoring the old behavior if it wont break anything major.

    Dan

    in reply to: Login Password #26454

    Dan in CA
    Participant

    The default password is “opendoor” (without the quotes). Does that help?

    Dan

    in reply to: OSPi and RPi Camera Module #26452

    Dan in CA
    Participant

    R_W,

    Very interesting. Thanks for posting.

    Dan

    in reply to: Interval program with new plugin architecture #26404

    Dan in CA
    Participant

    Originally the program used the OS’s time and had auto daylight adjustment but that caused problems for users in other parts of the world. I have tried to keep this as international as possible.

    Perhaps there is a way to add an option to switch between time modes. I’ll give it some thought.

    Dan

    in reply to: Secure internet access to OSPi #26349

    Dan in CA
    Participant

    Fantastic!!

    Thanks to nayr for providing the expertise on a really secure setup and documenting it on the wiki. This kind of contribution is what makes this project so very rewarding.

    Dan

    in reply to: Secure internet access to OSPi #26337

    Dan in CA
    Participant

    For the truly paranoid here are some links that may be of interest:

    1. A step-by-step tutorial on making your Pi secure.
    http://mattwilcox.net/archives/setting-up-a-secure-home-web-server-with-raspberry-pi/

    2. An easy introduction to cryptography. Check out the video, you’ll be amazed!
    https://www.crypto101.io/

    3. A VPN service with free accounts:
    https://proxpn.com/

    I also have been using nginx as a reverse proxy and find it works really well but I think there is more that needs to be done. I’m not sure if an attacker gains access to your Pi what else on your network could be vulnerable.

    I’m also looking into using Tor:
    https://www.torproject.org/
    It runs on the Pi. The only cost is allowing some of your internet bandwidth to be used as part of the tor network. The amount used is controllable.

    Dan

    in reply to: Startup issues #26400

    Dan in CA
    Participant

    Hi Toby.

    I had a similar problem with a new Pi. It turned out to be one of the wires in the SD card holder was not making a connection.

    Dan

Viewing 25 posts - 151 through 175 (of 270 total)