Forum Replies Created

Viewing 25 posts - 3,951 through 3,975 (of 4,224 total)
  • Author
    Posts
  • in reply to: Starting ospi.py automatically #24714

    Ray
    Keymaster

    @kkpwr&h2o wrote:

    When I go to http://rayshobby.net/apps/sprinklers, the app opens but I am unable to add a new device when using my IP addr 71.85.xxx.xxx:8080. After I hit the Submit button I keep getting, “IP Check IP/port and try again”.

    Port 80 is forwarded on my router (and as I read in above posts, it being used by apache by default) so I am thinking that is the port the local OpenSprinkler web page is using.

    Since you are using port 8080, you need to forward port 8080 on your router, instead of the default 80, right?

    in reply to: specification for the pump and valve #25152

    Ray
    Keymaster

    We don’t provide pump and valve. You need to purchase these separately. Most sprinkler valves are standardized, so they are typically interchangeable. On OpenSprinkler, the maximum current per channel / station is 800mA AC continuous, and 8A impulse (inrush).

    in reply to: Cannot turn Solenoid off #25144

    Ray
    Keymaster

    I think the label ‘AC adapter’ here is a bit misleading. This seems clearly a DC adapter (or more strictly AC to DC adapter). Note the label that marks the – / + of the connector.

    Another way to tell is to use your multimeter to measure the AC voltage of the output of the transformer. If the transformer outputs DC, the AC voltage reading will be almost zero.

    You will need an AC adapter, such as this one:
    http://www.homedepot.com/p/Orbit-Transformer-24V-750Ma-57040/202899607#.UfWLPReJBpl
    You can also search ‘sprinkler transformer’ on Amazon and there are plenty of choices.

    in reply to: Cannot turn Solenoid off #25140

    Ray
    Keymaster

    Check if your transformer is 24V *AC*, not DC. If it’s a DC transformer, you will only be able to turn on valves and not turn off. This is due to the way triacs work.


    Ray
    Keymaster

    To be honest, I am confused what exactly you are trying to do. My guess is that you are trying to pair two stations together, and make sure that they always come on together, is that right? If so, why not just hard-wire the two stations together into the same terminal port. Each terminal port can control 2 valves in parallel.

    in reply to: Just curious, does the opensprinkler pi actually use… #25132

    Ray
    Keymaster

    Unlike the microcontroller-based OpenSprinkler, OSPi’s firmware programs do not actively set and read RTC directly. Instead, you should set it up with the RPi’s operating system in order to automatically set and read RTC. The OSPi Wiki page has instructions:
    http://rayshobby.net/mediawiki/index.php?title=OpenSprinkler_Pi

    in reply to: Time is wrong. #23624

    Ray
    Keymaster

    First, make sure on the homepage you see GMT-8. If not, that means your time zone change is not correctly saved.

    If that’s correct, then it might be that your router is blocking the NTP sync port 123 for some reason. OpenSprinkler uses the NTP server at 204.9.54.119 by default. If you have a linux machine, try to run the following command:
    nmap -p 123 -sT 204.9.54.119
    and see if it reports the port is open. If not, you may have to change corresponding settings on your router to see if you can unblock the port.

    in reply to: My own redesign #25122

    Ray
    Keymaster

    Very nice work. Glad that OSPi inspired you to design your own board. A few quick comments:
    – The COM (common) port just needs one pin. The reason I have two (which are connected together) is to re-use the 2p terminal block so to reduce the total number of different parts. You can get rid of one to save some space.
    – Regarding PCF8591, you can easily replace it with an ADC chip of much smaller package, such as MCP3021, which provides one ADC channel and takes almost no space.
    – If you want to add a rain sensor port with minimal impact to the board size, you may want to take a look at the microcontroller-based OpenSprinkler:
    http://rayshobby.net/wordpress/wp-content/uploads/2013/06/os20_component_diagram-1024×599.jpg
    where the rain sensor port is the blue-colors screw terminal located in the interior of the PCB.

    in reply to: Possible to add Adafruit LCD to OSPi? #25129

    Ray
    Keymaster

    Yes, if the LCD is based on i2C, then you can use it with OSPi. On OSPi 1.2, there are i2C pin headers on the right hand side of the PCB. You can use them to extend the funciontliaty of the board.

    in reply to: Pi Rebooting when running manual program #24885

    Ray
    Keymaster

    Frankly I don’t think the problem is with triacs. With relays you could damage your transformer in the same way. In fact, triacs at least have internal limit on the maximum current (e.g. 800mA), while relays have literally no limit on the allowed current, so you can potentially run a much higher current through it, causing ever worse damage. Also, if you can daisy chain relays you can also daisy chain triacs. In practice, unless if we are talking about power-line devices, for low-voltage devices I would always prefer traics: they are more much compact, cheaper, and have faster switching speed.

    The issue you have encountered is rather unusual. As I said, typically when the transformer is overloaded, the voltage will drop rapidly, causing the controller to reset and release all valves. Actually, now I think about it: are you powering RPi through OSPi, or do you power RPi through a USB cable? In the latter case, when the transformer is overloaded, RPi will still keep the triac open (since it’s powered separately), and I can imagine this would damage the transformer.

    For flexibility, I can’t put a hardware limit to restrict the number of open stations. Many users have a master station, which should be turned on concurrently with other stations. Also, some users use OpenSprinkler to control not only sprinkler valves, but also landscape lighting. They certainly don’t want lighting to be serialized. So I can’t put a hardware limit for one station at a time. This has to be implemented as a software limit. OSPi’s interval_program is currently designed to run stations sequentially only. But it may have a bug that causes more than 1 stations to open at the same time. I will communicate with Dan about the issue.

    in reply to: Pi Rebooting when running manual program #24881

    Ray
    Keymaster

    Well, 300mA is not sufficient to run more than 1 valve. Each valve draws about 180mA to 200mA current (and also the inrush current can go as high as 500mA to 600mA). Plus if you are powering RPi from OSPi (using the 3-pin cable), that will require another 100 to 150mA current. So with 300mA transformer, it’s barely enough to drive one valve plus RPi. As the OSPi user manual describes, the transformer should be rated at least 500mA.

    in reply to: Pi Rebooting when running manual program #24878

    Ray
    Keymaster

    In manual mode, ‘all selected valves’ will surely all turn on, because in manual mode you click on / select each valve to turn it on. So I assume ‘all selected valves’ mean you’ve manually selected all valves, and that should turn on all valves.

    In any case, what kind of transformer do you have? Normally if the transformer is overloaded (say because it can’t drive more than 1 valve), the voltage will drop instantly, causing the controller to restart, and hence release the valves. The only issue I can think of is if you have a persistent shorting somewhere, and hence the transformer will be damaged. I think it’s important to perform further investigation before arriving at a conclusion.

    in reply to: Dealing with multiple OSPi units? #24866

    Ray
    Keymaster

    First of all, in the example you gave can be implemented with 3 programs:
    program 1: 3 minutes, stations 1, 5
    program 2: 6 minutes, stations 2, 4
    program 3: 9 minutes, stations 3, 6
    this is logically easier (and matches what I mean by consolidating the stations according to equal water time), but if you want to optimize, you can implemented it with just 2 programs:
    program 1: 6 minutes, stations 2, 3, 4, 6
    program 2: 3 minutes, stations 1, 3, 5, 6

    As I said, in most case the water time can be consolidated into a small number of groups. The more stations you have, the more likely you can consolidate. I know this is different from other sprinkler timers, but there are cases where you can argue this programming pattern is easier to set and modify than having to set one water time for each individual station.

    The storage size is actually more than you thought: the start / end time and interval time each take 2 bytes (granularity of minutes), and water time takes 2 bytes (granularity of seconds). OpenSprinkler 2 supports up to 48 stations, so including the other necessary bytes each program would take a total of 105 bytes. This is quite a bit more than what the current program data structure takes, which is 17 bytes per program.

    That being said, Samer and I have talked about how to have a front end that can handle different water time per program, and back end to compress it to more efficient storage. So I will think about this option.

    in reply to: Open Sprinler with 110V outlet control #23706

    Ray
    Keymaster

    As many relays as the number of stations.

    in reply to: Dealing with multiple OSPi units? #24864

    Ray
    Keymaster

    Let me explain the rationale behind having each program use the same water time for the selected stations. Since this is different from how a lot of other sprinkler controllers work, I understand it can be confusing. The main reason is that OpenSprinkler is designed to support potentially a large number of stations. The highest number I’ve seen is that one user bought one main controller plug four expansion boards, for a total of 40 stations. If each program allows a different water time for each station, this will potentially require a large amount of space to store the program data. While it won’t be an issue for OSPi (since there is plenty of space on the SD card), but on the microcontroller-based OpenSprinkler, the program data are stored in EEPROM, which has limited space. This is while most other controllers are limited to only 3 or 4 programs in total. I believe it’s due to the storage constraint.

    In practice, there are seldom cases where you can’t consolidate the water time into a small number of uniform groups. For example, you can probably split all your stations into 2 or 3 groups, where each group uses the same amount of water time. As the user manual clearly explains, if you set each program to have the same start/ending and interval settings (while different water times), it will work as if it was one single program. This is overall a more efficient way to use storage.

    Certainly you can change it to the other way by modifying the source code. The downside is that you will have significantly less number of programs. Hope this explains the design decision.


    Ray
    Keymaster

    Please specify which product you are referring to, microcontroller-based OpenSprinkler, or OpenSprinkler Pi? On microcontroller-based OpenSprinkler, you can set the controller to run in concurrent mode (i.e. uncheck the ‘sequential’ option). This allows you to open valves simultaneously.

    in reply to: How to read current station status? #24841

    Ray
    Keymaster

    Sorry guys, just had time to read the thread here, and I can help answer some of the questions:

    – The control of shift register is a one-way communication: the microccontroller or RPi sends command and the shift register changes state. Your program usually has a variable that stores the current state of the shift register (for example, in OpenSprinkler firmware, it’s an array called station_bits). Since the microccontroller is single-threaded, the firmware variable and the actual state of the shift register should always match. The only exception is when there are signal interference, which may cause a bit flip on the shift register. This is why the OpenSprinkler firmware refreshes shift register every second to ensure it matches the firmware variable. Now, on RPi, since you can potentially run multiple processes / threads that simultaneously write to shift register, you need to be careful to avoid concurrent writing.

    – Contrary to what was mentioned in this thread earlier: when updating the 74HC595 shift register, the stations will NOT all reset, that’s why you don’t see all valves close first, and then one of them re-opens. This is because the 74HC595 shift register has a storage buffer and an output buffer. When a new byte comes in, it gets stored in the storage buffer first, and then latched to the output buffer. The ‘latching’ step is controlled by a low-to-high rise on the latching pin. Before the latching pin is pulled from low to high, you can update the storage buffer as many times as you want, and these will not be reflected in the output buffer. The shift register will ‘dump’ the storage buffer to output buffer on the low-to-high rise of the latching pin. Hope I’ve explained this clearly.

    Not all shift registers have the latching pin. For example, 74HC164 does not. So whatever you are writing to the shift register gets reflected on the output immediately.

    – I wrote the microcontroller-based OpenSprinkler firmware, but if you want to know more about the RPi-based version, Dan is the best person to ask. On the microcontroller, everything is serialized, and when the controller is switched from program mode to manual control mode, all stations will reset first. So there is no question of a manual control ‘interrupting’ a program — all stations would have been closed before the manual control mode is turned on.

    in reply to: Board search function suckage #24828

    Ray
    Keymaster

    OK, I followed some posts and disabled the ‘common words’ threshold, and rebuilt the search index. Seems at least it doesn’t complain ‘too common words’ any more.


    Ray
    Keymaster

    For reading rain sensor, one GPIO pin is sufficient (since most rain sensors return a digital signal, i.e. closed or open, instead of an analog signal). This is essentially the same as reading a button (pressed or released), so if you just search for how to use RPi to read a pushbutton that should work for rain sensor as well. The standard way is to use a pull-up resistor (e.g 10K), one pin goes to +3.3V, the other pin goes to one wire of the rain sensor, and the other wire of the rain sensor goes to ground.

    in reply to: Board search function suckage #24825

    Ray
    Keymaster

    Frankly, I hate it myself. I will do some digging around to see how to make it suck less, but if anyone has set up phpBB and knows how to make the search functionality better, let me know. Thanks!

    in reply to: OSPi Interval and Mobile WebApp Station names. #24818

    Ray
    Keymaster

    By the way, if the station name is messed up and you need to reset the station name without resetting the controller, you can use direct HTTP command, for example:
    http://x.x.x.x/cs?pw=opendoor&s0=abc
    will reset the first station name to abc.

    in reply to: OSPi Interval and Mobile WebApp Station names. #24817

    Ray
    Keymaster

    I see, I forgot to test the apostrophe (single quotation mark). The issue is that since the station name is provided as a javascript array of strings, and I am using apostrophe for defining a string, if you include it in your station name, that will create Javascript error, such as this one:
    var snames=;
    (Uncaught syntax error…)
    the abc,`def’ string has a apostrophe at the end itself, so that will cause ambiguity with the apostrophe used to define a string.
    So yes, for now try to avoid using single quotation mark.

    in reply to: OSPi Interval and Mobile WebApp Station names. #24814

    Ray
    Keymaster

    These characters work fine in the microcontroller-based OpenSprinkler. Just tested and it’s displayed correctly. I recall including code that converts special characters with their HTML code back and forth. For example, ‘space’ will be stored as ‘%20’ any so on. It’s possible that the OSPi’s interval program skipped this. I will do some testing later to check.

    in reply to: Garage door monitoring and control #23371

    Ray
    Keymaster

    I think the subscribe feature is already enabled. At least on my side, there is a ‘Subscribe to topic’ check box at the bottom of every thread. Let me know if you can’t find it.

    in reply to: OpenSprinkler – run concurrent and sequential #24616

    Ray
    Keymaster

    If your firmware version shows 1.8.2, then yes it doesn’t have concurrent running mode. If your firmware shows 1.8.3 then it should have the ‘sequential’ option.

Viewing 25 posts - 3,951 through 3,975 (of 4,224 total)